-
Notifications
You must be signed in to change notification settings - Fork 368
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
Emails should have contexts and use template paths for their context #1469
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small inconsistencies in the docs that we might want to fix.
* @param WP_Job_Manager_Email $email Email object for the notification. | ||
* @param bool $sent_to_admin True if this is being sent to an administrator. | ||
* @param bool $plain_text True if the email is being sent as plain text. | ||
* @param string $email_notification_key Email object for the notification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/object/key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed these in 6dd46dd
* Checks for an alternative email template segment in the template path specified by the current email. | ||
* Useful to provide alternative email headers and footers for a specific WPJM extension plugin. | ||
* | ||
* @param string $email_notification_key Email object for the notification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/object/key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 6dd46dd
As I started thinking about how we'd implement this in our extension plugins, I realized we want to give emails a context so they can appear in different setting screens and they should follow a template path and default template path for overriding in plugins.
@alexsanford I also closed that circular dependency for the template file name method 😉