WP-EMail 3.0.0
-
WP-EMail 3.0.0 is a total rewrite of the plugin with Claude Code to make it more modern and testable. There will be breaking changes. Please do test it https://github.com/lesterchan/wp-email/archive/refs/heads/master.zip
WP-EMail 3.0.0 requires WordPress 6.8 and PHP 8.2. A site on an older stack is simply not offered the update, so if WP-EMail has stopped appearing in your updates list, that is why.
Settings migrate on the first admin page load, and the old rows are deleted. The eighteen rows — email_options, email_fields, the eight email_template_* rows and the rest — become one wp_email_options row, and email_db_version becomes wp_email_version. Point any backup script, migration tool or wp-config.php snippet naming an old row at the new one.
The settings screen is WP-Admin -> E-Mail -> Settings at ?page=wp-email-settings, gated on manage_options rather than the plugin’s own manage_email. The e-mail log keeps manage_email, being a data screen rather than a settings screen. Administrators hold both, so this matters only if you had granted manage_email to a role that is not an administrator: that role now sees the log but not the settings. The new wp_email_capability filter is there for a different arrangement.
One filter renamed, six functions removed. email_form-fieldvalues — the only hook WP-EMail fired carrying neither the prefix nor an underscore — is now wp_email_form_field_values, taking the same argument and returning the same array. There is no shim, so code hooking the old name silently stops pre-filling the form. wp_email_ipaddress, wp_email_template_redirect and wp_email_trust_proxy are unchanged.
Removed: email_wpstats_instance(), email_page_admin_general_stats(), email_page_admin_most_stats(), email_page_general_stats() and email_page_most_stats(), which existed only to answer WP-Stats’ wp_stats_page_* filters that WP-Stats 3.0.0 retired outright; and the global JavaScript email_popup(), which sat on window so the inline onclick the plugin printed could reach it. A link opts into the popup with a data attribute now. Custom link HTML calling email_popup(…) from an onclick should use the %EMAIL_POPUP% variable instead.
WP-Stats integration is one block, switched on from Show WP-EMail On The WP-Stats Page under WP-Admin -> E-Mail -> Settings, drawing the totals and both lists together. It replaces three separate checkboxes; if any of them was ticked, the block stays on.
Update all seven WP-Stats plugins together. WP-EMail, WP-DownloadManager, WP-Polls, WP-PostRatings, WP-PostViews, WP-Stats and WP-UserOnline shared one unprefixed stats_display row, and each deletes it once it has copied the value into its own settings, so whichever you update first is the only one that finds anything there. A missing row means “show”, so a block you had hidden may reappear; each plugin’s toggle now lives on its own settings screen.
No images, one stylesheet, and no theme stylesheet override. The two envelope icons and the loading GIF are gone: the link draws an inline SVG envelope taking its colour from your theme, and the loading indicator is drawn in CSS and holds still under prefers-reduced-motion. The E-Mail Icon setting is removed, and %EMAIL_ICON_URL% is replaced by %EMAIL_ICON%, which inserts the glyph itself. email-css.css and email-css-rtl.css become one css/wp-email.css written with logical properties.
A theme copy of email-css.css is no longer loaded. Move those rules into your theme’s own stylesheet: everything the plugin styles sits under .wp-email, so they keep working, and they now add to the plugin’s rules rather than replacing the whole file. Custom link HTML using %EMAIL_ICON_URL% needs editing — an unrecognised variable is left in the markup as written rather than blanked, so you will see it.
The link is one template now. E-Mail Text Link For Post, E-Mail Text Link For Page and E-Mail Text Link Style are gone, and so is the %EMAIL_TEXT% variable they fed. What is left is E-Mail Link Template, the anchor’s markup, with %EMAIL_URL%, %EMAIL_POPUP%, %EMAIL_ICON% and the new %POST_TYPE% in it. Your template is built on upgrade from the style and the wording you had, so an icon-only link stays icon-only.
Where the two link texts were still the shipped “Email This Post” and “Email This Page”, they collapse to Email This %POST_TYPE%, which reads correctly on both — and on a custom post type, which the old pair could not do. Where you had changed them and the two differ, the post wording is kept verbatim and the page wording is lost: one template cannot carry two arbitrary strings. Check the template if this applies to you. A link already using the Custom style keeps its markup untouched.
%EMAIL_POPUP% moved: it is the value of a data-wp-email-popup attribute rather than a bare variable standing in for the whole attribute, because a bare one was stripped by the sanitizer every time the screen was saved. Write
data-wp-email-popup="%EMAIL_POPUP%"on the anchor. An unrecognised variable is left in the markup as written rather than blanked, so a template still holding %EMAIL_TEXT% shows it on the page rather than losing its link text in silence.The first two parameters of email_link() are accepted and ignored, so a theme calling email_link( ‘Send this on’ ) still renders the link — from the template, not from the string.
The settings screen has two tabs, Settings and Templates, at ?page=wp-email-settings&tab=… Both write the same option row and each saves without touching the other’s values.
Proxy headers are no longer trusted unless you say so. Until 3.0.0 the plugin read HTTP_X_FORWARDED_FOR and friends whenever they were present, and those headers are set by the visitor — so anyone could walk past the interval between e-mails by sending a different value on each request. If your site is behind a proxy, name the exact header it sets in Header That Contains The IP. Otherwise do nothing.
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.