WP_Customize_Panel::maybe_render() WordPress Method
The WP_Customize_Panel::maybe_render() method is used to determine whether a panel should be rendered. This is done by checking if the panel has any active settings, and if so, whether the panel is included in the current panels to be rendered.
WP_Customize_Panel::maybe_render() #
Check capabilities and render the panel.
Source
File: wp-includes/class-wp-customize-panel.php
final public function maybe_render() { if ( ! $this->check_capabilities() ) { return; } /** * Fires before rendering a Customizer panel. * * @since 4.0.0 * * @param WP_Customize_Panel $panel WP_Customize_Panel instance. */ do_action( 'customize_render_panel', $this ); /** * Fires before rendering a specific Customizer panel. * * The dynamic portion of the hook name, `$this->id`, refers to * the ID of the specific Customizer panel to be rendered. * * @since 4.0.0 */ do_action( "customize_render_panel_{$this->id}" ); $this->render(); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |