예제 #1
0
function options($option = null)
{
    static $options;
    if (!isset($options)) {
        $options = \Roots\Soil\Options::getByFile(__FILE__) + ['', 'wp_footer'];
        $options['gaID'] =& $options[0];
        $options['hook'] =& $options[1];
    }
    return is_null($option) ? $options : $options[$option];
}
예제 #2
0
파일: soil.php 프로젝트: rku4er/gt-wp
function load_modules()
{
    global $_wp_theme_features;
    foreach (glob(__DIR__ . '/modules/*.php') as $file) {
        $feature = 'soil-' . basename($file, '.php');
        if (isset($_wp_theme_features[$feature])) {
            Options::init($feature, $_wp_theme_features[$feature]);
            require_once $file;
        }
    }
}