Question

Is it possible to programmatically change the plugin descriptions otherwise provided by the plugin author? The text I've highlighted below is what I'm talking about wanting to change: Plugin description

I often find most plugins have fairly useless descriptions, and it would be useful to use this area to actually describe what we're using the plugin for. None of the plugins (I've tried) that allow you to write notes for other plugins deliver a satisfactory solution.

Any ideas?

Was it helpful?

Solution

Yes, there is a filter you can use — all_plugins:

apply_filters( 'all_plugins', array $all_plugins )

Filters the full array of plugins to list in the Plugins list table.

And here's an example which changes the description of the Akismet plugin:

add_filter( 'all_plugins', 'my_all_plugins' );
function my_all_plugins( $all_plugins ) {
    // the & means we're modifying the original $all_plugins array
    foreach ( $all_plugins as $plugin_file => &$plugin_data ) {
        if ( 'Akismet Anti-Spam' === $plugin_data['Name'] ) {
            $plugin_data['Description'] = 'My awesome description';
        }
    }

    return $all_plugins;
}

But yes, the above hook runs on the Plugins list table only..

*my_all_plugins is just an example name. You should use a better one..

OTHER TIPS

It is possible by opening plugin directory , in there find file name plugin-name.php , open it with editor and you should see :

/**
 * Plugin Name: Your Plugin
 * Plugin URI:  Plugin Uri (url ) 
 * Description: Your custom description.
 * Version:     1.0.1
 * Author:      Your Name
 * Author URI:  Your Site
 * License:     GPL2+
 * Text Domain: translate-string
 * Domain Path: /languages/
 *
 */
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top