1. Home
  2. Car Demon Code Docs
  3. Actions
  4. cd_location_action

cd_location_action

This action is called when displaying the location add / edit screens.

You can use this action to add your own settings to each location.

Alternatively you can filter the location fields themselves and add a new field with the ‘cd_location_fields_filter‘ filter.

You can then use the ‘cd_location_update_action‘ action to save your settings to the location’s settings array.

do_action( ‘cd_location_action’, $location );

add_action( 'cd_location_action', 'my_location', 10, 1 );
function my_location( $location ) {

    echo 'This is my custom output.';

}

The above example will output the phrase “This is my custom output.” on the add & edit location forms.

Was this article helpful to you? Yes No

How can we help?