Exciting News! Flipper Code is now WePlugins! Same commitment to excellence, brand new identity.

How to use manage_plugins_custom_column action in WordPress

Sandeep Kumar Mishra
Sandeep Kumar Mishra
May 16, 2023
5 minutes read

Working with WordPress hooks can be quite exciting, especially when you’re looking to customize or extend the functionality of your website. Today, let’s explore the manage_plugins_custom_column action. This hook is particularly useful when you want to interact with each custom column in the Plugins list table.

This hook fires inside each custom column of the Plugins list table. To use the manage_plugins_custom_column action, you first need to register it using add_action. You can write this code into the functions.php of your activated theme or in a custom WordPress Plugin. At WePlugins, we always prefer creating a custom WordPress Plugin while using hooks so that nothing breaks when you update your WordPress Theme in the future.

Sometimes, you might need to remove a registered hook, and for that, you can use remove_action to remove the manage_plugins_custom_column action.

Example 1: Basic Hook Implementation

Here’s a basic example of how to implement this hook.

    function weplugins_execute_on_manage_plugins_custom_column_event($column_name, $plugin_file, $plugin_data){
       // Custom code to execute on this action
    }
    // Add the action
    add_action( "manage_plugins_custom_column", "weplugins_execute_on_manage_plugins_custom_column_event" , 10, 3);
    

Example 2: Removing the Hook

To remove a hook callback, use the example below.

    remove_action( "manage_plugins_custom_column", "weplugins_execute_on_manage_plugins_custom_column_event", 10, 3 );
    

Ensure you provide the same callback function name, priority, and number of arguments while removing the hook callback.

Example 3: Advanced Customization

In this advanced example, we demonstrate how to use the parameters received in the function arguments to customize the functionality further.

    function weplugins_advanced_manage_plugins_custom_column($column_name, $plugin_file, $plugin_data){
       if ($column_name === 'custom_column_name') {
           echo 'Custom data for ' . $plugin_data['Name'];
       }
    }
    add_action( "manage_plugins_custom_column", "weplugins_advanced_manage_plugins_custom_column" , 10, 3);
    

If you’re having any trouble using this hook or need customization, please Contact Us. Our team at WePlugins would be happy to assist you.

Access Premium WordPress Plugins

Sandeep Kumar Mishra

Sandeep Kumar Mishra

Sandeep Kumar Mishra writes about WordPress and Artificial Intelligence, offering tips and guides to help you master your website and stay updated with the latest tech trends.

Explore the latest in WordPress

Trying to stay on top of it all? Get the best tools, resources and inspiration sent to your inbox every Wednesday.