• 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_ul_profile_rows

wpmem_ul_profile_rows

Description

Filters the User List profile rows before they are put together as the user profile.

Parameters

$rows
(array) (required) An array of the forms row elements. Each row is keyed as the meta_value and is an array containing the following:

  • div_before – the opening div tag, if any
  • span_before – the opening span tag, if any
  • field -the field content/value
  • span_after – the closing span tag, if any
  • div_after – the closing div tag, if any

Changelog

Introduced in extension version 1.4

Source

wpmem_ul_profile_rows is located in user-profile.php

Usage

add_filter( 'wpmem_ul_profile_rows', 'my_profile_rows_filter' );
function my_profile_rows_filter( $rows ) {

	/*
	 * If you want to see what is in the array, uncomment the line
	 * below. Some of it is HTML, and gets rendered in the browser so
	 * it's best to view source in your browser to see the array.
	 */
	// echo '<pre>';print_r($rows);echo '</pre>';
	
	
	/*
	 * Each row in the array will be keyed as the field's meta_key. 
	 * Each of these will be an array with the following:
	 * * div_before  (the opening div tag, if any)
	 * * span_before (the opening span tag, if any)
	 * * field       (the field content/value)
	 * * span_after  (the closing span tag, if any)
	 * * div_after   (the closing div tag, if any)
	 *
	 * These can be changed or filtered directly as follows:
	 * $rows['meta_key']['field'] = "something";
	 *
	 * OR, you can define the array for a custom field like this:
	 * $rows['meta_key] = array(
	 *     'div_before'  => '<div class="meta_key">',
	 *     'span_before' => '',
	 *     'field'       => 'Field Value',
	 *     'span_after'  => '',
	 *     'div_after'   => '</div>',
	 * );
	 */
	
	// This example makes the email field a "mailto" link.
	$clickable_email = make_clickable( $rows['user_email']['field'] );
	$rows['user_email']['field'] = $clickable_email;
	
	
	// This example puts a special span wrapper around the user's url.
	$rows['user_url']['span_before'] = '<span class="web-link">';
	$rows['user_url']['span_after']  = '</span>';
	
	/*
	 * This example just displays the user ID (to show how to get
	 * the user ID to use for retreiving any custom data).
	 *
	 * The wpmem_get() API function can be used to 'get' the 
	 * user ID from the query string variable 'uid'.
	 */
	$user_id = wpmem_get( 'uid', false, 'get' );
	$meta = 'custom_row';
	$rows[ $meta ] = array(
		'div_before'  => '<div class="' . $meta. '">',
		'span_before' => '',
		'label'       => '',
		'field'       => $user_id,
		'span_after'  => '',
		'div_after'   => '</div>',
	);

	
	// At the end, be sure to return the array!
	return $rows;
}

Code Snippet Library [Subscriber Content]

  • Create an option for users to exclude a specific field from the User List profile
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