json['label'] = esc_html( $this->label ); $this->json['text'] = $this->text; $this->json['help'] = $this->help; $this->json['name'] = $this->name; $config = array(); if ( isset( Astra_Customizer::$group_configs[ $this->name ]['tabs'] ) ) { $tab = array_keys( Astra_Customizer::$group_configs[ $this->name ]['tabs'] ); foreach ( $tab as $key => $value ) { $config['tabs'][ $value ] = wp_list_sort( Astra_Customizer::$group_configs[ $this->name ]['tabs'][ $value ], 'priority' ); } } else { if ( isset( Astra_Customizer::$group_configs[ $this->name ] ) ) { $config = wp_list_sort( Astra_Customizer::$group_configs[ $this->name ], 'priority' ); } } $this->json['ast_fields'] = $config; } /** * An Underscore (JS) template for this control's content (but not its container). * * Class variables for this control class are available in the `data` JS object; * export custom variables by overriding {@see WP_Customize_Control::to_json()}. * * @see WP_Customize_Control::print_template() * * @access protected */ protected function content_template() { ?>