Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some non-standard parts of the email notifications #1457

Merged
merged 5 commits into from
Apr 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/class-wp-job-manager-data-cleaner.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ class WP_Job_Manager_Data_Cleaner {
'job_manager_submit_page_slug',
'job_manager_job_dashboard_page_slug',
'job_manager_delete_data_on_uninstall',
'job_manager_email_admin_notice_updated_listing',
'job_manager_email_admin_notice_new_listing',
'job_manager_email_admin_updated_job',
'job_manager_email_admin_new_job',
'job_manager_email_admin_expiring_job',
'job_manager_email_employer_expiring_job',
);
Expand Down
4 changes: 2 additions & 2 deletions includes/emails/class-wp-job-manager-email-admin-new-job.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class WP_Job_Manager_Email_Admin_New_Job extends WP_Job_Manager_Email_Template {
* @return string
*/
public static function get_key() {
return 'admin_notice_new_listing';
return 'admin_new_job';
}

/**
Expand All @@ -37,7 +37,7 @@ public static function get_name() {
* @return string
*/
public static function get_description() {
return __( 'This notice is sent to the site administrator when a new job is submitted on the frontend.', 'wp-job-manager' );
return __( 'Send a notice to the site administrator when a new job is submitted on the frontend.', 'wp-job-manager' );
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class WP_Job_Manager_Email_Admin_Updated_Job extends WP_Job_Manager_Email_Templa
* @return string
*/
public static function get_key() {
return 'admin_notice_updated_listing';
return 'admin_updated_job';
}

/**
Expand All @@ -37,7 +37,7 @@ public static function get_name() {
* @return string
*/
public static function get_description() {
return __( 'This notice is sent to the site administrator when a job is updated on the frontend.', 'wp-job-manager' );
return __( 'Send a notice to the site administrator when a job is updated on the frontend.', 'wp-job-manager' );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion includes/forms/class-wp-job-manager-form-edit-job.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function submit_handler() {
$save_message = __( 'Your changes have been saved.', 'wp-job-manager' );
$post_status = get_post_status( $this->job_id );

do_action( 'job_manager_send_notification', 'admin_notice_updated_listing', array( 'job_id' => $this->job_id, 'user_id' => get_current_user_id() ) );
do_action( 'job_manager_send_notification', 'admin_updated_job', array( 'job_id' => $this->job_id ) );

update_post_meta( $this->job_id, '_job_edited', time() );

Expand Down
2 changes: 1 addition & 1 deletion includes/forms/class-wp-job-manager-form-submit-job.php
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ public function preview_handler() {
*/
public function done() {
do_action( 'job_manager_job_submitted', $this->job_id );
do_action( 'job_manager_send_notification', 'admin_notice_new_listing', array( 'job_id' => $this->job_id, 'user_id' => get_current_user_id() ) );
do_action( 'job_manager_send_notification', 'admin_new_job', array( 'job_id' => $this->job_id ) );
get_job_manager_template( 'job-submitted.php', array( 'job' => get_post( $this->job_id ) ) );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Email content when notifying admin of a new job listing.
*
* This template can be overridden by copying it to yourtheme/job_manager/emails/admin-notice-new-listing.php.
* This template can be overridden by copying it to yourtheme/job_manager/emails/admin-new-job.php.
*
* @see https://wpjobmanager.com/document/template-overrides/
* @author Automattic
Expand All @@ -14,6 +14,7 @@
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}

/**
* @var WP_Post $job
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Email content when notifying admin of an updated job listing.
*
* This template can be overridden by copying it to yourtheme/job_manager/emails/admin-notice-updated-listing.php.
* This template can be overridden by copying it to yourtheme/job_manager/emails/admin-updated-job.php.
*
* @see https://wpjobmanager.com/document/template-overrides/
* @author Automattic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Email content when notifying admin of a new job listing.
*
* This template can be overridden by copying it to yourtheme/job_manager/emails/admin-notice-new-listing.php.
* This template can be overridden by copying it to yourtheme/job_manager/emails/plain/admin-new-job.php.
*
* @see https://wpjobmanager.com/document/template-overrides/
* @author Automattic
Expand All @@ -14,6 +14,7 @@
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}

/**
* @var WP_Post $job
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Email content when notifying admin of an updated job listing.
*
* This template can be overridden by copying it to yourtheme/job_manager/emails/admin-notice-new-listing.php.
* This template can be overridden by copying it to yourtheme/job_manager/emails/plain/admin-updated-job.php.
*
* @see https://wpjobmanager.com/document/template-overrides/
* @author Automattic
Expand All @@ -14,6 +14,7 @@
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}

/**
* @var WP_Post $job
*/
Expand Down