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

Emails should have contexts and use template paths for their context #1469

Merged
merged 3 commits into from
Apr 25, 2018

Conversation

jom
Copy link
Member

@jom jom commented Apr 25, 2018

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 😉

@jom jom added this to the 1.31.0 milestone Apr 25, 2018
@jom jom merged commit 6e77751 into master Apr 25, 2018
@jom jom deleted the add/email-context branch April 25, 2018 15:55
Copy link
Contributor

@alexsanford alexsanford left a 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/object/key

Copy link
Member Author

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/object/key

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 6dd46dd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants