WordPress.org

Ready to get started?Download WordPress

Forums

Network Plugin Auditor
[resolved] Small error (9 posts)

  1. Gabriel Reguly
    Member
    Posted 2 years ago #

    Hi,

    Thanks for the wonderful plugin.

    I have found and fixed a small error: because code does not check if the current column is the custom column added, the plugin displays it's info at every custom column that may exist.

    Follows fix for functions manage_plugins_custom_column and manage_sites_custom_column:

    function manage_plugins_custom_column( $column_name, $plugin_file, $plugin_data ) {
    		if ( $column_name == 'active_blogs' ) {
    
    			$output = '<ul>';
    
    			// Is this plugin network activated
    			$active_on_network = is_plugin_active_for_network( $plugin_file );
    			if ( $active_on_network ) {
    				$output .= '<li>Network Activated</li>';
    			}
    
    			// Is this plugin Active on any blogs in this network?
    			$active_on_blogs = $this->is_plugin_active_on_blogs( $plugin_file );
    
    			// Loop through the blog list, gather details and append them to the output string
    			foreach ( $active_on_blogs as $blog ) {
    
    				$blog_details = get_blog_details( $blog, true );
    
    				$blog_url  = $blog_details->siteurl;
    				$blog_name = $blog_details->blogname;
    
    				$output .= '<li><nobr><a title="Manage plugins on '.$blog_name.'" href="'.$blog_url.'/wp-admin/plugins.php">' . $blog_name . '</a></nobr></li>';
    			}
    
    			$output .= '</ul>';
    			echo $output;
    		}
        }
    function manage_sites_custom_column( $column_name, $blog_id ) {
    		if ( $column_name == 'active_plugins' ) {
    			$output = '<ul>';
    			// Get the active plugins for this blog_id
    			$plugins_active_here = $this->get_active_plugins( $blog_id );
    			$plugins_active_here = maybe_unserialize( $plugins_active_here );
    
    			foreach ( $plugins_active_here as $plugin ) {
    				$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
    				$plugin_name = $plugin_data['Name'];
    				$plugin_url  = $plugin_data['PluginURI'];
    
    				if ( isset($plugin_url) ) {
    					$output .= '<li><a href="' . $plugin_url . '" title="Visit the plugin url: ' . $plugin_url . '">' . $plugin_name . '</a></li>';
    
    				} else {
    					$output .= '<li>' . $plugin_name . '</li>';
    				}
    			}
    			$output .= '</ul>';
    			echo $output;
    		}
        }

    Regards,
    Gabriel

    http://wordpress.org/extend/plugins/network-plugin-auditor/

  2. Katherine Semel-Munson
    Member
    Plugin Author

    Posted 2 years ago #

    Excellent catch! Thank you, I'll put in a bug fix right away.

    - Kathy

  3. Gabriel Reguly
    Member
    Posted 2 years ago #

    Just for the record, the plugin author accepted the bug fix and released a new version.

    Thank you Kathy for the prompt action.

  4. Katherine Semel-Munson
    Member
    Plugin Author

    Posted 2 years ago #

    I could have sworn I replied here last night, but it seems not. :(

    Thanks for the great catch, Gabriel! I gave you a shout-out in my change log. :)

  5. Sorry, you got caught by our spam catcher, ksemel.

  6. Gabriel Reguly
    Member
    Posted 2 years ago #

    Thanks Ipstenu,

    I was wondering why I kept receiving ksmel's messages but they were not showing here.

  7. Gabriel Reguly
    Member
    Posted 2 years ago #

    ... and thank you Kathy for the shout-out, I have seen it when updating the plugin :-)

  8. mediacolours786
    Member
    Posted 1 year ago #

    Hi i have a small problem

    can any one tell me how to edit the New Subscriber notification message text

    suppose:

    this the subject: A contact has joined your mailing list, which i want to change.

    and i even want to add the Subscriber IP address and Country Name also in the email.

    can any one please tell me how to do it.

    thanks

    Mahendra

  9. Katherine Semel-Munson
    Member
    Plugin Author

    Posted 1 year ago #

    @mediacolours786 I think you're looking for a different plugin's forum. The Network Plugin Auditor doesn't have any associated emails. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic