PHP Class WPDKThemeCustomize

Since: 1.4.9
Author: =undo= ([email protected])
Show file Open project: wpxtreme/wpdk

Public Methods

Method Description
__construct ( ) : WPDKThemeCustomize Create an instance of WPDKThemeCustomize class
customize_preview_init ( ) This outputs the javascript needed to automate the live settings preview.
customize_register ( WP_Customize_Manager $wp_customize ) 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.
sections ( ) : array Return an array of sections. You can set this array in two ways:
wp_head ( ) This will output the custom WordPress settings to the live theme's WP head.

Method Details

__construct() public method

Create an instance of WPDKThemeCustomize class
public __construct ( ) : WPDKThemeCustomize
return WPDKThemeCustomize

customize_preview_init() public method

Also keep in mind that this function isn't necessary unless your settings are using 'transport'=>'postMessage' instead of the default 'transport' => 'refresh'

customize_register() public method

Note: To enable instant preview, we have to actually write a bit of custom javascript. See live_preview() for more.
public customize_register ( WP_Customize_Manager $wp_customize )
$wp_customize WP_Customize_Manager An instance of WP_Customize_Manager class

sections() public method

$sections = array( 'id_section' => array( args... ) ); OR $sections = array( new WP_Customize_Section() );
public sections ( ) : array
return array

wp_head() public method

This will output the custom WordPress settings to the live theme's WP head.
public wp_head ( )