Skip to content

Commit

Permalink
Version 1.3.0. Support dropdown pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
devinsays committed Feb 8, 2015
1 parent 47b5b77 commit 7ae2a41
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,17 @@ $options['example-select'] = array(
);
~~~

### Drop Down Pages

$options['example-dropdown-pages'] = array(
'id' => 'example-dropdown-pages',
'label' => __( 'Example Drop Down Pages', 'textdomain' ),
'section' => $section,
'type' => 'dropdown-pages',
'default' => ''
);
~~~
### Radio
~~~php
Expand Down Expand Up @@ -335,14 +346,15 @@ if ( $mod != customizer_library_get_default( $setting ) ) {

## Change Log

Development
1.3.0
===

* Enhancement: Add text input option
* Enhancement: Sort system fonts and webfonts within dropdown
* Enhancement: Add Panels Support, from WP 4.0
* Enhancement: Add support for "url" type
* Enhancement: Add support for "range" type
* Enhancement: Add support for "dropdown-pages" type
* Update: Change how setting parameters are added

1.2.0
Expand Down
2 changes: 1 addition & 1 deletion customizer-library.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package Customizer_Library
* @author Devin Price, The Theme Foundry
* @license GPL-2.0+
* @version 1.2.0
* @version 1.3.0
*/

// If this file is called directly, abort.
Expand Down
5 changes: 5 additions & 0 deletions extensions/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function customizer_library_register( $wp_customize ) {
case 'radio':
case 'checkbox':
case 'range':
case 'dropdown-pages':

$wp_customize->add_control(
$option['id'], $option
Expand Down Expand Up @@ -286,6 +287,10 @@ function customizer_library_get_sanitization( $type ) {
return 'customizer_library_sanitize_range';
}

if ( 'dropdown-pages' == $type ) {
return 'absint';
}

// If a custom option is being used, return false
return FALSE;
}

0 comments on commit 7ae2a41

Please sign in to comment.