From 80cc1062afb650e21ee6f7de022da7edfe80011d Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Thu, 22 Sep 2011 09:15:45 +0000 Subject: [PATCH] Revert [18747] until we can discuss it further. See #18453. git-svn-id: https://develop.svn.wordpress.org/trunk@18752 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/misc.php | 25 +------------------------ wp-includes/functions.php | 9 +-------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index c966a21fa6..ef5050c874 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -584,27 +584,4 @@ foreach ( $_wp_admin_css_colors as $color => $color_info ): ?> '; - - foreach ( (array) $_admin_error_messages as $message ) { - echo "

$message

\n"; - } - - echo "\n"; - } -} -add_action( 'admin_notices', '_show_errors_to_admins' ); -add_action( 'network_admin_notices', '_show_errors_to_admins' ); - +?> diff --git a/wp-includes/functions.php b/wp-includes/functions.php index a0b0bbf8bf..e9044cda06 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -3522,20 +3522,13 @@ function _deprecated_argument( $function, $version, $message = null ) { * @param string $version The version of WordPress where the message was added. */ function _doing_it_wrong( $function, $message, $version ) { - global $_admin_error_messages; do_action( 'doing_it_wrong_run', $function, $message, $version ); // Allow plugin to filter the output error trigger if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) { $version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version ); - $error = sprintf( __( '%1$s was called incorrectly. %2$s %3$s. For more information please install a debugging plugin like Debug Bar or Log Deprecated Notices.' ), $function, $message, $version ); - - if ( WP_DEBUG_DISPLAY ) { - (array) $_admin_error_messages[] = $error; - } else { - trigger_error( $error ); - } + trigger_error( sprintf( __( '%1$s was called incorrectly. %2$s %3$s' ), $function, $message, $version ) ); } }