Pass false as the 2nd argument to class_exists() to disable autoloading and to not cause problems for those who define __autoload().

Fixes #20523.

Built from https://develop.svn.wordpress.org/trunk@34348


git-svn-id: http://core.svn.wordpress.org/trunk@34312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor
2015-09-20 03:52:25 +00:00
parent 82709c30d9
commit 84da11d918
25 changed files with 41 additions and 37 deletions

View File

@@ -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 <strong>%s</strong> does not exist.'), $walker_class_name ) );