Files
laipower/wp-content/themes/consultstreet/inc/customizer/custom-customizer/consultstreet-customizer-section.php
150954cc22a2 5b00b3620a consultstreet
2026-07-22 07:53:11 +00:00

62 lines
1.3 KiB
PHP

<?php
/**
* Extend default customizer section.
*
* @package consultstreet
*
* @see WP_Customize_Section
* @access public
*/
if ( class_exists( 'WP_Customize_Section' ) ) {
/**
* Class ConsultStreet_Customize_Section
*/
class ConsultStreet_Customize_Section extends WP_Customize_Section {
/**
* Section.
*
* @var string
*/
public $section;
/**
* Type of this section.
*
* @var string
*/
public $type = 'consultstreet_section';
/**
* Gather the parameters passed to client JavaScript via JSON.
*
* @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',
'panel',
'type',
'description_hidden',
'section',
) );
$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;
if ( $this->panel ) {
$array['customizeAction'] = sprintf( 'Customizing &#9656; %s', esc_html( $this->manager->get_panel( $this->panel )->title ) );
} else {
$array['customizeAction'] = 'Customizing';
}
return $array;
}
}
}