Allow Multiple Accounts
Allow multiple user accounts to be created, registered, and updated having the same email address. By default, WordPress only allows a specific email address to be used for a single user account. This plugin removes that restriction. The plugin’s settings page (accessed via Users -> Multiple Accounts or via the Settings link next to the plugin on the Manage Plugins page) provides the ability to allow only certain email addresses the ability to have multiple accounts (such as if you only want admins to have that ability; by default all email addresses can be used more than once). You may also specify a limit to the number of accounts an email address can have (by default there is no limit). The settings page also provides a table listing all user accounts that share email addresses (see screenshot). Compatible with Multisite and BuddyPress as well. Links: Plugin Homepage | Plugin Directory Page | Author Homepage Template Tags The plugin provides three optional template tags for use in your theme templates. Functions Returns a count of the number of users associated with the given email. Returns the users associated with the given email. Returns a boolean indicating if the given email is associated with more than one user account. Arguments $email (string) An email address. Filters The plugin exposes three filters for hooking. Typically, customizations utilizing these hooks would be put into your active theme’s functions.php file, or used by another plugin. c2c_count_multiple_accounts (filter) The ‘c2c_count_multiple_accounts’ hook allows you to use an alternative approach to safely invoke c2c_count_multiple_accounts() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site. Arguments: same as for c2c_count_multiple_accounts() Example: Instead of: Do: c2c_get_users_by_email (filter) The ‘c2c_get_users_by_email’ hook allows you to use an alternative approach to safely invoke c2c_get_users_by_email() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site. Arguments: same as for c2c_get_users_by_email() Example: Instead of: Do: c2c_has_multiple_accounts (filter) The ‘c2c_has_multiple_accounts’ hook allows you to use an alternative approach to safely invoke c2c_has_multiple_accounts() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site. Arguments: same as for c2c_has_multiple_accounts() Example: Instead of: Do:
Top keywords
- email15×3.48%
- accounts13×3.02%
- c2c12×2.78%
- multiple11×2.55%
- multiple accounts10×2.32%
- users7×1.62%
- count5×1.16%
- address4×0.93%
- allows4×0.93%
- arguments4×0.93%
- c2c count4×0.93%
- c2c count multiple4×0.93%
HTML
Converts the default plain-text email notifications into fully customizable, sweet-lookin’ HTML emails. Multi-site support (for WordPress 3.0) will be added soon. Notes: Emails are sent with readable plain-text versions for email clients that don’t support HTML emails. Note: they’re somewhat crude because they’re auto-generated. I may decide to add decent-looking plain-text versions in the future, but that’s low priority. Emails have only been tested on Gmail, Gmail on Android, and Outlook, but should work on most email clients (including clients without HTML support). If you’re using a client other than the 3 I’ve listed, I would appreciate an email with info on whether the email looks like it should and works correctly. Send your questions, comments, suggestions via email. Customizing Templates You can fully customize the look of any of the emails by creating your own templates. Emails have two pieces: Email Wrapper (content common across all emails) Email Message (content unique to each email) Custom templates can be created an placed in either your theme directory or your Content directory (/wp-content/ on most sites). See utils.php for a number of useful functions that you can use in your templates. Email Wrapper The Email Wrapper includes elements and markup that are common across all email notifications. It contains your html, head and body tags and any other elements that are shared across emails. To customize the email template, create a file called html_email.php and add it to either your theme or content directory. Note: you must include the following code in the template to work: The Email Wrapper has access to the following variables: $email_title: (string) title of the email $email_subtitle: (string) subtitle of the email $email_data: (array) Associative array of various data passed by the calling function Email Message: New Comment By default, new comment and comment moderation emails share the same template. You can create separate templates for both for each comment type by creating the following files: notify_postauthor_comment.php notify_postauthor_trackback.php notify_postauthor_pingback.php notify_moderator_comment.php notify_moderator_trackback.php notify_moderator_pingback.php If you don’t want to customize the emails by comment type, just create the following two templates: notify_postauthor.php notify_moderator.php If you just want a custom template shared between the two notification types, just create the following: notify_comment.php New Comment email messages have the following data variables available: $comment – (obj) comment object $post – (obj) post object $comment_type – (string) slug for the comment_type $comment_type_text – (string) friendly name for the comment_type $comment_moderate – (bool) Whether the comment needs moderation or not Using HTML Emails in your plugin It’s pretty easy to use. The main call you need to make is htmlize_message() and pass the return into your wp_mail object. Details to come. Credits Blockquote image borrowed from the amazing Wu Wei theme by Jeff Ngan Plain Text conversion script by Jon Abernathy aka Chuggnutt Email styling inspired by WordPress.com Blog Subscription Notifications