Successfully reported this slideshow.

More Related Content

Related Audiobooks

Free with a 14 day trial from Scribd

See all

Wc no

  1. 1. The Power of Option Frameworks
  2. 2. Me, myself and WordPress
  3. 3. WordPress Themes
  4. 4. And even better ones
  5. 5. Option frameworks
  6. 6. Option frameworks  Creating theme options never been easier  Sanitization and Validation  Easier to reuse  Fancy option fields
  7. 7. 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') );
  8. 8. of_get_option('example_text_mini', 'no entry');
  9. 9. NHP Theme Options Framework
  10. 10. 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' ),
  11. 11. global $NHP_Options; $NHP_Options = new NHP_Options($sections, $args); ->get & show methods
  12. 12. ProPanel
  13. 13. $sample_text_field = get_option('yourtheme_sample_text_field'); echo $sample_text_field;
  14. 14. 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 ),
  15. 15. if ($cap->my_boolean_option) { // do stuff }
  16. 16. 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();
  17. 17. 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" ) );
  18. 18. Comparison  Updates and support  Variety of needed options  Reusing
  19. 19. Contacts  @iv_wp  http://it.ivdimova.com  http://www.linkedin.com/in/ivdimov a

×