Renaming Event Status Labels

MDJM provides a number of hooks and filters which allow for more advanced customisation that is not available within the general plugin settings.

Event status labels are no exception to this. Below we will demonstrate how to change the event status labels.

The filters of interest here are;

mdjm_event_unattended_status
mdjm_event_enquiry_status
mdjm_event_approved_status
mdjm_event_contract_status
mdjm_event_completed_status
mdjm_event_cancelled_status
mdjm_event_rejected_status
mdjm_event_failed_status

Use the relevant hook for the status label you wish to change.

Example

Let’s say you wish to change the labels for the Enquiry status. By default these are Enquiry for the singular label and Enquiries for the plural label. Let’s change those to Inquiry and Inquiries. Here is the code you would need to add to your custom plugin, or your [child] theme functions.php file.

function mdjm_example_rename_enquiry_status_labels( $args ) {
$args['label'] = __( 'Inquiry', 'mobile-dj-manager' );
$args['plural'] = __( 'Inquiries', 'mobile-dj-manager' );
$args['label_count'] =_n_noop( 'Inquiry <span class="count">(%s)</span>', 'Inquiries <span class="count">(%s)</span>', 'mobile-dj-manager' );

return $args;
}
add_filter( 'mdjm_event_enquiry_status', 'mdjm_example_rename_enquiry_status_labels' );

Remember, whatever status you change, you need to create a new function for it and change the filter at the bottom of the function to match from the list at the top of this article.