diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 4feeedfaa1..c1a32dd90e 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -12,16 +12,16 @@ * @since 2.3.2 */ if ( ! defined('WP_ADMIN') ) - define('WP_ADMIN', TRUE); + define('WP_ADMIN', true); if ( ! defined('WP_NETWORK_ADMIN') ) - define('WP_NETWORK_ADMIN', FALSE); + define('WP_NETWORK_ADMIN', false); if ( ! defined('WP_USER_ADMIN') ) - define('WP_USER_ADMIN', FALSE); + define('WP_USER_ADMIN', false); if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) { - define('WP_BLOG_ADMIN', TRUE); + define('WP_BLOG_ADMIN', true); } if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') ) diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index f71e849882..908f1d00c2 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -104,7 +104,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) { global $_wp_additional_image_sizes; foreach ( get_intermediate_image_sizes() as $s ) { - $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => FALSE ); + $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => false ); if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) $sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes else diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index dd4abea3f1..322204d503 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -863,7 +863,7 @@ function uninstall_plugin($plugin) { * * @return string The resulting page's hook_suffix */ -function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = NULL ) { +function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = null ) { global $menu, $admin_page_hooks, $_registered_pages, $_parent_pages; $menu_slug = plugin_basename( $menu_slug ); diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 6a25e48611..0d22441b25 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1142,7 +1142,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { * @param int $thumbnail_id ID of the attachment used for thumbnail * @return string html */ -function _wp_post_thumbnail_html( $thumbnail_id = NULL ) { +function _wp_post_thumbnail_html( $thumbnail_id = null ) { global $content_width, $_wp_additional_image_sizes, $post_ID; $set_thumbnail_link = '
'; $content = sprintf($set_thumbnail_link, esc_html__( 'Set featured image' )); diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 169ce09997..f97ac7b601 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1198,7 +1198,7 @@ function add_settings_error( $setting, $code, $message, $type = 'error' ) { * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors. * @return array Array of settings errors */ -function get_settings_errors( $setting = '', $sanitize = FALSE ) { +function get_settings_errors( $setting = '', $sanitize = false ) { global $wp_settings_errors; // If $sanitize is true, manually re-run the sanitizisation for this option @@ -1250,7 +1250,7 @@ function get_settings_errors( $setting = '', $sanitize = FALSE ) { * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors. * @param boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted. */ -function settings_errors( $setting = '', $sanitize = FALSE, $hide_on_update = FALSE ) { +function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) { if ($hide_on_update AND $_GET['settings-updated']) return; @@ -1587,7 +1587,7 @@ function compression_test() { * Defaults to no other attributes. Other attributes can also be provided as a * string such as 'tabindex="1"', though the array format is typically cleaner. */ -function submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) { +function submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null ) { echo get_submit_button( $text, $type, $name, $wrap, $other_attributes ); } @@ -1608,7 +1608,7 @@ function submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap * Defaults to no other attributes. Other attributes can also be provided as a * string such as 'tabindex="1"', though the array format is typically cleaner. */ -function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) { +function get_submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null ) { switch ( $type ) : case 'primary' : case 'secondary' : @@ -1620,7 +1620,7 @@ function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $ default : $class = $type; // Custom cases can just pass in the classes they want to be used endswitch; - $text = ( NULL == $text ) ? __( 'Save Changes' ) : $text; + $text = ( null == $text ) ? __( 'Save Changes' ) : $text; // Default the id attribute to $name unless an id was specifically provided in $other_attributes $id = $name; diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index bb4448e409..17e95c6aca 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -1404,7 +1404,7 @@ function __get_option($setting) { $option = preg_replace('|/+$|', '', $option); @ $kellogs = unserialize($option); - if ($kellogs !== FALSE) + if ($kellogs !== false) return $kellogs; else return $option; diff --git a/wp-admin/network/admin.php b/wp-admin/network/admin.php index d6de38d13e..dfa37681ab 100644 --- a/wp-admin/network/admin.php +++ b/wp-admin/network/admin.php @@ -7,7 +7,7 @@ * @since 3.1.0 */ -define( 'WP_NETWORK_ADMIN', TRUE ); +define( 'WP_NETWORK_ADMIN', true ); /** Load WordPress Administration Bootstrap */ require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' ); diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 7b31745b4d..71dbd12752 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -86,7 +86,7 @@ case 'update': if (is_writeable($file)) { //is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable $f = fopen($file, 'w+'); - if ($f !== FALSE) { + if ($f !== false) { fwrite($f, $newcontent); fclose($f); $location = "theme-editor.php?file=$file&theme=$theme&a=te&scrollto=$scrollto"; diff --git a/wp-admin/user/admin.php b/wp-admin/user/admin.php index 6aebd88cce..02173fe3d3 100644 --- a/wp-admin/user/admin.php +++ b/wp-admin/user/admin.php @@ -7,7 +7,7 @@ * @since 3.1.0 */ -define('WP_USER_ADMIN', TRUE); +define('WP_USER_ADMIN', true); require_once( dirname(dirname(__FILE__)) . '/admin.php'); diff --git a/wp-app.php b/wp-app.php index 4ce625eac2..e75726e04e 100644 --- a/wp-app.php +++ b/wp-app.php @@ -615,7 +615,7 @@ EOD; $slug = substr( md5( uniqid( microtime() ) ), 0, 7); $ext = preg_replace( '|.*/([a-z0-9]+)|', '$1', $_SERVER['CONTENT_TYPE'] ); $slug = sanitize_file_name( "$slug.$ext" ); - $file = wp_upload_bits( $slug, NULL, $bits); + $file = wp_upload_bits( $slug, null, $bits); log_app('wp_upload_bits returns:',print_r($file,true)); @@ -1073,10 +1073,10 @@ EOD; log_app('function',"total_count(# $wp_query->max_num_pages #)"); $last_page = $wp_query->max_num_pages; - $next_page = (($page + 1) > $last_page) ? NULL : $page + 1; - $prev_page = ($page - 1) < 1 ? NULL : $page - 1; - $last_page = ((int)$last_page == 1 || (int)$last_page == 0) ? NULL : (int) $last_page; - $self_page = $page > 1 ? $page : NULL; + $next_page = (($page + 1) > $last_page) ? null : $page + 1; + $prev_page = ($page - 1) < 1 ? null : $page - 1; + $last_page = ((int)$last_page == 1 || (int)$last_page == 0) ? null : (int) $last_page; + $self_page = $page > 1 ? $page : null; ?>