Last active
August 29, 2015 13:56
-
-
Save tomharrigan/8909338 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function woo_options_add($options) { | |
| global $woo_options; | |
| $homepage_slide_options = array( __( 'Select a number:', 'woothemes' ) ); | |
| $total_possible_slides = 10; | |
| for ( $i = 1; $i <= $total_possible_slides; $i++ ) { $homepage_slide_options[] = $i; } | |
| $shortname = 'woo'; | |
| $options[] = array( 'name' => __( 'Advanced Homepage Options', 'woothemes' ), | |
| 'icon' => 'misc', | |
| 'type' => 'heading'); | |
| $options[] = array( "name" => __( 'Enable WooSlider on Homepage', 'woothemes' ), | |
| "desc" => __( 'Display WooSlider on the homepage', 'woothemes' ), | |
| "id" => $shortname."_homepage_enable_slider", | |
| "std" => "false", | |
| "type" => "checkbox" ); | |
| $options[] = array( "name" => __( 'Slideshow type', 'woothemes' ), | |
| "desc" => __( 'What post type would you like to display?', 'woothemes' ), | |
| "id" => $shortname."_homepage_slide_type", | |
| "type" => "select2", | |
| "options" => array( "posts" => __( 'Posts Slideshow', 'woothemes' ), "slides" => __( 'Slides Slideshow', 'woothemes' ) ) ); | |
| $options[] = array( 'name' => __( 'Number of slides', 'woothemes' ), | |
| 'desc' => __( 'Choose the number of slides for your slider', 'woothemes' ), | |
| 'id' => $shortname."_homepage_slide_number", | |
| 'std' => "5", | |
| 'type' => 'select2', | |
| 'options' => $homepage_slide_options); | |
| $options[] = array( "name" => __( 'Enable Features', 'woothemes' ), | |
| "desc" => __( 'Display Features on the homepage', 'woothemes' ), | |
| "id" => $shortname."_homepage_enable_features", | |
| "std" => "false", | |
| "type" => "checkbox" ); | |
| return $options; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment