Skip to content

Instantly share code, notes, and snippets.

@shawnsandy
Last active December 16, 2015 08:59
Show Gist options
  • Save shawnsandy/5410092 to your computer and use it in GitHub Desktop.
Save shawnsandy/5410092 to your computer and use it in GitHub Desktop.
Customizer
<?php
/** create the section */
$cust = Customizer_Settings::add_section('test-section', __('Custom Sections','test'));
/** add text control(s) ***/
Customizer_Settings::add_option($cust, 'test-setting', 'Custom Setting')->customizer();
Customizer_Settings::add_option($cust, 'test-setting-1', 'Another Setting 1')->customizer();
/** add a checkbox control **/
Customizer_Settings::add_option($cust, 'test-setting-2', 'Checkbox Option')->set_control_type('checkbox')->customizer();
Customizer_Settings::add_option($cust, 'test-upload', 'Upload Control')->set_control_type('')->customizer('add_color_control');
Customizer_Settings::add_option($cust, 'image-upload', 'Image Control')->set_control_type('')->customizer('add_image_control');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment