Getting Started
Recommended WordPress Settings
Plugin Settings
Managing Content
Managing Users
Registration
-
Choosing Fields
-
Create a Registration Page
-
Moderating Registration
-
Using CAPTCHA
-
Turn Off Registration
Home of WP-Members, The Original WordPress Membership Plugin
This filter allows you to pass arguments to the User List to override default values set in the admin or passed through the shortcode. The wpmem_list_users function uses the wp_parse_args function to merge arguments passed through this filter with the following defaults:
$defaults = shortcode_atts( array(
'display_style'=> 'list', // list|table
'role' => 'subsriber', // role to filter by
'active_only' => true,
'verified_only' => true,
'exclude' => '', // comma separated string of user ids
'number' => 10, // number to display per page
'search' => true, // is search enabled, "true"
'search_by' => '', // comma separated string of meta keys
'fields' => 'user_login,member_since',
'local_avatar' => false, // whether to use a local avatar or gravatar
'avatar' => 45, // size of the avatar in pixels
'h2' => 'first_last', //
'order_by' => 'user_login',
'order_meta' => '',
'order' => 'ASC',
'show_titles' => false,
'show_empty' => true,
'filter_key' => '',
'filter_value' => '',
'fe_user_edit' => false,
), $atts, $tag );
$args
(array) (required) An array of arguments that are to override form $defaults.
Introduced in extension version 1.4
wpmem_ul_settings_args is located in wp-members-user-list.php
Chad Butler · ·
This code snippet is specifically for the User List extension, which many users use to implement a User Directory. The code snippet discussed here will demonstrate how to include on option in the registration form for users to “opt out” of being displayed in the directory.
Continue Reading →This filter allows you to pass arguments to the User List profile function to override default values that are used in the layout. The wpmem_do_ul_profile function uses the wp_parse_args function to merge arguments passed through this filter with the following defaults:
$defaults = shortcode_atts( array(
'fields' => array(), // Default will contain an array of the defined profile fields.
'id' => $user_id, // Default will contain the current user ID.
'div' => true,
'div_id' => '',
'div_class' => 'field-name',
'span' => false,
'span_id' => '',
'span_class' => '',
'avatar' => '80',
'labels' => $this->settings['show_labels'],
'show_empty' => $this->settings['show_empty'],
'user_label_before' => '',
'user_label_after' => '',
'user_field_before' => '',
'user_field_after' => '',
'main_div_before' => '<div id="user-list-profile">',
'main_div_after' => '</div>',
), $atts, $tag );
$defaults (array) (required) The defaults of for display of the profile (see description above)
$user_id (integer) (optional) The user ID of the user being displayed.
wpmem_ul_profile_args is located in user-profile.php
Filters the plugin settings before they are loaded into the plugin’s main object. This can be used to change plugin settings on the fly for different criteria.
$settings
(array) (required) An array of the plugin settings as loaded from wp_options.
Contents of the $settings array will follow this format:
Once in the object, the settings managed by this filter can be changed directly in the object on the fly, so this filter is not used much anymore. However, it remains supported in the plugin.
wpmem_settings is located in /includes/class-wp-members.php
Ready to get started?