widget_customizer_setting_args
Filter HookDescription
Filters the common arguments supplied when constructing a Customizer setting.Hook Information
File Location |
wp-includes/class-wp-customize-widgets.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1027 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$args
|
Array of Customizer setting arguments. |
string
|
$id
|
Widget setting ID. |
Usage Examples
Basic Usage
<?php
// Hook into widget_customizer_setting_args
add_filter('widget_customizer_setting_args', 'my_custom_filter', 10, 2);
function my_custom_filter($args, $id) {
// Your custom filtering logic here
return $args;
}
Source Code Context
wp-includes/class-wp-customize-widgets.php:1027
- How this hook is used in WordPress core
<?php
1022 * @see WP_Customize_Setting
1023 *
1024 * @param array $args Array of Customizer setting arguments.
1025 * @param string $id Widget setting ID.
1026 */
1027 return apply_filters( 'widget_customizer_setting_args', $args, $id );
1028 }
1029
1030 /**
1031 * Ensures sidebar widget arrays only ever contain widget IDS.
1032 *
PHP Documentation
<?php
/**
* Filters the common arguments supplied when constructing a Customizer setting.
*
* @since 3.9.0
*
* @see WP_Customize_Setting
*
* @param array $args Array of Customizer setting arguments.
* @param string $id Widget setting ID.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/class-wp-customize-widgets.php
Related Hooks
Related hooks will be displayed here in future updates.