コード例 #1
0
/**
 * bf_get_option() - Get Option Function
 * 
 * Retrieves the option based on the ID given.
 * 
 * @access	public
 * @since	0.5.2
 * @return 	mixed			Option data
 * @param	string	$name	Name of the option
 */
function bf_get_option($name)
{
    global $bf_options;
    if (!is_object($bf_options)) {
        bf_flush_options();
    }
    return $bf_options->{$name};
}
コード例 #2
0
$theme_data = get_theme(get_current_theme());
// Define PHP file constants.
define(BF_DIR, TEMPLATEPATH);
define(BF_LIB, BF_DIR . '/includes');
define(THEME_VERSION, $theme_data['Version']);
// Not sure whether the filter will work.
define(THEME_ID, apply_filters('bf_theme_id', 'buffet'));
// Load library files.
require_once BF_LIB . '/core.php';
require_once BF_LIB . '/actions.php';
require_once BF_LIB . '/filters.php';
require_once BF_LIB . '/helpers.php';
require_once BF_LIB . '/template.php';
require_once BF_LIB . '/widgets.php';
// Load theme options.
require_once BF_LIB . '/options.php';
bf_flush_options();
// Load admin files.
if (is_admin()) {
    require_once BF_LIB . '/admin.php';
}
// Load extensions.
require_once BF_LIB . '/extensions.php';
require_once BF_LIB . '/extensions/default-extensions.php';
// Finally, load the launcher.
require_once BF_LIB . '/launcher.php';
// Not sure if this action will be useful here.
// The extensions file is using this though.
do_action('bf_init');
/* End of file functions.php */
/* Location: ./functions.php */
コード例 #3
0
ファイル: admin.php プロジェクト: jagtesh/op_theme
/**
 * {@internal Missing Short Description }}
 * 
 * {@internal Missing Long Description }}
 * 
 * @ignore
 * @since	0.5.2
 */
function bf_admin_load_reset()
{
    delete_option(THEME_ID . '_options');
    bf_flush_options();
    echo '<div class="updated"><p>' . __('Your settings have been reverted to the defaults.', 'buffet') . '</p></div>';
}