• 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

Redirect blocked content to a login page

Chad Butler · Oct 7, 2020 ·

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..

 

While the WP-Members plugin is built to automatically replace blocked content with a login and registration form, sometimes it is necessary to redirect blocked content to a specific login page. This is generally the case with builder plugins (unless you refilter the content), or plugins that use post meta for displaying extra content, such as WooCommerce, Calendar/Event plugins, etc.

This post covers some a basic way to provide the same user experience as the default setup, but by redirecting the blocked content to a login page. Continue Reading →

New Feature Settings

WP-Members 3.3.5 introduced some new features as options, which have become the standard setting for new installs as of 3.4.0.  Eventually, in version 3.5.0 these features will replace older functionality altogether.

If you are updating an older version of the plugin to use the new password reset link process, follow the instructions here.

 

Password Reset Link

This feature replaces the password reset process with a link. When the user requests a password reset, a link will be emailed to the user. When the user clicks the link to activate the password reset process, they are directed to a password change form.

The reset link expires in 24 hours, at which point the user would need to attempt another reset.

As of plugin version 3.4.0, this feature is the standard setting. On a new install, you don’t need to do anything to enable it. If you are upgrading from an older version of the plugin, you need to disable the legacy password reset setting in the main options tab under “New Feature Settings”. In plugin version 3.5.0, the current password reset process (that sends a new passwords) will be removed completely.

If you are updating an older version of the plugin to use the new password reset link process, follow the instructions here.

Additional Configuration Required

The password reset link option uses the WP login error object for specific messaging in the form. As of 3.4.0, this is enabled by default, but it can be changed in the “New Feature Settings” so make sure “Legacy Login Error” is not enabled in your setup. (see “Enable WP Login Error” below).

It is recommended that you edit the password reset email accordingly. The process will automatically include the activation link at the bottom of the email. If you want to customize where the link is placed, use the [reset_link] shortcode in the email. (You should remove any elements of the legacy process, such as the shortcode to include a password, since this is no longer valid.)

Additionally, in order for the password reset URL to be complete, you need to have set the plugin setting for the User Profile URL as this is where the user is going to be directed in order to create a new password.  Without setting this, the URL in the email will be incomplete, and you may or may not direct the user to a page where the password can actually be reset.  It must be a page that contains the [wpmem_profile] or [wpmem_form password] URL.  (See documentation about the “User Profile URL” setting and about the [wpmem_profile] shortcode.)

 

WP Login Error

This feature replaces the WP-Members login error message with what is contained in the WP login error message object. The formatting of the message is still the same – the WP-Members div tag is still used.  The only difference is that messaging is slightly different.

The primary reason for this change is that when WP-Members was first introduced (ages ago, back in 2005/06), there wasn’t much in the way of additional login authentication integration. But that has changed drastically.  So many people now use additional authentication such as captchas, or brute force login blockers that all add custom messaging to the login error. In order to apply those in the past, you needed to implement a custom code snippet.

As of version 3.4.0, this is the standard setting. If you are setting up a new install, you don’t have to do anything. If you are upgrading, you can enable the legacy login error message until you are ready to shift over to the new setting. However, I recommend doing it sooner rather than later as the legacy setting will no longer be available as of plugin version 3.5.0.

WP-Members 3.3.5 Beta Release

Chad Butler · Aug 3, 2020 ·

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..

 

The 3.3.5 version of the plugin is now available in the wordpress.org repository as a beta release. This is primarily a fix and feature release, with some of the new features being “experimental” for full use in 3.4.0.

You can get the beta version from the wordpress.org repository by going to https://wordpress.org/plugins/wp-members/advanced/ and selecting “Development Version” from the dropdown selector in the “Advanced Options” section.

Another simple way to load the beta version is to use WP CLI. Use the command wp plugin update wp-members --version=trunk.  There are no database changes in this version, so if you need to roll back, you can use the command wp plugin update wp-members --version=3.3.4.3

You can also get it on github. Note that the github version is always the “bleeding edge” update and may include updates (including debugging changes) so at any given time it may differ from the version on wordpress.org as official beta.

Here is an overview of what’s in this version: Continue Reading →

Bulk move of files in media folder to Download Protect directory

Chad Butler · May 20, 2020 ·

One question that comes up from time-to-time is how to move files from the media folder to the download protect folder (which is a subfolder in the WP /uploads/ directory).  The usual answer is “you can’t.”

However, sometimes we run across a user that has 100s (or more) existing files that they want to move into the protected directory. So I have written a command line script that will process a bulk move for you. 

Continue Reading →

wpmem_login_form_defaults

Description

Filters the login form defaults for heading, action, button text, redirect_to (if used), and the field elements (such as label text).

Introduced in 3.3.0, it replaces wpmem_inc_login_inputs and wpmem_inc_login_args, both of which should be considered deprecated.

Parameters

$args (array)

/*
@param array $args {
    @type string $heading      The form heading
    @type string $action       The form action (do not change unless you know what you are doing)
    @type string $button_text  The form submit button text
    @type string $redirect_to  The $redirect_to parameter
    @type array  $inputs {
        An array of inputs, there will be one array element for each form input, keyed starting with [0].
    
        @type string $name   The field label
        @type string $type   The field type
        @type string $tag    The field meta tag
        @type string $class  The CSS class
        @type string $div
    }
}
*/

Usage

// An example of changing a single major element.
add_filter( 'wpmem_login_form_defaults', function( $args ) {
    $args['heading'] = "Log in here";
    return $args;
});

// An example of changing a single field input element.
add_filter( 'wpmem_login_form_defaults', function( $args ) {
    $args['inputs'][0]['name'] = "Email";
    return $args;
});

// An example of changing multiple elements.
add_filter( 'wpmem_login_form_defaults', function( $args ) {
    $args['heading'] = "Log in here";
    $args['button_text'] = "Click to log in";
    $args['inputs'][0]['name'] = "Email";
    return $args;
});

Notes

  • The “inputs” are a subarray in the overall array. It is a numerically keyed array starting at 0. Each input is in the array in display order. For example, in the default login form, the username/email input is [0] and the password is [1], in the password change form, password is [0] and confirm password is [1], etc.

Changelog

Introduced in version 3.3.0

Source

wpmem_login_form_defaults is located in /includes/class-wp-members-forms.php

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 18
  • Page 19
  • Page 20
  • Page 21
  • Page 22
  • 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