WPDK  1.5.0
WordPress Development Kit
 All Data Structures Files Functions Variables Pages
WPDKThemeCustomize Class Reference

Public Member Functions

 __construct ()
 Construct. More...
 
 customize_preview_init ()
 Init. More...
 
 customize_register ($wp_customize)
 Register. More...
 
 sections ()
 Sections. More...
 
 wp_head ()
 Head. More...
 

Detailed Description

Helper class to init a theme customize

Author
=undo= info@.nosp@m.wpxt.nosp@m.re.me
Date
2014-01-14
Version
1.0.0
Since
1.4.9

Definition at line 78 of file wpdk-theme-customize.php.

Constructor & Destructor Documentation

__construct ( )

Construct.

Create an instance of WPDKThemeCustomize class

Returns
WPDKThemeCustomize

Definition at line 87 of file wpdk-theme-customize.php.

Member Function Documentation

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.

Parameters
WP_Customize_Manager$wp_customizeAn 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() );

Returns
array

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.


The documentation for this class was generated from the following file: