Skip to content

mc_location_controller

github-actions[bot] edited this page Jun 3, 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