wc no
TRANSCRIPT
The Power of Option Frameworks
Me, myself and WordPress
WordPress Themes
And even better ones
Option frameworks
Creating theme options never been easier
Sanitization and Validation
Easier to reuse
Fancy option fields
Option frameworks
Options Framework Plugin
demo-theme/options.php => theme root folder
$multicheck_array = array(
'one' => __('French Toast', 'options_check'),
'two' => __('Pancake', 'options_check'),
'three' => __('Omelette', 'options_check'),
'four' => __('Crepe', 'options_check'),
'five' => __('Waffle', 'options_check')
);
of_get_option('example_text_mini', 'no entry');
NHP Theme Options Framework
functions.php -> get_template_part('nhp', 'options');
nhp-options.php:
array('id' => '4','type' => 'text','title' => __('Text Option - Numeric Validated', 'nhp-opts'),
'sub_desc' => __('Numeric.', 'nhp-opts'),'desc' => __('Description.', 'nhp-opts'),'validate' => 'numeric','std' => '0','class' => 'small-text'
),
global $NHP_Options;$NHP_Options = new NHP_Options($sections, $args);->get & show methods
ProPanel
$sample_text_field = get_option('yourtheme_sample_text_field');echo $sample_text_field;
CheezCap require_once('cheezcap/cheezcap.php');
cheezcap/config.php:
new BooleanOption(
'Simple Boolean Example',
'This will create a simple true/false switch with default of "true".',
'simple_boolean_example',
true
),
if ($cap->my_boolean_option) {// do stuff}
Up Themes Framework
if( file_exists(get_template_directory().
'/options/options.php') )
include_once(get_template_directory().
'/options/options.php');
register_theme_options();
register_theme_options_tab();
Up Themes Framework
$options = array("font_color" => array( "tab" => "colors_and_images", "name" => "font_color", "title" => "Font Color", "description" => __( "Select a font color for your theme", "example" ), "section" => "color_scheme", "since" => "1.0", "id" => "color_scheme", "type" => "text", "default" => "Copyright 2012 UpThemes" ));
Comparison
Updates and support
Variety of needed options
Reusing
Contacts @iv_wp http://it.ivdimova.com http://www.linkedin.com/in/ivdimova