W3cubDocs

/WordPress

WP_Customize_Section::maybe_render()

Check capabilities and render the section.

Source

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();
}

Hooks

do_action( ‘customize_render_section’, WP_Customize_Section $section )

Fires before rendering a Customizer section.

do_action( “customize_render_section_{$this->id}” )

Fires before rendering a specific Customizer section.

Changelog

Version Description
3.4.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_section/maybe_render