This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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}' ), | |
) ); |