Exemplo n.º 1
0
// Setup translations
// ------------------
load_theme_textdomain('rosa_txtd', wpgrade::themefilepath(wpgrade::confoption('language-path', 'languages')));
// Dynamically load in all classes
// -------------------------------
# Loading convention: if it's a PHP file it's loaded, the shorter the path
# the higher the priority
$classpath = $basepath . 'classes' . DIRECTORY_SEPARATOR;
wpgrade::require_all($classpath);
// Setup Option Drivers
// --------------------
if (wpgrade::confoption('wpml_separate_options', false)) {
    $wpgrade_redux = new wpGrade_Redux();
}
// the handler is the main object responsible for managing the drivers
wpgrade::options_handler(new WPGradeOptions());
# [!!] driver priority works like a LIFO stack, last in = highest priority
// register basic configuration driver
$config = wpgrade::config();
wpgrade::options()->add_optiondriver(new WPGradeOptionDriver_Config($config['theme-options']));
// we register redux as option driver via a resolver
function wpgrade_callback_bootstrap_redux_instance($redux)
{
    $reduxdriver = new WPGradeOptionDriver_Redux($redux);
    wpgrade::options()->add_optiondriver($reduxdriver);
}
wpgrade::register_resolver('redux-instance', 'wpgrade_callback_bootstrap_redux_instance');
// Plugins & Resolvable Dependencies
// ---------------------------------
require wpgrade::themefilepath(wpgrade::confoption('theme-adminpanel-path', 'theme-content/admin-panel') . '/bootstrap' . EXT);
// Hooks
Exemplo n.º 2
0
 /**
  * @param WPGradeOptions option driver manager
  */
 static function options_handler($options_handler)
 {
     self::$options_handler = $options_handler;
 }