WordPress.org

Make WordPress Core

Changeset 18752


Ignore:
Timestamp:
09/22/11 09:15:45 (3 years ago)
Author:
westi
Message:

Revert [18747] until we can discuss it further. See #18453.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/misc.php

    r18747 r18752  
    585585<?php 
    586586} 
    587  
    588 /** 
    589  * Show error message only to single site admins or network admins 
    590  * 
    591  */   
    592 function _show_errors_to_admins() { 
    593     global $_admin_error_messages; 
    594  
    595     if ( !is_super_admin() ) 
    596         return; 
    597  
    598     if ( !empty($_admin_error_messages) ) { 
    599         echo '<div class="error">'; 
    600  
    601         foreach ( (array) $_admin_error_messages as $message ) { 
    602             echo "<p>$message</p>\n"; 
    603         } 
    604  
    605         echo "</div>\n"; 
    606     } 
    607 } 
    608 add_action( 'admin_notices', '_show_errors_to_admins' ); 
    609 add_action( 'network_admin_notices', '_show_errors_to_admins' ); 
    610  
     587?> 
  • trunk/wp-includes/functions.php

    r18751 r18752  
    35233523 */ 
    35243524function _doing_it_wrong( $function, $message, $version ) { 
    3525     global $_admin_error_messages; 
    35263525 
    35273526    do_action( 'doing_it_wrong_run', $function, $message, $version ); 
     
    35303529    if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) { 
    35313530        $version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version ); 
    3532         $error = sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s. For more information please install a debugging plugin like <a href="http://wordpress.org/extend/plugins/debug-bar/">Debug Bar</a> or <a href="http://wordpress.org/extend/plugins/log-deprecated-notices/">Log Deprecated Notices</a>.' ), $function, $message, $version ); 
    3533  
    3534         if ( WP_DEBUG_DISPLAY ) { 
    3535             (array) $_admin_error_messages[] = $error; 
    3536         } else { 
    3537             trigger_error( $error );  
    3538         } 
     3531        trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) ); 
    35393532    } 
    35403533} 
Note: See TracChangeset for help on using the changeset viewer.