Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

WordPress constants that should have never been constants

View gist:7095615
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
// Constants causing serious damage (application *states* are never constant):
 
DOING_AJAX
DOING_AUTOSAVE
DOING_CRON
IFRAME_REQUEST
IS_PROFILE_PAGE
WP_ADMIN
WP_BLOG_ADMIN
WP_IMPORTING
WP_INSTALLING
WP_INSTALLING_NETWORK
WP_NETWORK_ADMIN
WP_REPAIRING
WP_SETUP_CONFIG
WP_USER_ADMIN
WP_USE_THEMES
XMLRPC_REQUEST
 
// Other constants that should have never been defined (but aren't too destructive at least):
 
AUTOSAVE_INTERVAL
 
BACKGROUND_COLOR
BACKGROUND_IMAGE
 
// These are all states technically, but at least they are constant for one whole network.
BLOG_ID_CURRENT_SITE / BLOGID_CURRENT_SITE
DOMAIN_CURRENT_SITE
PATH_CURRENT_SITE
 
HEADER_IMAGE
HEADER_IMAGE_WIDTH
HEADER_IMAGE_HEIGHT
HEADER_TEXTCOLOR
NO_HEADER_TEXT
 
// More states, but there's not much to unit test here anyway (or that can be tested).
SHORTINIT
WP_UNINSTALL_PLUGIN
 
TEST_COOKIE // This was ever needed as a variable to begin with, let alone a constant.
 
WP_POST_REVISIONS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.