function rootstrap_init() { // If user can't edit theme options, exit if (!current_user_can('edit_theme_options')) { return; } // Loads the required Options Framework classes. require plugin_dir_path(__FILE__) . 'includes/class-rootstrap-options.php'; require plugin_dir_path(__FILE__) . 'includes/class-rootstrap-options-admin.php'; require plugin_dir_path(__FILE__) . 'includes/class-options-interface.php'; require plugin_dir_path(__FILE__) . 'includes/class-options-media-uploader.php'; require plugin_dir_path(__FILE__) . 'includes/class-options-sanitization.php'; // Instantiate the main plugin class. $rootstrap_framework = new rootstrap_framework(); $rootstrap_framework->init(); // Instantiate the options page. $rootstrap_framework_admin = new rootstrap_framework_Admin(); $rootstrap_framework_admin->init(); // Instantiate the media uploader class $rootstrap_framework_media_uploader = new rootstrap_framework_Media_Uploader(); $rootstrap_framework_media_uploader->init(); }
/** * Get the default values for all the theme options * * Get an array of all default values as set in * options.php. The 'id','std' and 'type' keys need * to be defined in the configuration array. In the * event that these keys are not present the option * will not be included in this function's output. * * @return array Re-keyed options configuration array. * */ function get_default_values() { $output = array(); $config =& rootstrap_framework::_rootstrap_options(); foreach ((array) $config as $option) { if (!isset($option['id'])) { continue; } if (!isset($option['std'])) { continue; } if (!isset($option['type'])) { continue; } if (has_filter('rootstrap_sanitize_' . $option['type'])) { $output[$option['id']] = apply_filters('rootstrap_sanitize_' . $option['type'], $option['std'], $option); } } return $output; }