The MU forums have moved to WordPress.org

cleaning up WMPU plugins page (2 posts)

  1. dwenaus
    Member
    Posted 14 years ago #

    I found the WPMU plugins page annoying with all the 'Activate this plugin site-wide' links in a separate tr and different color. so i made a quick work-around. to clean it up. for what it's worth.

    // function to clean up the WP admin plugins page - get rid of annoying and distracting 'activate site-wide'
    function scg_add_sitewide_activate_row( $plugin_meta, $file, $plugin_data, $context ) {
    	if ( !is_site_admin() )
    		return $plugin_meta;
    
    	if ( 'sitewide-active' == $context )
    		return $plugin_meta;
    
    	if ( is_plugin_active( $file ) )
    		return $plugin_meta;
    
    	$plugin_meta[] = '<a href="' . wp_nonce_url( admin_url( 'plugins.php?action=activate&sitewide=1&plugin=' . $file ), 'activate-plugin_' . $file ) . '" title="' . __( 'Activate this plugin for all blogs across the entire network' ) . '">&uarr; ' . __( 'Activate Site Wide' ) . '</a>';
    
    	remove_action( 'after_plugin_row','add_sitewide_activate_row', 9, 3 );
    
    	return $plugin_meta;
    }
    add_filter( 'plugin_row_meta', 'scg_add_sitewide_activate_row', 9, 4 );
  2. andrea_r
    Moderator
    Posted 14 years ago #

    It's completely redone in 3.0.

About this Topic

  • Started 14 years ago by dwenaus
  • Latest reply from andrea_r