Skip to content

mc_location_controller

Joe Dolson edited this page May 15, 2026 · 4 revisions

Filter the string of <option> elements inside the <select> input used for a controlled location field.

Auto-generated Example

add_filter(
   'mc_location_controller',
    function(
        {string} $option,
        {string} $fieldname,
        {string} $selected,
        {string} $context
    ) {
        // Your code here.
        return $option;
    },
    10,
    4
);

Parameters

  • {string} $option An HTML string of elements to go inside the generated select field.
  • {string} $fieldname The field being generated.
  • {string} $selected The selected value for this location.
  • {string} $context Whether this is being edited in a location or an event context.

Files

apply_filters( 'mc_location_controller', $options, $fieldname, $selected, $context )

← All Hooks

Clone this wiki locally