WP_Customize_Section::active_callback() WordPress Method
The WP_Customize_Section::active_callback() method is used to determine whether a Customizer section should be displayed or hidden. This is useful for showing or hiding sections based on certain conditions, such as whether a certain plugin is active. The active_callback() method takes a single boolean parameter, which determines whether the section should be shown or hidden. If the parameter is true, the section will be shown; if it is false, the section will be hidden.
WP_Customize_Section::active_callback() #
Default callback used when invoking WP_Customize_Section::active().
Contents
Description
Subclasses can override this with their specific logic, or they may provide an ‘active_callback’ argument to the constructor.
Return
(true) Always true.
Source
File: wp-includes/class-wp-customize-section.php
public function active_callback() { return true; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.1.0 | Introduced. |