diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index ecca65ad32..289d959224 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -1165,7 +1165,7 @@ function wp_ajax_add_menu_item() { /** This filter is documented in wp-admin/includes/nav-menu.php */ $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $_POST['menu'] ); - if ( ! class_exists( $walker_class_name ) ) + if ( ! class_exists( $walker_class_name, false ) ) wp_die( 0 ); if ( ! empty( $menu_items ) ) { diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php index d984bdbe92..7e37a3b7b6 100644 --- a/wp-admin/includes/deprecated.php +++ b/wp-admin/includes/deprecated.php @@ -316,7 +316,7 @@ function get_nonauthor_user_ids() { return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) ); } -if ( !class_exists('WP_User_Search') ) : +if ( ! class_exists( 'WP_User_Search', false ) ) : /** * WordPress User Search class. * @@ -757,7 +757,7 @@ function wp_tiny_mce( $teeny = false, $settings = false ) { static $num = 1; - if ( ! class_exists('_WP_Editors' ) ) + if ( ! class_exists( '_WP_Editors', false ) ) require_once( ABSPATH . WPINC . '/class-wp-editor.php' ); $editor_id = 'content' . $num++; diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 8fc0fe1205..62b644be3a 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -559,7 +559,7 @@ function unzip_file($file, $to) { * * @param bool $ziparchive Whether to use ZipArchive. Default true. */ - if ( class_exists( 'ZipArchive' ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) { + if ( class_exists( 'ZipArchive', false ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) { $result = _unzip_file_ziparchive($file, $to, $needed_dirs); if ( true === $result ) { return $result; @@ -848,7 +848,7 @@ function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_own if ( ! $method ) return false; - if ( ! class_exists("WP_Filesystem_$method") ) { + if ( ! class_exists( "WP_Filesystem_$method", false ) ) { /** * Filter the path for a specific filesystem method class file. diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 7b803bb132..63018fc69f 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -2974,7 +2974,7 @@ function wp_read_video_metadata( $file ) { $metadata = array(); - if ( ! class_exists( 'getID3' ) ) + if ( ! class_exists( 'getID3', false ) ) require( ABSPATH . WPINC . '/ID3/getid3.php' ); $id3 = new getID3(); $data = $id3->analyze( $file ); @@ -3029,7 +3029,7 @@ function wp_read_audio_metadata( $file ) { return false; $metadata = array(); - if ( ! class_exists( 'getID3' ) ) + if ( ! class_exists( 'getID3', false ) ) require( ABSPATH . WPINC . '/ID3/getid3.php' ); $id3 = new getID3(); $data = $id3->analyze( $file ); diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index d65d22b2d7..454c68647a 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -454,8 +454,9 @@ function set_screen_options() { function iis7_rewrite_rule_exists($filename) { if ( ! file_exists($filename) ) return false; - if ( ! class_exists('DOMDocument') ) + if ( ! class_exists( 'DOMDocument', false ) ) { return false; + } $doc = new DOMDocument(); if ( $doc->load($filename) === false ) @@ -481,8 +482,9 @@ function iis7_delete_rewrite_rule($filename) { if ( ! file_exists($filename) ) return true; - if ( ! class_exists('DOMDocument') ) + if ( ! class_exists( 'DOMDocument', false ) ) { return false; + } $doc = new DOMDocument(); $doc->preserveWhiteSpace = false; @@ -511,8 +513,9 @@ function iis7_delete_rewrite_rule($filename) { * @return bool */ function iis7_add_rewrite_rule($filename, $rewrite_rule) { - if ( ! class_exists('DOMDocument') ) + if ( ! class_exists( 'DOMDocument', false ) ) { return false; + } // If configuration file does not exist then we create one. if ( ! file_exists($filename) ) { diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php index aa235cf4a0..e557dd04ac 100644 --- a/wp-admin/includes/nav-menu.php +++ b/wp-admin/includes/nav-menu.php @@ -875,7 +875,7 @@ function wp_get_nav_menu_to_edit( $menu_id = 0 ) { */ $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $menu_id ); - if ( class_exists( $walker_class_name ) ) + if ( class_exists( $walker_class_name, false ) ) $walker = new $walker_class_name; else return new WP_Error( 'menu_walker_not_exist', sprintf( __('The Walker class named %s does not exist.'), $walker_class_name ) ); diff --git a/wp-admin/includes/template-functions.php b/wp-admin/includes/template-functions.php index 82614ebe76..4d8b667558 100644 --- a/wp-admin/includes/template-functions.php +++ b/wp-admin/includes/template-functions.php @@ -1910,7 +1910,7 @@ function _wp_admin_html_begin() { * @return WP_Screen Screen object. */ function convert_to_screen( $hook_name ) { - if ( ! class_exists( 'WP_Screen' ) ) { + if ( ! class_exists( 'WP_Screen', false ) ) { _doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3' ); return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' ); } diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 8a1a2be301..a12e9c9e71 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -37,7 +37,7 @@ function _wp_admin_bar_init() { * @param string $wp_admin_bar_class Admin bar class to use. Default 'WP_Admin_Bar'. */ $admin_bar_class = apply_filters( 'wp_admin_bar_class', 'WP_Admin_Bar' ); - if ( class_exists( $admin_bar_class ) ) + if ( class_exists( $admin_bar_class, false ) ) $wp_admin_bar = new $admin_bar_class; else return false; diff --git a/wp-includes/class-feed.php b/wp-includes/class-feed.php index 6e109e1616..919440f18e 100644 --- a/wp-includes/class-feed.php +++ b/wp-includes/class-feed.php @@ -1,6 +1,6 @@ '', 'title_left' => '', 'title_right' => '' ); $args = wp_parse_args( $args, $defaults ); - if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) ) + if ( ! class_exists( 'WP_Text_Diff_Renderer_Table', false ) ) require( ABSPATH . WPINC . '/wp-diff.php' ); $left_string = normalize_whitespace($left_string); diff --git a/wp-includes/pomo/entry.php b/wp-includes/pomo/entry.php index ca706fca16..67f6719b2b 100644 --- a/wp-includes/pomo/entry.php +++ b/wp-includes/pomo/entry.php @@ -7,7 +7,7 @@ * @subpackage entry */ -if ( !class_exists( 'Translation_Entry' ) ): +if ( ! class_exists( 'Translation_Entry', false ) ): /** * Translation_Entry class encapsulates a translatable string */ diff --git a/wp-includes/pomo/mo.php b/wp-includes/pomo/mo.php index 1757061960..164c6c9ccd 100644 --- a/wp-includes/pomo/mo.php +++ b/wp-includes/pomo/mo.php @@ -10,7 +10,7 @@ require_once dirname(__FILE__) . '/translations.php'; require_once dirname(__FILE__) . '/streams.php'; -if ( !class_exists( 'MO' ) ): +if ( ! class_exists( 'MO', false ) ): class MO extends Gettext_Translations { var $_nplurals = 2; diff --git a/wp-includes/pomo/po.php b/wp-includes/pomo/po.php index 381977c5cf..f8933d2cd8 100644 --- a/wp-includes/pomo/po.php +++ b/wp-includes/pomo/po.php @@ -16,7 +16,7 @@ ini_set('auto_detect_line_endings', 1); /** * Routines for working with PO files */ -if ( !class_exists( 'PO' ) ): +if ( ! class_exists( 'PO', false ) ): class PO extends Gettext_Translations { var $comments_before_headers = ''; @@ -355,7 +355,7 @@ class PO extends Gettext_Translations { /** * @staticvar string $last_line * @staticvar boolean $use_last_line - * + * * @param resource $f * @param string $action * @return boolean diff --git a/wp-includes/pomo/streams.php b/wp-includes/pomo/streams.php index 1b6b2282bb..8373295feb 100644 --- a/wp-includes/pomo/streams.php +++ b/wp-includes/pomo/streams.php @@ -8,7 +8,7 @@ * @subpackage streams */ -if ( !class_exists( 'POMO_Reader' ) ): +if ( ! class_exists( 'POMO_Reader', false ) ): class POMO_Reader { var $endian = 'little'; @@ -134,7 +134,7 @@ class POMO_Reader { } endif; -if ( !class_exists( 'POMO_FileReader' ) ): +if ( ! class_exists( 'POMO_FileReader', false ) ): class POMO_FileReader extends POMO_Reader { /** @@ -204,7 +204,7 @@ class POMO_FileReader extends POMO_Reader { } endif; -if ( !class_exists( 'POMO_StringReader' ) ): +if ( ! class_exists( 'POMO_StringReader', false ) ): /** * Provides file-like methods for manipulating a string instead * of a physical file. @@ -267,7 +267,7 @@ class POMO_StringReader extends POMO_Reader { } endif; -if ( !class_exists( 'POMO_CachedFileReader' ) ): +if ( ! class_exists( 'POMO_CachedFileReader', false ) ): /** * Reads the contents of the file in the beginning. */ @@ -292,7 +292,7 @@ class POMO_CachedFileReader extends POMO_StringReader { } endif; -if ( !class_exists( 'POMO_CachedIntFileReader' ) ): +if ( ! class_exists( 'POMO_CachedIntFileReader', false ) ): /** * Reads the contents of the file in the beginning. */ diff --git a/wp-includes/pomo/translations.php b/wp-includes/pomo/translations.php index 8db80c85a6..6008f4aa18 100644 --- a/wp-includes/pomo/translations.php +++ b/wp-includes/pomo/translations.php @@ -9,7 +9,7 @@ require_once dirname(__FILE__) . '/entry.php'; -if ( !class_exists( 'Translations' ) ): +if ( ! class_exists( 'Translations', false ) ): class Translations { var $entries = array(); var $headers = array(); @@ -272,7 +272,7 @@ class Gettext_Translations extends Translations { } endif; -if ( !class_exists( 'NOOP_Translations' ) ): +if ( ! class_exists( 'NOOP_Translations', false ) ): /** * Provides the same interface as Translations, but doesn't do anything */ diff --git a/wp-includes/version.php b/wp-includes/version.php index 293b0c2df6..6f56814492 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34347'; +$wp_version = '4.4-alpha-34348'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index a0c59cfc35..c745cb2430 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -2993,10 +2993,11 @@ class wpdb { */ public function bail( $message, $error_code = '500' ) { if ( !$this->show_errors ) { - if ( class_exists( 'WP_Error' ) ) + if ( class_exists( 'WP_Error', false ) ) { $this->error = new WP_Error($error_code, $message); - else + } else { $this->error = $message; + } return false; } wp_die($message); diff --git a/wp-includes/wp-diff.php b/wp-includes/wp-diff.php index 1e8fc0e921..832a62f8b3 100644 --- a/wp-includes/wp-diff.php +++ b/wp-includes/wp-diff.php @@ -8,7 +8,7 @@ * @subpackage Diff */ -if ( !class_exists( 'Text_Diff' ) ) { +if ( ! class_exists( 'Text_Diff', false ) ) { /** Text_Diff class */ require( dirname(__FILE__).'/Text/Diff.php' ); /** Text_Diff_Renderer class */