Jasmeralia
Forum Replies Created
-
The fix is to change the add_filter code to be like so:
add_filter('wp_mail_content_type', 'ean_set_content_type'); add_filter('wp_mail_from', 'ean_mail_from'); add_filter('wp_mail_from_name', 'ean_mail_from_name'); function ean_set_content_type() { return 'text/html'; }
And then at the bottom of the file, before the
?>
, add the following:// reset filters to to avoid conflicts -- https://core.trac.www.ads-software.com/ticket/23578 remove_filter('wp_mail_content_type', 'ean_set_content_type'); remove_filter('wp_mail_from', 'ean_mail_from'); remove_filter('wp_mail_from_name', 'ean_mail_from_name');
The issue is that the plugin does this:
add_filter('wp_mail_content_type',create_function('', 'return "text/html";')); add_filter('wp_mail_from', 'ean_mail_from'); add_filter('wp_mail_from_name', 'ean_mail_from_name');
But it never removes those filters when it’s done. The second example shown it the Codex shows how to do this properly: https://codex.www.ads-software.com/Function_Reference/wp_mail#Examples
This will cause a number of conflicts (such as this bug: https://core.trac.www.ads-software.com/ticket/23578) between this plugin and others because this plugin is setting global settings when it should be specific to the plugin instead.
Forum: Installing WordPress
In reply to: WP2.3: Warning: array_key_exists() after upgrade?For Fall Season, I changed one line:
<?php if ( in_category($AsideId) && !is_single() ) : ?>
To:
<?php if ( $AsideID != '' && in_category($AsideId) && !is_single() ) : ?>
This cleared up the error for me. I’m not using asides, so this functionality isn’t important to me.
It would see that WP 2.2 and previous handled a null category value passed to in_category() better than WP 2.3 does.
Forum: Plugins
In reply to: SQL Next ID?Nevermind, I found it… I can actually access this through the SQL server directly via SELECT LAST_INSERT_ID(). ??
Forum: Plugins
In reply to: Welcome Visitor plugin fails userlevel testOff the cuff code, but should at least point you in the right direction:
global $user_ID; $isAdmin = 0; $meta = get_usermeta($user_ID, 'wp_capabilities'); if (is_array($meta) && $meta['wp_capabilities']) { $capa = unserialize($meta['wp_capabilities']); if ($capa['administrator']) { $isAdmin = 1; } }