mc_location_controller - joedolson/my-calendar GitHub Wiki
Filter the string of <option> elements inside the <select> input used for a controlled location field.
add_filter(
'mc_location_controller',
function(
string $option,
string $fieldname,
string $selected,
string $context
) {
// Your code here.
return $option;
},
10,
4
);-
string$optionAn HTML string of elements to go inside the generated select field. -
string$fieldnameThe field being generated. -
string$selectedThe selected value for this location. -
string$contextWhether this is being edited in a location or an event context.
apply_filters( 'mc_location_controller', $options, $fieldname, $selected, $context )