Use an {eac}Doojigger extension in your derivative plugin (myAwesomPlugin).
Document Header
Homepage:https://eacDoojigger.earthasylum.com/
Author:EarthAsylum Consulting
Last Updated:09-May-2025
Contributors:EarthAsylum Consulting, Kevin Burkholder
Requires {eac}Doojigger:3.1.2
WordPress URI:https://wordpress.org/plugins/search/earthasylum/
GitHub URI:https://github.com/EarthAsylum/docs.eacDoojigger/wiki/
Clone an eacDoojigger Doololly Extension
Let's say you want to use the session manager included with {eac}Doojigger as an extension to your own plugin (myAwesomePlugin).
Create session_manager.extension.class.php
in your myAwesomePlugin Extensions
folder:
namespace myAwesomeNamespace\Extensions;
if ( class_exists('\EarthAsylumConsulting\Extensions\session_extension') )
{
return new \EarthAsylumConsulting\Extensions\session_extension($this);
}
This works for extensions included with {eac}Doojiger but what about extension plugins? Let's try eacMetaPixel to add Facebook tracking to your plugin...
(almost the same but the auto-loader may not know where to find the extension if it hasn't been loaded yet.)
Create metapixel.extension.php
in your myAwesomePlugin Extensions
folder:
namespace myAwesomeNamespace\Extensions;
if ( class_exists('\EarthAsylumConsulting\Extensions\metapixel_extension') )
{
return new metapixel_extension($this);
}
if ( file_exists(WP_PLUGIN_DIR.'/eacmetapixel/Extensions/metapixel.extension.php') )
{
return require(WP_PLUGIN_DIR.'/eacmetapixel/Extensions/metapixel.extension.php');
}
This will load the metapixel extension, if it is installed, whether or not it is activated.
In both, the extension will be loaded by and will extend your plugin. Extension settings will be added to your options page and those settings will be stored with your plugin settings, prefixed with your plugin name.