• 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_adv_toolbar_capability

Description

Filters the required capability for displaying the toolbar.  With default WP roles, it will be removed for “subscriber” role, but displayed for all others.

Parameters

$capability
(string) (required) The capability required for displaying the toolbar (default: edit_posts).

Usage

add_filter( 'wpmem_adv_toolbar_capability', function( $capability ) {
    return 'manage_options';
});

Changelog

Introduced in version 1.2

Source

wpmem_adv_toolbar_capability is located in includes/class-wp-members-advanced-options.php

wpmem_adv_dashboard_capability

Description

Filters the required capability for allowing dashboard access.  With default WP roles, it will be removed for “subscriber” role but allowed for all others.

Parameters

$capability
(string) (required) The capability required for allowing dashboard access (default: edit_posts).

Usage

add_filter( 'wpmem_adv_dashboard_capability', function( $capability ) {
    return 'manage_options';
});

Changelog

Introduced in version 1.2

Source

wpmem_adv_dashboard_capability is located in includes/class-wp-members-advanced-options.php

wpmem_register_redirect

Description

This action hook comes at the end of the registration process. At this point, the user is registered, custom fields have been inserted, emails have been sent.

Parameters

$fields
(array) An array of user data from registration.

The $fields array will have keys for all user data fields from the registration form, keyed by the field’s meta key (option name). Additionally, there will be keys for the following:

  • [ID]
  • [user_nicename]
  • [display_name]
  • [nickname]
  • [user_role]
  • [user_registered] (timestamp)
  • [wpmem_reg_ip]
  • [wpmem_reg_url]

Useage

add_action( 'wpmem_register_redirect', function( $fields ) {

    // $fields is an array containing user registration data
    // keyed by the field meta key.
    
    if ( 'some_value' == $fields['my_field_meta_key'] ) {
        
        wp_redirect( home_url( 'some-page' ) );
        exit();
    }
});

wpmem_block

Description

This filter hook allows you to change the block setting for content. The is_blocked() function determines if content should be blocked or not and passes a true|false boolean to the securify function. If $block is true, content is blocked.  By default, is_blocked tests for posts and pages, but any criteria could be tested in a custom filter function for blocking categories, tags, custom post types, etc.

Parameters

$block
(boolean)(required) A boolean to determine if content should be blocked or not.

$args
(array) (optional) An array of data used in the is_blocked() function.

  • post_id – the post ID
  • post_type – the post type
  • block – the block value (1 = blocked, 0 = unblocked, 2 = hidden)
  • block_meta – “_wpmem_block”
  • block_type – the default value in settings for this post type

Usage

Changelog

  • Introduced in 2.7.5
  • Moved to is_blocked() in WP_Members object in 3.0.0

Source

wpmem_block is located in includes/class-wp-members.php

Code Snippet Library [Subscriber Content]

  • Add a meta box in the post editor for blocking custom post types
  • Blocking Custom Post Types
  • Block Posts After a Set Number of Page Views
  • Automatically block child pages
  • Working with Templates: a Basic Example
  • Blocking custom post types
  • Using wpmem_block to block a category

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

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 45
  • Page 46
  • Page 47
  • Page 48
  • Page 49
  • 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