Published on
14 Feb 2025
Updated on
06 Feb 2025
Share

WPMasterToolKit Opens Doors to Addon Creation

A New Opportunity for Developers

WPMasterToolKit takes another step forward by offering developers the possibility of creating their own addons. This openness extends the functionality of the all-in-one plugin, offering tailor-made solutions for WordPress users.

This feature has been added in version 2.3.0 of WPMasterToolKit.

Read also : Read what Enzo from EasyWordPress has to say about WPMasterToolKit

An expanding ecosystem

Thanks to this new approach, developers can now design and integrate their own modules in line with the WPMasterToolKit architecture. This initiative is aimed at enriching the user experience and meeting specific needs without weighing down the plugin core.

An Addon Example Available on GitHub

To accompany this opening, we've made a sample addon available on GitHub : WPMasterToolKit Addon Example. This module illustrates how to develop and integrate an addon to WPMasterToolKit.

Addon features Example

  • Activation and deactivation management The module records its activation and deactivation via the log file.
  • Add a sub-menu A new sub-menu is automatically added to the WordPress administration interface.
  • Dedicated administration page A special page displays module information.
  • Optimized structure : The plugin's architecture respects WordPress development best practices.

Installing the Sample Module

  1. Download the module ZIP file from the repository GitHub.
  2. Go to the WordPress dashboard and click on "Extensions".
  3. Select "Add" then "Upload extension".
  4. Select the ZIP file and click on "Install now".
  5. Activate the module from the list of extensions.
  6. Once activated, a new module will appear in WPMasterToolKit.
Read also : Alexis from WP Origami remakes a video "WPMasterToolKit: the ultimate WordPress extension in 2025?"

Here's what you'll find in this example

The main file wpmastertoolkit-addon-exemple.php

This file is the heart of the plugin and contains the main definitions enabling the addon to work with WPMasterToolKit. It also defines essential constants such as the plugin path and URL.

Example of a main file on github

The plugin declaration

/**
 * @wordpress-plugin
 * Plugin Name: WPMasterToolKit Addon Example
 * Requires Plugins: wpmastertoolkit
 * Plugin URI: https://wpmastertoolkit.com/
 * Description: WPMasterToolKit Addon Exemple is created to show you how to create an addon for WPMasterToolKit.
 * Version: 1.0.0
 * Author: Webdeclic
 * Author URI: https://webdeclic.com
 * License: GPL-2.0+
 * License URI: https://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain: wpmastertoolkit-addon-exemple
 * Domain Path: /languages
 */

This is a classic plugin declaration. You can read more on the official WordPress documentation.

One important thing to note is that the declaration line Requires Plugins: wpmastertoolkit is important to avoid possible bugs in the event of deletion and/or deactivation of the main plugin.

Module data declaration

Next comes the declaration of your example modules:

/**
 * Add modules data to WPMasterToolKit.
 */
add_filter( 'wpmastertoolkit_modules_data', function($modules){
    $modules['Example_Of_New_Module'] = array(
        'original_name' => "Example Of New Module",
        'group' => 'other-features',
        'path' => WPMASTERTOOLKIT_ADDON_EXEMPLE_PLUGIN_PATH . modules/class-example-of-new-module.php',
    );
    return $modules;
});

In this example, here is what the different values correspond to:

  • Example_Of_New_Module Corresponds to the name of the class in your file. It's very important not to make an error, otherwise the module won't work.
  • original_name corresponds to the human-readable English name of your module. Be careful not to put a translatable string here, as this code is called before the WordPress init. For more information, read : Internationalization improvements in 6.7.
  • group Here's a list of existing groups (which can be extended using the filter wpmastertoolkit_modules_groups):
    • administration
    • content-media
    • custom-code
    • disable-features
    • security
    • speed-optimizations
    • woocommerce
    • other-features
  • path The path to your php class file.

Declaration of descriptive texts for your modules

For each module, you must add a title and a description (translatable).

/**
 * Add modules labels to WPMasterToolKit.
 */
add_filter( 'wpmastertoolkit_modules_labels', function($modules){
    $modules['Example_Of_New_Module'] = array(
        'name' => esc_html_x( "Exemple Of New Module", "Module name", 'wpmastertoolkit-addon-exemple' ),
		'desc' => esc_html_x( "Description of the module", "Module description", 'wpmastertoolkit-addon-exemple' ),
    );
    return $modules;
});

The modules/ folder

This folder contains the classes dedicated to the modules. In this example, we find the class-example-of-new-module.phpwhich illustrates how to create a module that complies with WPMasterToolKit standards.

See the sample modules folder on github

The Example_Of_New_Module class

This class defines the addon's functionality:

  • Activation and deactivation management with logs for detailed tracking.
  • Initializing WordPress hooks.
  • Sub-menu added in administration.
  • Display of a dedicated page for the module.
  • etc.

See the example class on github

Application icons near a digital recycle garbage can.
Starter
from
3.50$
/Month
Business
from
6.70$
/Month
Freelance
from
11.00$
/Month
Agency
from
28.00$
/Month

Conclusion

With the possibility of creating addons, WPMasterToolKit is transformed into an even more flexible and scalable platform. This new approach gives developers total freedom to create solutions tailored to the needs of WordPress users.

Join the community and start developing your own addon for WPMasterToolKit today! 

More than 20 reviews
+1000
Installations
106
Modules
Pro
from
30.00$
/Year