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().


Description

Subclasses can override this with their specific logic, or they may provide an ‘active_callback’ argument to the constructor.


Top ↑

Return

(true) Always true.


Top ↑

Source

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

	public function active_callback() {
		return true;
	}

Top ↑

Changelog

Changelog
VersionDescription
4.1.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.