Git Product home page Git Product logo

wp-email's Introduction

Hi there 👋

👨‍💻 About Me

🌏 I blogged about gadgets at lesterchan.net.

🥞 Currently working in Grab as a Engineering Manager, Full Stack.

⏪ Previously, I was the Head of Engineering in Tech in Asia.

🔌 During my free time (which I do not have much now), I am a WordPress Plugins Developer.

🔎 Find Me

Email: lesterchan@gmail.com            LinkedIn: https://www.linkedin.com/in/lesterchan            Twitter: @gamerz            Instagram: @gamerz

Latest Blog Posts on lesterchan.net

GitHub Stats

Lester Chan's GitHub Stats

wp-email's People

Contributors

bekanntmacher avatar fvmartin avatar lesterchan avatar luanramos avatar ocean90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wp-email's Issues

Add filter to allow pages to be excluded from redirect 'hijack'

Hi I'm Tony, one of the support team from @eventespresso.

We recently had a support request for a conflict between Event Espresso 3 and WP-Email in that once a user entered their registration details (First Name, Last Name, Email) on the event registration form WP-Email would hi-jack the redirect and display the Email form based on the fact that query_vars contained 'email'.

We narrow this down to this function:

### Function: Load WP-EMail
add_action('template_redirect', 'wp_email', 5);
function wp_email() {
    global $wp_query;
    if( array_key_exists( 'email' , $wp_query->query_vars) ) {
        include(WP_PLUGIN_DIR.'/wp-email/email-standalone.php');
        exit();
    } elseif( array_key_exists( 'emailpopup' , $wp_query->query_vars ) ) {
        include(WP_PLUGIN_DIR.'/wp-email/email-popup.php');
        exit();
    }
}

We used a snippet such as this:

function ee_wp_mail_fix()
{
    global $this_is_a_reg_page;
    if($this_is_a_reg_page) {
    remove_action('template_redirect', 'wp_email', 5);
    }
}
add_action( 'template_redirect', 'ee_wp_mail_fix', 4 );

To remove the redirect from our registration page, however it might be a good idea to add filter to allow users to set exception pages for this redirect as I'm sure there are times when users will not want any form submitting email to redirect to WP-EMail.

Don't use TEMPLATEPATH in email-standalone.php

TEMPLATEPATH points to the parent theme if you're using a child theme. To get the path to the current child theme you can use STYLESHEETPATH. (Or better get_template_directory() and get_stylesheet_directory().)

I think the template loading should look like this:

if ( $template = locate_template( 'email.php' ) ) {
    include $template;
} elseif ( $template = get_page_template() ) {
    include $template;
} elseif ( $template = get_single_template() ) {
    include $template;
} elseif ( $template = get_index_template() ) {
    include $template;
}

This will first check for the file in the child theme and then in the parent theme.

Related: The standalone view should also disable comments: add_filter('comments_open', '__return_false');.

Thoughts?

Email settings for popup opens a new page instead of popup

While configuring this plugin, I noticed that when I used the setting for the popup, it never did. Instead, it opens a new page just like it would.
Example: mydomain.com/emailpopup/ is what opens up.
Is this intended to work as a modal when the popup settings to "E-mail Popup"?

Thanks

saving profile while using theme-my-login plugin loads wp-email form

just wondering if you may be able to shed some light on this issue even though it's... probably not your plugin's fault... but since you know the inner workings better.. you may know or could point me in the right direction.
Inherited a site with your wp-email plugin and it uses the "Theme My Login" plugin as well.
That uses a shortcode, which is in a page with slug /profile/ on this site, that shows the profile form fields for users to update their name and social stuff etc. On saving that form it redirects to itself but loads your plugin's email to a friend form (the email-popup.php) form into that profile page and doesn't save the profile info.
I deactivate the wp-email plugin and try the form and it works this time updating the url bar with ".com/profile/?updated=true".

Again just hoping you may have a thought on why and a quicker route to solution than me trying to reverse engineer both plugins and what the last dev did. Thanks man - appreciate your time.

I left a support ticket on that plugin too but he doesn't seem very responsive.
https://wordpress.org/support/topic/issue-saving-profile-while-using-wp-email-plugin

cheers

email-options admin page throws php notice undefined variable

Admin page is: /wp-admin/admin.php?page=wp-email%2Femail-options.php

[20-Feb-2016 00:41:09 UTC] PHP Notice:  Undefined variable: text_direction in /wp-content/plugins/wp-email/email-manager.php on line 236
[20-Feb-2016 00:41:09 UTC] PHP Stack trace:
[20-Feb-2016 00:41:09 UTC] PHP   1. {main}() /wp-admin/admin.php:0
[20-Feb-2016 00:41:09 UTC] PHP   2. include() /wp-admin/admin.php:264
[20-Feb-2016 00:41:09 UTC] PHP Notice:  Undefined variable: text_direction in /wp-content/plugins/wp-email/email-manager.php on line 245
[20-Feb-2016 00:41:09 UTC] PHP Stack trace:
[20-Feb-2016 00:41:09 UTC] PHP   1. {main}() /wp-admin/admin.php:0
[20-Feb-2016 00:41:09 UTC] PHP   2. include() /wp-admin/admin.php:264

wp 4.4.2
plugin 2.67
php 5.6.13

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.