Created
October 22, 2013 05:26
-
-
Save tierra/7095615 to your computer and use it in GitHub Desktop.
WordPress constants that should have never been constants
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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