mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Switch from create_function to a fixed function for the plugin page activation admin notice. Fixes #11763 props dd32.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c7dae7d3be
commit
197cdd2bbb
@ -1124,4 +1124,15 @@ function settings_fields($option_group) {
|
||||
wp_nonce_field("$option_group-options");
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the notice message for multisite regarding activation of plugin page.
|
||||
*
|
||||
* @since 3.0
|
||||
* @return none
|
||||
*/
|
||||
function _admin_notice_multisite_activate_plugins_page() {
|
||||
$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>' );
|
||||
echo "<div class='error'><p>$message</p></div>";
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -239,9 +239,7 @@ add_contextual_help('plugins', $help);
|
||||
if ( is_multisite() && is_super_admin() ) {
|
||||
$menu_perms = get_site_option('menu_items', array());
|
||||
if ( !$menu_perms['plugins'] ) {
|
||||
$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>' );
|
||||
$message = str_replace( "'", "\'", "<div class='error'><p>$message</p></div>" );
|
||||
add_action( 'admin_notices', create_function( '', "echo '$message';" ) );
|
||||
add_action( 'admin_notices', '_admin_notice_multisite_activate_plugins_page' );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user