The Matador Jobs Pro – Discord Notifications Extension comes with some sensible defaults for the various context-giving pieces of text included in the message of the notification. E.G. the link to a job’s application form has the text ‘Apply for this Job’ by default.
You may want to modify these default labels, and this can be achieved quite easily with the relevant filter. Here’s an example of modifying the label used for the job description to ‘Summary’:
/**
* Change the label for the job description field in Discord messages to 'Summary'.
*
* @param string $name The original name value, 'Job Description' by default.
* @param array $job The job object containing details about the job.
* @param int $wpid The WordPress ID of the job.
* @return string Modified name value.
*/
function change_discord_job_description_label_to_summary( $name, $job, $wpid ) {
return __( 'Summary', 'your-text-domain' ); // Replace 'your-text-domain' with your theme's or plugin's text domain.
}
// Add the filter
add_filter( 'discord_jobs_description_label', 'change_discord_job_description_label_to_summary', 10, 3 );
This model can be followed for changing all of the labels within the notifications. Below you will find a table of all the available filters and the labels they are for.
| Filter | Label |
|---|---|
| discord_jobs_category_label | Job Notifications Job Category Label |
| discord_jobs_type_label | Job Notifications Job Type Label |
| discord_jobs_location_label | Job Notifications Job Location Label |
| discord_jobs_description_label | Job Notifications Job Description Label |
| discord_jobs_details_label | Job Notifications Job Details Label |
| discord_jobs_bullhorn_link_text | Job Notifications Job Bullhorn Link Text |
| discord_jobs_wordpress_link_text | Job Notifications Job WordPress Link Text |
| discord_jobs_apply_link_text | Job Notifications Job Application Link Text |
| discord_applications_applicant_name_label | Application Notifications Applicant Name Label |
| discord_applications_job_label | Application Notifications Job Applied For Label |
| discord_applications_bullhorn_link_text_sync_done | Application Notifications Application Bullhorn Link Text, when notifications are set to trigger after sync with Bullhorn |
| discord_applications_text_sync_pending | Application Notifications Text displayed when notifications are set to trigger immediately upon application (before sync with Bullhorn) |
All of these filters take a first argument which corresponds to the default label/text, followed by either the application, or job (according to the type of notification) as a second argument, and the WordPress ID of the job or application as the third argument.