juvo-mail-editor's People
Forkers
harethsnoussijuvo-mail-editor's Issues
Refactor mail logic
Currently, the process works by receiving the email array of a fillter and basically nullifiying the content. Since required mail parameters are empty the email will not be sent. This leads to a lot of empty entries on smtp plugins that log emails as well as some fatal errors if the sending plugin does not handle empty recipients correctly.
The (hopefully) solution
The best option we have is to keep the logic to hook into the filter but to fully discard the original mail using e.g. pre_wp_mail
with a return of null
. Ideally there is a solution we can keep the values of the original email and reuse them as defaults. This way, the default mail values of WordPress will also not be duplicated into the plugin.
Add password_changed trigger
Add the password_changed mailing again: https://github.com/JUVOJustin/juvo-mail-editor/blob/0c47f11d692193172a79f64611175167c78bd190/src/Mail_Editor.php
Filter: https://developer.wordpress.org/reference/hooks/password_change_email/
Should behave like "New_User"
New User Admin Notification Template
Global Mail Template Support
Allow adding a global mail template. The goal is not to allow frontend editing of a mail template, but to add static HTML or twig code that will enclose the message.
Best would be to use a variable to pass to the template, and it should be filled by the "message" in the wp_mail hook.
- Add section in optionspage to add twig with content block reference
- Add checkbox to disable global templating
- Live rendered preview by ajax
Disable always send on password_reset_admin
Add filter to allow adding cmb2 fields dynamically to post
Introduce a filter that allows adding custom cmb2 fields to a mail template.
Parameters:
- $cmb2 -> Meta Box
Allow more complex context
Add more complex context. Allow placeholders to contain object properties by including this symfony library: https://symfony.com/doc/current/components/property_access.html
This could allow dynamically adding any user or post data.
New User, New User Admin trigger do not use tempalte
Workflow like in Password_Reset.php
Change admin column order
- Title
- Triggers
- Subject
- Author
- Date
Make use of trigger_mute option
Completely disable mail sending for triggers blocked in the option
Add Twig Sandbox mode
Add sandbox mode for untrusted content
- Dev Docs: https://twig.symfony.com/doc/2.x/api.html#sandbox-extension
- Example for loading Sandbox Extension: https://stackoverflow.com/questions/62517361/how-do-i-add-the-sandbox-extension-for-twig-in-the-timber-wordpress-plugin
Add attachments support
Make plugin available as library
New User Placeholder in lowecase
Placeholder needs to be Uppercase
Add headers support
Multilanguage Support for mails
- Add switch language in Relay->sendMails ()
$switched_locale = switch_to_locale( get_locale() );
do_your_stuff();
if ( $switched_locale ) {
restore_previous_locale();
}
- Determine language either by recipient. Maybe use context for easier handling.
- Add fallback if recipient language could not be determined
- Add a way to store callbacks in default_subject and default_message. This way the callbacks are called dynamically which allows wordpress default contents to be in any language. Right now they are stored statically in the site language
Add New_User_admin Rest Support
- Add Metabox
- Add action callback
Initial Setup
Post Type
Posts will be used to set the content of a mail
- Register custom post type
- Use Gutenberg for mail editing and limit blocks
- Add CMB2 field to control active state
Mail Triggers
- Create taxonomy "mail_triggers" to add terms to.
- Introduce filter to easily allow developers to add new triggers
- Add default mail contents to term as custom field
- Create templates for default mail situations but disable them by default
Add Cleanup Function to registerTrigger()
Currently triggers are only added but not delted if they no longer exist.
allowed_block_types_all does not check context
Blocks are limited for all post types. The post context need to be checked
Implement Fallback Mechanism if no template is found for trigger
BuddyBoss Template sometimes rendered twice
Some mails are already processed by buddyboss. Simply filtering for at the beginning of the message should do the trick
Change CMB2 group behaviour
Change indicator to show an arrow down if row is open and an arrow-left of the group is closed. Try if usability is better if the row is open by default
WSForms Integration
WSForms has well documented hooks that can be used to set headers, content and modify the email
rest_insert_user use paramter to check for creation
Currently, the trigger is executed for every rest_insert_user call. The callback does not check if it is an update or a creation.
https://developer.wordpress.org/reference/hooks/rest_insert_user/
Two mail triggered for admin on password change request
Once a user requests a password change, the user receives two mails.
This is because https://github.com/JUVOJustin/juvo-mail-editor/blob/master/src/Mails/Password_Reset.php and https://github.com/JUVOJustin/juvo-mail-editor/blob/master/src/Mails/Password_Changed_Admin.php share the same emailArrayHook
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.