Update the Customizer API inline docs.
props ericlewis. fixes #27065. Built from https://develop.svn.wordpress.org/trunk@27398 git-svn-id: http://core.svn.wordpress.org/trunk@27246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Customize Controls
|
||||
* Theme Customize Screen.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Customize
|
||||
@@ -9,7 +9,9 @@
|
||||
|
||||
define( 'IFRAME_REQUEST', true );
|
||||
|
||||
/** Load WordPress Administration Bootstrap */
|
||||
require_once( dirname( __FILE__ ) . '/admin.php' );
|
||||
|
||||
if ( ! current_user_can( 'edit_theme_options' ) )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
|
||||
@@ -199,6 +201,7 @@ do_action( 'customize_controls_print_scripts' );
|
||||
'customize-login' => 1
|
||||
), wp_login_url() );
|
||||
|
||||
// Prepare customizer settings to pass to Javascript.
|
||||
$settings = array(
|
||||
'theme' => array(
|
||||
'stylesheet' => $wp_customize->get_stylesheet(),
|
||||
@@ -227,6 +230,7 @@ do_action( 'customize_controls_print_scripts' );
|
||||
),
|
||||
);
|
||||
|
||||
// Prepare Customize Setting objects to pass to Javascript.
|
||||
foreach ( $wp_customize->settings() as $id => $setting ) {
|
||||
$settings['settings'][ $id ] = array(
|
||||
'value' => $setting->js_value(),
|
||||
@@ -234,6 +238,7 @@ do_action( 'customize_controls_print_scripts' );
|
||||
);
|
||||
}
|
||||
|
||||
// Prepare Customize Control objects to pass to Javascript.
|
||||
foreach ( $wp_customize->controls() as $id => $control ) {
|
||||
$control->to_json();
|
||||
$settings['controls'][ $id ] = $control->json;
|
||||
|
||||
Reference in New Issue
Block a user