Your SlideShare is downloading. ×
0
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Wc no
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Wc no

1,964

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,964
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. The Power of Option Frameworks
  • 2. Me, myself and WordPress
  • 3. WordPress Themes
  • 4. And even better ones
  • 5. Option frameworks
  • 6. Option frameworks Creating theme options never been easier Sanitization and Validation Easier to reuse Fancy option fields
  • 7. Options Framework Plugindemo-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. of_get_option(example_text_mini, noentry);
  • 9. NHP Theme Options Framework
  • 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. global $NHP_Options;$NHP_Options = new NHP_Options($sections,$args);->get & show methods
  • 12. ProPanel
  • 13. $sample_text_field =get_option(yourtheme_sample_text_field);echo $sample_text_field;
  • 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. if ($cap->my_boolean_option) {// do stuff}
  • 16. Up Themes Frameworkif( file_exists(get_template_directory()./options/options.php) ) include_once(get_template_directory()./options/options.php);register_theme_options();register_theme_options_tab();
  • 17. Up Themes Framework$options = array("font_color" => array( "tab" => "colors_and_images", "name" => "font_color", "title" => "Font Color", "description" => __( "Select a font colorfor your theme", "example" ), "section" => "color_scheme", "since" => "1.0", "id" => "color_scheme", "type" => "text", "default" => "Copyright 2012 UpThemes" ));
  • 18. Comparison Updates and support  Variety of needed options  Reusing
  • 19. Contacts @iv_wp http://it.ivdimova.com http://www.linkedin.com/in/ivdimov a

×