Code is Poetry.
WordPress' code just... wasn't. This is now dealt with. Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS. Fixes #41057. Built from https://develop.svn.wordpress.org/trunk@42343 git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -152,7 +152,7 @@ class WP_Customize_Panel {
|
||||
}
|
||||
|
||||
$this->manager = $manager;
|
||||
$this->id = $id;
|
||||
$this->id = $id;
|
||||
if ( empty( $this->active_callback ) ) {
|
||||
$this->active_callback = array( $this, 'active_callback' );
|
||||
}
|
||||
@@ -170,7 +170,7 @@ class WP_Customize_Panel {
|
||||
* @return bool Whether the panel is active to the current preview.
|
||||
*/
|
||||
final public function active() {
|
||||
$panel = $this;
|
||||
$panel = $this;
|
||||
$active = call_user_func( $this->active_callback, $this );
|
||||
|
||||
/**
|
||||
@@ -208,11 +208,11 @@ class WP_Customize_Panel {
|
||||
* @return array The array to be exported to the client as JSON.
|
||||
*/
|
||||
public function json() {
|
||||
$array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'type' ) );
|
||||
$array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
|
||||
$array['content'] = $this->get_content();
|
||||
$array['active'] = $this->active();
|
||||
$array['instanceNumber'] = $this->instance_number;
|
||||
$array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'type' ) );
|
||||
$array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
|
||||
$array['content'] = $this->get_content();
|
||||
$array['active'] = $this->active();
|
||||
$array['instanceNumber'] = $this->instance_number;
|
||||
$array['autoExpandSoleSection'] = $this->auto_expand_sole_section;
|
||||
return $array;
|
||||
}
|
||||
@@ -318,7 +318,7 @@ class WP_Customize_Panel {
|
||||
<script type="text/html" id="tmpl-customize-panel-<?php echo esc_attr( $this->type ); ?>">
|
||||
<?php $this->render_template(); ?>
|
||||
</script>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -358,10 +358,12 @@ class WP_Customize_Panel {
|
||||
<li class="panel-meta customize-info accordion-section <# if ( ! data.description ) { #> cannot-expand<# } #>">
|
||||
<button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></button>
|
||||
<div class="accordion-section-title">
|
||||
<span class="preview-notice"><?php
|
||||
<span class="preview-notice">
|
||||
<?php
|
||||
/* translators: %s: the site/panel title in the Customizer */
|
||||
echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' );
|
||||
?></span>
|
||||
?>
|
||||
</span>
|
||||
<# if ( data.description ) { #>
|
||||
<button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
|
||||
<# } #>
|
||||
|
||||
Reference in New Issue
Block a user