WPDK
1.5.0
WordPress Development Kit
|
Public Member Functions | |
__construct () | |
Construct. More... | |
customize_preview_init () | |
Init. More... | |
customize_register ($wp_customize) | |
Register. More... | |
sections () | |
Sections. More... | |
wp_head () | |
Head. More... | |
Helper class to init a theme customize
Definition at line 78 of file wpdk-theme-customize.php.
__construct | ( | ) |
Construct.
Create an instance of WPDKThemeCustomize class
Definition at line 87 of file wpdk-theme-customize.php.
customize_preview_init | ( | ) |
Init.
This outputs the javascript needed to automate the live settings preview. Also keep in mind that this function isn't necessary unless your settings are using 'transport'=>'postMessage' instead of the default 'transport' => 'refresh'
Definition at line 107 of file wpdk-theme-customize.php.
customize_register | ( | $wp_customize | ) |
Register.
This hooks into 'customize_register' (available as of WP 3.4) and allows you to add new sections and controls to the Theme Customize screen.
Note: To enable instant preview, we have to actually write a bit of custom javascript. See live_preview() for more.
WP_Customize_Manager | $wp_customize | An instance of WP_Customize_Manager class |
Definition at line 123 of file wpdk-theme-customize.php.
sections | ( | ) |
Sections.
Return an array of sections. You can set this array in two ways:
$sections = array( 'id_section' => array( args... ) );
OR $sections = array( new WP_Customize_Section() );
Definition at line 189 of file wpdk-theme-customize.php.
wp_head | ( | ) |
Head.
This will output the custom WordPress settings to the live theme's WP head.
Definition at line 201 of file wpdk-theme-customize.php.