customize_dynamic_setting_args WordPress Filter Hook

The customize_dynamic_setting_args hook allows you to customize the arguments for a dynamic setting. This hook is useful for setting up a dynamic setting with custom arguments, such as a default value or a custom sanitization callback.

apply_filters( 'customize_dynamic_setting_args', false|array $setting_args, string $setting_id ) #

Filters a dynamic setting’s constructor args.


Description

For a dynamic setting to be registered, this filter must be employed to override the default false value with an array of args to pass to the WP_Customize_Setting constructor.


Top ↑

Parameters

$setting_args

(false|array)The arguments to the WP_Customize_Setting constructor.

$setting_id

(string)ID for dynamic setting, usually coming from $_POST['customized'].


Top ↑

Source

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

View on Trac



Top ↑

Changelog

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

Show More