WordPress.org

Make WordPress Core

Changeset 12636


Ignore:
Timestamp:
01/07/10 07:41:13 (4 years ago)
Author:
westi
Message:

Switch from create_function to a fixed function for the plugin page activation admin notice. Fixes #11763 props dd32.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

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

    r12597 r12636  
    11251125} 
    11261126 
     1127/** 
     1128 * Outputs the notice message for multisite regarding activation of plugin page. 
     1129 * 
     1130 * @since 3.0 
     1131 * @return none 
     1132 */ 
     1133function _admin_notice_multisite_activate_plugins_page() { 
     1134    $message = sprintf( __( 'The plugins page is not visible to normal users. It must be activated first. %s' ), '<a href="ms-options.php#menu">' . __( 'Activate' ) . '</a>' ); 
     1135    echo "<div class='error'><p>$message</p></div>"; 
     1136} 
     1137 
    11271138?> 
  • trunk/wp-admin/plugins.php

    r12618 r12636  
    240240    $menu_perms = get_site_option('menu_items', array()); 
    241241    if ( !$menu_perms['plugins'] ) { 
    242         $message = sprintf( __( 'The plugins page is not visible to normal users. It must be activated first. %s' ), '<a href="ms-options.php#menu">' . __( 'Activate' ) . '</a>' ); 
    243         $message = str_replace( "'", "\'", "<div class='error'><p>$message</p></div>" ); 
    244         add_action( 'admin_notices', create_function( '', "echo '$message';" ) ); 
     242        add_action( 'admin_notices', '_admin_notice_multisite_activate_plugins_page' ); 
    245243    } 
    246244} 
Note: See TracChangeset for help on using the changeset viewer.