Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Created September 18, 2022 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shelob9/434b658f6dd36636773ab7fa9c716a1c to your computer and use it in GitHub Desktop.
Save Shelob9/434b658f6dd36636773ab7fa9c716a1c to your computer and use it in GitHub Desktop.
<?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