• 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
  • Store
    • Cart
    • Checkout
  • Blog
    • Basics [Free]
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Contact
  • Sign In
  • Show Search
Hide Search
Home » Plugins » WP-Members » Documentation » Filter and Action 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.
    'sb_status'            => __( 'You are logged in as %s', 'wp-members' ),
    'sb_logout'            => __( 'click here to log out', 'wp-members' ),
    'sb_login_failed'      => __( 'Login Failed!<br />You entered an invalid username or password.', 'wp-members' ),
    'sb_not_logged_in'     => '',
    'sb_login_username'    => __( 'Username or Email', 'wp-members' ),
    'sb_login_password'    => __( 'Password', 'wp-members' ),
    'sb_login_button'      => __( 'log in', 'wp-members' ),
    'sb_login_forgot'      => __( 'Forgot?', 'wp-members' ),
    'sb_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 ) {

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

    return $text;
});

Changelog

Added in 3.2.7

Source

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

  • 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
  • Registration
    • Choosing Fields
    • Create a Registration Page
    • Moderating Registration
    • Using CAPTCHA
    • Removing Registration Options
  • User Profile
  • Membership Products
    • Membership Properties
  • 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
  • Shortcodes
    • Pages and Forms
    • Login Status
    • User Fields
    • Email
    • Other Shortcodes
  • WP-CLI Commands
  • API Functions
  • Filter and Action Hooks
  • WP-Members FAQs
  • Demo Videos

Ready to get started?

Join Today!

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

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