WP_Customize_Section::maybe_render()publicWP 3.4.0

Check capabilities and render the section.

Метод класса: WP_Customize_Section{}

Возвращает

null. Ничего (null).

Использование

$WP_Customize_Section = new WP_Customize_Section();
$WP_Customize_Section->maybe_render();

Список изменений

С версии 3.4.0 Введена.

Код WP_Customize_Section::maybe_render() WP 6.5.2

final public function maybe_render() {
	if ( ! $this->check_capabilities() ) {
		return;
	}

	/**
	 * Fires before rendering a Customizer section.
	 *
	 * @since 3.4.0
	 *
	 * @param WP_Customize_Section $section WP_Customize_Section instance.
	 */
	do_action( 'customize_render_section', $this );
	/**
	 * Fires before rendering a specific Customizer section.
	 *
	 * The dynamic portion of the hook name, `$this->id`, refers to the ID
	 * of the specific Customizer section to be rendered.
	 *
	 * @since 3.4.0
	 */
	do_action( "customize_render_section_{$this->id}" );

	$this->render();
}