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 Widget
      • wp_version (string): The WordPress version, derived from the global $wp_version variable
      • output (array): The WordPress version, derived from the global $wp_version variable
        • priority_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_Query
          • Default: 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: Filter
  • Parameters:
    • $data (array): Conductor Widget localization data
  • Return Value: array



The following example demonstrates how to add custom data to the Conductor Widget localized data.