WordPress.org

Make WordPress Core

Ticket #9991: plugins.diff

File plugins.diff, 1.1 KB (added by scribu, 5 years ago)

refresh

  • wp-admin/plugins.php

     
    317317        unset($menu_perms); 
    318318} 
    319319 
    320 $title = __('Manage Plugins'); 
    321 require_once('admin-header.php'); 
     320function plugin_notices() { 
     321        global $plugin, $user_ID; 
    322322 
    323323$invalid = validate_active_plugins(); 
    324324if ( !empty($invalid) ) 
     
    361361        <div id="message" class="updated"><p><?php _e('Selected plugins <strong>deactivated</strong>.'); ?></p></div> 
    362362<?php elseif ( 'update-selected' == $action ) : ?> 
    363363        <div id="message" class="updated"><p><?php _e('No out of date plugins were selected.'); ?></p></div> 
    364 <?php endif; ?> 
     364<?php endif; 
     365} 
     366add_action('admin_notices', 'plugin_notices'); 
    365367 
     368$title = __('Manage Plugins'); 
     369require_once('admin-header.php'); 
     370?> 
     371 
    366372<div class="wrap"> 
    367373<?php screen_icon(); ?> 
    368374<h2><?php echo esc_html( $title ); if ( current_user_can('install_plugins') ) { ?> <a href="plugin-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a><?php } ?></h2>