• 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 » wpmemstat_display_fields

wpmemstat_display_fields

Description

This filter hook allows you to filter the default fields that are displayed in the WP-Members Stats Dashboard table.

The array is key => title where:

  • key is the database field in the wp_wpmem_userstats table
  • title is the value you want to display as the title in the dashboard table

There is one exception to the above and that is the username/name of the user.  The wp_wpmem_userstats table stores the user’s primary key ID.  This is not a retrievable field as a key in the array.  You can provide one of the following for how you would like the user’s name displayed in the table:

  • display_name (default) will display the value that is stored in wp_users display_name (unless you are filtering this value at registration, the default in this field will be the username/user_login value anyway)
  • user_login will display what is commonly referred to as “username”

Here is a list of fields, titles, and defaults:

  • ‘date’ => ‘Date’ (default)
  • ‘display_name’ => ‘Name’ (default)
  • ‘title’ => ‘Title’ (default)
  • ‘url’ => ‘URL’ (default)
  • ‘referer’ => ‘Referrer’ (default)
  • ‘ip’ => ‘IP’ (default)
  • ‘user_agent’ => ‘User Agent’
  • ‘user_login’ => ‘Username’

NOTES: you do not have display in any particular order and you can change the Title (the second value in each pair).  While you can omit pairs, you CANNOT change the key names (the first value in each pair).

Usage

add_filter( 'wpmemstat_display_fields', 'my_stats_fields' );

function my_stats_fields( $fields ) 
{
	return array(
		'date' => 'Date',
		'user_login' => 'Username',
		'title' => 'Title',
		'url' => 'URL',
		'referer' => 'Referrer',
		'user_agent' => 'User Agent',
		'ip' => 'IP'	
	);
}
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