Created
September 18, 2022 01:43
-
-
Save Shelob9/434b658f6dd36636773ab7fa9c716a1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Static accessor for plugin container | |
* | |
* @return array | |
*/ | |
function wordpress_plugin() | |
{ | |
static $container; | |
if (!$container) { | |
$container = []; | |
/** | |
* Action runs when PLUGIN_NAME is initialized | |
* | |
* @param array $container Plugin container | |
*/ | |
do_action('wordpress_plugin', $container); | |
} | |
return $container; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment