• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

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 » Plugins » WP-Members » Documentation » Filter Hooks » wpmem_default_text

wpmem_default_text

Description

Filters the default terms for user facing strings in the plugin.  Can be used for managing translations.

Parameters

(array) (required) An array of any strings being changed from the defaults.

Defaults:

$defaults = array(
    
    // Login form.
    'login_heading'        => __( 'Existing Users Log In', 'wp-members' ),
    'login_username'       => __( 'Username or Email', 'wp-members' ),
    'login_password'       => __( 'Password', 'wp-members' ),
    'login_button'         => __( 'Log In', 'wp-members' ),
    'remember_me'          => __( 'Remember Me', 'wp-members' ),
    'forgot_link_before'   => __( 'Forgot password?', 'wp-members' ) . ' ',
    'forgot_link'          => __( 'Click here to reset', 'wp-members' ),
    'register_link_before' => __( 'New User?', 'wp-members' ) . ' ',
    'register_link'        => __( 'Click here to register', 'wp-members' ),
    
    // Password change form.
    'pwdchg_heading'       => __( 'Change Password', 'wp-members' ),
    'pwdchg_password1'     => __( 'New password', 'wp-members' ),
    'pwdchg_password2'     => __( 'Confirm new password', 'wp-members' ),
    'pwdchg_button'        => __( 'Update Password', 'wp-members' ),
    
    // Password reset form.
    'pwdreset_heading'     => __( 'Reset Forgotten Password', 'wp-members' ),
    'pwdreset_username'    => __( 'Username', 'wp-members' ),
    'pwdreset_email'       => __( 'Email', 'wp-members' ),
    'pwdreset_button'      => __( 'Reset Password' ),
    'username_link_before' => __( 'Forgot username?', 'wp-members' ) . ' ',
    'username_link'        => __( 'Click here', 'wp-members' ),
    
    // Retrieve username form.
    'username_heading'     => __( 'Retrieve username', 'wp-members' ),
    'username_email'       => __( 'Email Address', 'wp-members' ),
    'username_button'      => __( 'Retrieve username', 'wp-members' ),
    
    // Register form.
    'register_heading'     => __( 'New User Registration', 'wp-members' ),
    'register_username'    => __( 'Choose a Username', 'wp-members' ),
    'register_rscaptcha'   => __( 'Input the code:', 'wp-members' ),
    'register_tos'         => __( 'Please indicate that you agree to the %s Terms of Service %s', 'wp-members' ), // @note: if default changes, default check after wpmem_tos_link_txt must change.
    'register_clear'       => __( 'Reset Form', 'wp-members' ),
    'register_submit'      => __( 'Register', 'wp-members' ),
    'register_req_mark'    => '<span class="req">*</span>',
    'register_required'    => '<span class="req">*</span>' . __( 'Required field', 'wp-members' ),
    
    // User profile update form.
    'profile_heading'      => __( 'Edit Your Information', 'wp-members' ),
    'profile_username'     => __( 'Username', 'wp-members' ),
    'profile_submit'       => __( 'Update Profile', 'wp-members' ),
    'profile_upload'       => __( 'Update this file', 'wp-members' ),
    
    // Error messages and dialogs.
    'login_failed_heading' => __( 'Login Failed!', 'wp-members' ),
    'login_failed'         => __( 'You entered an invalid username or password.', 'wp-members' ),
    'login_failed_link'    => __( 'Click here to continue.', 'wp-members' ),
    'pwdchangempty'        => __( 'Password fields cannot be empty', 'wp-members' ),
    'usernamefailed'       => __( 'Sorry, that email address was not found.', 'wp-members' ),
    'usernamesuccess'      => __( 'An email was sent to %s with your username.', 'wp-members' ),
    'reg_empty_field'      => __( 'Sorry, %s is a required field.', 'wp-members' ),
    'reg_valid_email'      => __( 'You must enter a valid email address.', 'wp-members' ),
    'reg_non_alphanumeric' => __( 'The username cannot include non-alphanumeric characters.', 'wp-members' ),
    'reg_empty_username'   => __( 'Sorry, username is a required field', 'wp-members' ),
    'reg_password_match'   => __( 'Passwords did not match.', 'wp-members' ),
    'reg_email_match'      => __( 'Emails did not match.', 'wp-members' ),
    'reg_empty_captcha'    => __( 'You must complete the CAPTCHA form.', 'wp-members' ),
    'reg_invalid_captcha'  => __( 'CAPTCHA was not valid.', 'wp-members' ),
    'reg_generic'          => __( 'There was an error processing the form.', 'wp-members' ),
    'reg_captcha_err'      => __( 'There was an error with the CAPTCHA form.', 'wp-members' ),
    'reg_file_type'        => __( 'Sorry, you can only upload the following file types for the %s field: %s.', 'wp-members' ),
    
    // Links.
    'profile_edit'         => __( 'Edit My Information', 'wp-members' ),
    'profile_password'     => __( 'Change Password', 'wp-members' ),
    'register_status'      => __( 'You are logged in as %s', 'wp-members' ),
    'register_logout'      => __( 'Log out', 'wp-members' ),
    'register_continue'    => ( isset( $wpmem->user_pages['profile'] ) && '' != $wpmem->user_pages['profile'] ) ? __( 'Edit profile', 'wp-members' ) : __( 'Begin using the site.', 'wp-members' ),
    'login_welcome'        => __( 'You are logged in as %s', 'wp-members' ),
    'login_logout'         => __( 'Click to log out', 'wp-members' ),
    'status_welcome'       => __( 'You are logged in as %s', 'wp-members' ),
    'status_logout'        => __( 'click to log out', 'wp-members' ),
    'menu_logout'          => __( 'Log Out', 'wp-members' ),
    
    // Widget.
    'widget_status'         => __( 'You are logged in as %s', 'wp-members' ),
    'widget_logout'         => __( 'click here to log out', 'wp-members' ),
    'widget_login_failed'   => __( 'Login Failed!<br />You entered an invalid username or password.', 'wp-members' ),
    'widget_login_failed_new' => __( 'Invalid username or password.', 'wp-members' ), // @todo New string replacement. Replace widget_login_failed when translated.
    'widget_not_logged_in'  => '',
    'widget_login_username' => __( 'Username or Email', 'wp-members' ),
    'widget_login_password' => __( 'Password', 'wp-members' ),
    'widget_login_button'   => __( 'log in', 'wp-members' ),
    'widget_login_forgot'   => __( 'Forgot?', 'wp-members' ),
    'widget_login_register' => __( 'Register', 'wp-members' ),
    
    // Default Dialogs.
    'restricted_msg'       => __( "This content is restricted to site members.  If you are an existing user, please log in.  New users may register below.", 'wp-members' ),
    'success'              => __( "Congratulations! Your registration was successful.<br /><br />You may now log in using the password that was emailed to you.", 'wp-members' ),
    
    // @todo Under consideration for removal from the Dialogs tab.
    'user'                 => __( "Sorry, that username is taken, please try another.", 'wp-members' ),
    'email'                => __( "Sorry, that email address already has an account.<br />Please try another.", 'wp-members' ),
    'editsuccess'          => __( "Your information was updated!", 'wp-members' ),
    
    // @todo These are defaults and are under consideration for removal from the dialogs tab, possibly as we change the password reset to a link based process.
    'pwdchangerr'          => __( "Passwords did not match.<br /><br />Please try again.", 'wp-members' ),
    'pwdchangesuccess'     => __( "Password successfully changed!", 'wp-members' ),
    'pwdreseterr'          => __( "Either the username or email address do not exist in our records.", 'wp-members' ),
    'pwdresetsuccess'      => __( "Password successfully reset!<br /><br />An email containing a new password has been sent to the email address on file for your account.", 'wp-members' ),
    
    'product_restricted'   => __( 'Sorry, your account does not have access to %s content', 'wp-members' ),

); // End of $defaults array.

Usage

Use this filter to change the plugin’s default text strings as needed.  You only need to return the array keys being changed from the defaults.

The following example changes the default values for the form headings (login and registration):

add_filter( 'wpmem_default_text', function( $text ) {
    
    // Based on the default values, set an array value
    // for each of the text strings that you need changed.

    $text['login_heading']    = 'Log In to Your Account';
    $text['register_heading'] = 'Register New Account';

    return $text;
});

Looking at the list of default values in the $text array, you can use the framework of the above example to change as many or as few of the user facing strings as needed.

Changelog

Added in 3.2.7

Source

wpmem_default_text is located in includes/class-wp-members-dialogs.php

Not sure what to do with this code?

You're not a "coder" and don't know what to do? Don't worry! Code Snippets are the basic building blocks of WordPress customization, and once you know the basics, they are simple to use.

Here are some free articles to get you started:

  • Using Code Snippets from the Site
  • Using a code snippets plugin
  • The functions.php File
  • Create a plugin file for custom functions
  • Create a child theme
  • Do not modify plugin files!

For "hands on" help, consider a plugin support subscription or the Pro Bundle.

  • Getting Started
  • Recommended WordPress® Settings
  • Plugin Settings
    • Options
    • Fields
    • Dialogs
    • Emails
    • New Feature Settings
  • Managing Content
    • Restricting Posts
    • Restricting Pages
    • Show Excerpts
    • Custom Post Types
  • Managing Users
    • Import Users
    • Export Users
    • Edit Users
    • Search Users
  • Login
  • Registration
    • Choosing Fields
    • Create a Registration Page
    • Moderating Registration
    • Using CAPTCHA
    • Removing Registration Options
  • User Profile
  • Memberships
    • Membership Properties
    • Membership Levels
  • Menus
    • Individual Menu Items
    • Logged In Menus
    • Login/Logout Menu Link
  • Customizing Emails
    • Email Address
    • Email Content
    • Email Format
    • Email Shortcodes
    • Email Troubleshooting
  • Customizing Forms
    • Create a Custom Stylesheet
    • Using the WordPress Customizer
    • Login Form HTML
    • Registration Form HTML
    • Widget Login Form HTML
  • Translation and Localization
    • Maintain a custom translation file
    • Filter untranslated strings
    • Multi-language Considerations
  • Shortcodes
    • Pages and Forms
    • Login Status
    • User Fields
    • Memberships
    • Email
    • Other Shortcodes
  • WP-CLI Commands
  • API Functions
  • Filter Hooks
  • Action Hooks
  • FAQs
    • Email troubleshooting
    • Passwords are not being included in Emails
    • The plugin isn’t blocking my content
    • Are files protected?
    • How can I prevent registration spam?
    • How to add a shortcode
    • How to apply login redirects
    • Why can’t users log in?
    • Why does reCAPTCHA v3 fail?
    • Troubleshooting Really Simple Captcha
    • Why do I get a 403 error?
    • How do I use code snippets?
    • My changes aren’t showing up
    • How to hide the “Admin Bar”
    • How to add a forgot password link
    • Password reset doesn’t show any fields
    • Domain not included in the password reset link
    • There was an error processing the form
    • Hidden vs. Restricted
  • Demo Videos
  • How to Request Support
  • Copy Settings for Support
  • Hosting Recommendations

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