WP_Customize_Panel::render_template() WordPress Method

The WP_Customize_Panel::render_template() method is used to render the template for a Customizer panel. This method is used internally by the Customizer API and should not be called directly.

WP_Customize_Panel::render_template() #

An Underscore (JS) template for rendering this panel’s container.


Description

Class variables for this panel class are available in the data JS object; export custom variables by overriding WP_Customize_Panel::json().

Top ↑

See also


Top ↑

Source

File: wp-includes/class-wp-customize-panel.php

	protected function render_template() {
		?>
		<li id="accordion-panel-{{ data.id }}" class="accordion-section control-section control-panel control-panel-{{ data.type }}">
			<h3 class="accordion-section-title" tabindex="0">
				{{ data.title }}
				<span class="screen-reader-text"><?php _e( 'Press return or enter to open this panel' ); ?></span>
			</h3>
			<ul class="accordion-sub-container control-panel-content"></ul>
		</li>
		<?php
	}


Top ↑

Changelog

Changelog
VersionDescription
4.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.