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

wpmem_msg_args

Description

This filter allows you to pass arguments to the error message function to override default values that are used in constructing error messages. The defaults consist of the html wrappers and the toggle that tells the function what error message is being displayed.

$defaults = array(
 'div_before' => '<div class="wpmem_msg" align="center">',
 'div_after' => '</div>',
 'p_before' => '<p>',
 'p_after' => '</p>',
 'toggles' => array(
 'user',
 'email',
 'success',
 'editsuccess',
 'pwdchangerr',
 'pwdchangesuccess',
 'pwdreseterr',
 'pwdresetsuccess'
 )
);

Parameters

$args
(array) (required) An array of arguments that are to override form $defaults.

Changelog

Introduced in version 2.9.0

Source

wpmem_msg_args is located in wp-members-dialogs.php

Usage

add_filter( 'wpmem_msg_args', 'my_msg_form_args' );
function wpmem_msg_args( $args ) {
	/**
	 * This example changes the div wrapper to
	 * a different/custom class (default is .wpmem_msg).
	 */
	return $args['div_before'] = '<div class="my_msg_class">';
}
See a list of all filter and action hooks

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