Description
This filter is used to change the localized data output for Conductor Widgets in the WordPress admin.
This filter is executed when the admin_enqueue_scripts hook is triggered.
Conductor Widget Default Localized Data Structure (Array Keys and Values):
The following list outlines the default values for Conductor Widget localized data.
Note: This localized data is assigned to the conductor JavaScript variable.
widgets (array):conductor (string, array): The Conductor Widgetwp_version (string): The WordPress version, derived from the global $wp_version variableoutput (array): The WordPress version, derived from the global $wp_version variablepriority_step_size (int): The step sized used between priorities for Conductor Widget output elements; the priority value for output elements is used in the add_action() call; See Conductor_Widget_QueryDefault: 10
- displays (array): Conductor Widget displays
sidebars (array): Registered sidebars, derived from the global $wp_registered_sidebars variable- before_widget_regex (string): The regular expression for matching the ID attribute in the before_widget argument of registered sidebars; used to grab the CSS ID and populate the CSS ID Conductor Widget setting
Default: id=['|"](.*?[\%1\$s])['|"]
is_customizer (Boolean): Whether or not we're in the Customizer, derived from did_action( 'customize_controls_init' )Default: true if in the Customizer, false if in the WordPress admin
l10n (array): Localization strings for use in JavaScript
Technical Details
Type: FilterParameters:$data (array): Conductor Widget localization data
Return Value: array
Resources
- View on GitHub
Class: Conductor_Widget
conductor_widget_defaultsconductor_widget_updateconductor_widget_instance
Examples
The following example demonstrates how to add custom data to the Conductor Widget localized data.