Esempio n. 1
0
 /**
  * Load registered plugins
  * 
  * We don't override the values that the user has defined with the hardcoded values.
  * We only apply the hardcoded values when the profile entry does not exist.
  * 
  * @return array of registered plugins and their overrides
  */
 function _oik_plugins_load_registered_plugins()
 {
     $bw_plugins = get_option("bw_plugins");
     global $bw_registered_plugins;
     //bw_trace2( $bw_registered_plugins );
     if (is_array($bw_registered_plugins) && count($bw_registered_plugins)) {
         foreach ($bw_registered_plugins as $plugin => $plugin_data) {
             $plugin = oik_update::bw_last_path($plugin_data['file']);
             //bw_trace2( $plugin );
             //bw_trace2( $plugin_data );
             if (!isset($bw_plugins[$plugin])) {
                 $bw_plugins[$plugin] = $plugin_data;
             }
             $bw_plugins[$plugin]['programmatically_registered'] = true;
         }
     }
     //bw_trace2( $bw_plugins );
     return $bw_plugins;
 }
Esempio n. 2
0
 /**
  * Load registered themes
  * 
  * We don't override the values that the user has defined with the hardcoded values
  * Only apply the hardcoded values when the profile entry does not exist.
  * 
  * @return array of registered themes and their overrides
  */
 function _oik_themes_load_registered_themes()
 {
     $bw_themes = get_option("bw_themes");
     global $bw_registered_themes;
     if (is_array($bw_registered_themes) && count($bw_registered_themes)) {
         foreach ($bw_registered_themes as $theme => $theme_data) {
             $theme = oik_update::bw_last_path($theme_data['file']);
             bw_trace2($theme);
             if (!isset($bw_themes[$theme])) {
                 $bw_themes[$theme] = $theme_data;
             }
             $bw_themes[$theme]['programmatically_registered'] = true;
         }
     }
     return $bw_themes;
 }