Change plugin descriptions

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:
Change plugin descriptions

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?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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..

Method 2

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/
 *
 */


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x