Skip to content

Instantly share code, notes, and snippets.

gogrw

Block or report user

Report or block gogrw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gogrw
gogrw / gist:666d17105e99b9f98a2bbe2697a8f343
Created May 13, 2019
Shortcode for Listing Users from Meta Data - Without Parameters
View gist:666d17105e99b9f98a2bbe2697a8f343
/**
* Shortcode for Listing Users from Meta Data on PDF REPORT
* Usage: [list_users_pdf]
*/
function pdf_users_from_meta() {
$user_query = new WP_User_Query( array(
'meta_key' => '{report_type:3}',
'meta_value' => '{which_report:1}',
'role__in' => wp_parse_list( '{which_state:2:value}' ),
) );
@gogrw
gogrw / gist:b4f4b549955d56970ea32b33ba8af1e1
Created May 13, 2019
Shortcode for Listing Users from Meta Data - Passing Merge Tags Through Parameters
View gist:b4f4b549955d56970ea32b33ba8af1e1
/**
* Shortcode for Listing Users from Meta Data
* Usage: [list_users key="{report_type:3}" value="{which_report:1}" userrole="{which_state:2}"]
*/
function users_from_meta($atts) {
$atts = shortcode_atts( array(
'key' => '',
'value' => '',
'userrole' => '',
), $atts );
You can’t perform that action at this time.