Description
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' => 'user_login,user_email,first_name,last_name,city,thestate', 'id' => ( isset( $_GET['uid'] ) ) ? $_GET['uid'] : '', 'div' => true, 'div_id' => '', 'div_class' => 'field-name', 'span' => false, 'span_id' => '', 'span_class' => '', 'avatar' => '80', 'labels' => false, 'show_empty' => true, 'main_div_before' => '<div id="user-list-profile">', 'main_div_after' => '</div>' ), $atts, $tag );
Parameters
none
Changelog
Introduced in extension version 1.4
Source
wpmem_ul_profile_args is located in user-profile.php
Usage
add_filter( 'wpmem_ul_profile_args', 'my_profile_args' ); function my_profile_args() { /** * This example changes defaults to show * lables and not display empty fields */ $args = array( 'labels' => true, 'show_empty' => false ); return $args; }
Code Snippet Library [Subscriber Content]
See a list of all filter and action hooks