Syntax error when editing HR email
-
I am trying to change the template that gets sent out to admin & HR and wanted to add the Job Location into the message, along with the Job Title. When adding the esc_attr($job_location) into the message I am getting hit with the following error:
Your PHP code changes were rolled back due to an error on line 254 of file /srv/htdocs/wp-content/plugins/simple-job-board/includes/class-simple-job-board-notifications.php. Please fix and try saving again.
syntax error, unexpected ‘esc_attr’ (T_STRING)
Here is what my code looks like inside of the email area:
$message .= '<p>' . esc_html__('We just wanted to let you know that someone applied for the', 'simple-job-board') . ' <b>' . esc_attr($job_title) . '</b> ' . esc_html__('position at the', 'simple-job-board') . ' <b>' esc_attr($job_location) . ' </b> ' . esc_html__('facility. Please head over to wordpress and see your new applicant!', 'simple-job-board') . '</p>';Not sure what is throwing wordpress off, unless it is just an ending tag somewhere. Any suggestions? Thanks!
The topic ‘Syntax error when editing HR email’ is closed to new replies.