GithubHelp home page GithubHelp logo

juvo-mail-editor's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar juvojustin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

harethsnoussi

juvo-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.

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

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

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.