Пример #1
0
 /**
  * Returns the plugin names
  * 
  * Returns a cached array of $plugins. 
  * We expect there to be at least one.
  * 
  * @return array $plugins 
  */
 function _bw_get_plugins()
 {
     static $plugins = null;
     if (!$plugins) {
         $plugin_slugs = bw_get_plugin_slugs();
         //oik_require( "admin/oik-depends.inc" );
         oik_require_lib("oik-depends");
         $plugins = bw_get_all_plugin_names($plugin_slugs);
     }
     return $plugins;
 }
Пример #2
0
 /**
  * Return an array of ALL active plugins - for single or multisite 
  *
  * @return associative array
  * 
  */
 function bw_get_active_plugins()
 {
     $active_plugins = get_option('active_plugins');
     //bw_trace2( $active_plugins, "active plugins" );
     $names = bw_get_all_plugin_names($active_plugins);
     if (is_multisite()) {
         $active_plugins = get_site_option('active_sitewide_plugins');
         $ms_names = bw_ms_get_all_plugin_names($active_plugins);
         //bw_trace2( $ms_names, "ms plugin names" );
         $names = array_merge($names, $ms_names);
     }
     //bw_trace2( $names, "active plugin names" );
     //bw_backtrace();
     return $names;
 }