Home » Docs » Hooks » Filters » Class: Conductor_Widget » conductor_widget_query_callback_prefix

Description

This filter is used to change the output element callback function prefix for output elements in Conductor Widgets before data is stored in the database.

Note: If a value other than the default value (conductor_widget_) is returned, custom callback functions for all output elements must exist (see example below). If a callback function is not declared for a particular output element, that output element will not be displayed.

This filter is executed when the Conductor_Widget::update() function is called (when a Conductor Widget instance is updated/saved).

Technical Details

  • Type: Filter
  • Parameters:
    • $prefix (string): Updated Conductor Widget instance containing data to be saved to the database
    • $new_instance (array): Updated Conductor Widget instance containing data to be saved to the database
    • $old_instance (array): Old Conductor Widget instance
    • $widget (Conductor_Widget): Conductor Widget
  • Default: conductor_widget_

Resources

Examples

The following example demonstrates how to change the Conductor Widget output element callback function prefix and create custom callback functions for each of the default output elements.