Skip to content

Commit

Permalink
Add API method for checking if plugins are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
amyreese committed Oct 5, 2009
1 parent 3ee223c commit 559417e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/plugin_api.php
Expand Up @@ -328,6 +328,19 @@ function plugin_child( $p_child ) {
}

# ## Plugin Management Helpers

/**
* Checks if a given plugin has been registered and initialized,
* and returns a boolean value representing the "loaded" state.
* @param string Plugin basename
* @return boolean Plugin loaded
*/
function plugin_is_loaded( $p_basename ) {
global $g_plugin_cache_init;

return ( isset( $g_plugin_cache_init[ $p_basename ] ) && $g_plugin_cache_init[ $p_basename ] );
}

/**
* Converts a version string to an array, using some punctuation and
* number/lettor boundaries as splitting points.
Expand Down

0 comments on commit 559417e

Please sign in to comment.