• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Search for "short code"

Search Results for: short code

wpmem_notify_addr

Description

This filter hook can override the email address that is used to send admin notification when a new user registers.  The default address used by the plugin is the address that is set in the WordPress General Settings (admin menu Settings > General).  This filter can change the email address, either single or multiple addresses.

Parameters

$email 
(string)(required) The email to send notifications to (use comma separated string for multiple emails)

Useage

/**
 * This is a single email example.  To change the
 * notification address just return the filtered result.
 */
add_filter( 'wpmem_notify_addr', function( $email ) {
    return 'notify@mydomain.com';
});


/**
 * This is a multiple email example.  Note that your outgoing
 * mail server must support receiving multiple emails as 
 * comma separated values for this to be supported.
 */
add_filter( 'wpmem_notify_addr', function( $email ) {
    return 'notify1@mydomain.com, notify2@mydomain.com';
});


/**
 * Notification addresses can be changed based on your own
 * crititeria, supposing you know a little PHP.
 */
add_filter( 'wpmem_notify_addr', function( $email ) {
    
    // Change the email based on your own custom logic.
    if ( $some_criteria ) {
        $email = 'some_other_email@mydomain.com';
    }
    
    return $email;
});

Changelog

  • Introduced in 2.7.5

Source

wpmem_notify_addr is located in includes/class-wp-members-email.php

Redirect a user on first login

Chad Butler · May 15, 2012 ·

This article is provided free. Find out how you can get full access to premium content, including how-to articles and support forums, as well as priority email support and member exclusive plugin extensions..

 

Suppose you have some information you want to direct first time users to, such as a rules page, or a list of certain posts, etc. You would like to do that the first time they login as a new user.  You can do that with the magic of the wpmem_login_filter. 

Continue Reading →

Show optional form fields only on user update

Chad Butler · Apr 2, 2012 ·

Suppose you have some additional form fields that are not required for registration and you don’t want to show those as part of the registration process; but you would like them to be included when a user updates their registration info.  Here is an elegant way of doing that without resorting so hiding the fields with CSS.  Continue Reading →

wpmem_post_update_data

Description

Action hook gets user’s updated registration data after it is inserted.

All of the _data hooks can be used in a similar manner. The differences are if the user data has
been inserted or not. All of it has passed validation by the time it gets to the hook.

Parameters

$fields
(array) (optional) The user’s submitted form data for the profile update.

$user_id
(string) (optional) The user ID.

Example

add_action( 'wpmem_post_update_data', function( $fields, $user_id ) {

    // Example to display the contents of the array.
    // Uncomment to use.
    // echo "<pre>"; print_r( $fields ); echo "</pre>";
    // exit();

    // Example of setting a custom meta field.
    $meta  = 'my_meta_field';
    $value = 'some value';
    update_user_meta( $fields['ID'], $meta, $value );

    // Note this is an action, so nothing needs to be
    // returned from the function.
    return;
    
}, 10, 2 );

Changelog

  • Introduced in version 2.7.2

Source

wpmem_post_update_data is located in /includes/api/api-users.php

wpmem_login_links

Description

Filter hook to change the links shown on the login page when logged in.

Usage

add_filter( 'wpmem_login_links', function( $string ) {
    // Original link output comes in as a $string.
    // You can add to it before or after, or drop it altogether.

    $string = "<p>I put this before the original links</p>" . $string;
    $string = $string . "<p>This is extra stuff I added after...</p>";

    return $string;
});
  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 46
  • Page 47
  • Page 48
  • Page 49
  • Page 50
  • Interim pages omitted …
  • Page 52
  • Go to Next Page »

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy