Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:50:33-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13090 2011-12-20T09:50:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=57826#p57826 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 20th, 2011, 9:50 am


]]>
2011-12-07T01:03:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=55508#p55508 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: December 7, 2011, 1:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 7th, 2011, 1:03 am


]]>
2011-11-05T19:26:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=51882#p51882 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: November 5, 2011, 8:26 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — November 5th, 2011, 7:26 pm


]]>
2011-10-29T20:35:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=49977#p49977 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: October 29, 2011, 9:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 29th, 2011, 8:35 pm


]]>
2011-10-17T15:39:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=47771#p47771 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: October 17, 2011, 1:39 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 17th, 2011, 3:39 pm


]]>
2011-10-11T14:35:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=46172#p46172 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: October 11, 2011, 12:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 11th, 2011, 2:35 pm


]]>
2011-10-03T15:47:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=44302#p44302 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: October 3, 2011, 1:47 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:47 pm


]]>
2011-10-03T03:41:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=43009#p43009 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: October 3, 2011, 1:41 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:41 am


]]>
2011-09-27T05:26:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=41255#p41255 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: September 27, 2011, 3:26 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 27th, 2011, 5:26 am


]]>
2011-09-26T21:03:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=40011#p40011 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: September 26, 2011, 7:03 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 26th, 2011, 9:03 pm


]]>
2011-09-17T16:20:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=38153#p38153 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: September 17, 2011, 2:21 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 17th, 2011, 4:20 pm


]]>
2011-09-14T01:28:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=36734#p36734 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: September 13, 2011, 11:28 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 14th, 2011, 1:28 am


]]>
2011-09-13T12:03:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=35462#p35462 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: September 13, 2011, 10:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 13th, 2011, 12:03 pm


]]>
2011-08-15T15:14:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=31583#p31583 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: August 15, 2011, 4:14 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\users-list.inc.php ?php /** * Users list. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\Users_List * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_users_list" ) ) { /** * Users list. * * @package s2Member\Users_List * @since 3.5 */ class c_ws_plugin__s2member_users_list { /** * Adds Custom Fields to the admin Profile editing page. * * @package s2Member\Users_List * @since 3.5 * * @attaches-to: ``add_action("edit_user_profile");`` * @attaches-to: ``add_action("show_user_profile");`` * * @param obj $user Expects a `WP_User` object passed in by the Action Hook. * @return inner Return-value of inner routine. */ public static function users_list_edit_cols ( $user = FALSE ) { return c_ws_plugin__s2member_users_list_in:: users_list_edit_cols ( $user ) ; } /** * Saves Custom Fields after an admin updates Profile. * * @package s2Member\Users_List * @since 3.5 * * @attaches-to: ``add_action("edit_user_profile_update");`` * @attaches-to: ``add_action("personal_options_update");`` * * @param int|str $user_id Expects a numeric WordPress® User ID passed in by the Action Hook. * @return inner Return-value of inner routine. */ public static function users_list_update_cols ( $user_id = FALSE ) { return c_ws_plugin__s2member_users_list_in:: users_list_update_cols ( $user_id ) ; } /** * Modifies the search query. * * Affects searches performed in the list of Users. * * @package s2Member\Users_List * @since 3.5 * * @attaches-to: ``add_action("pre_user_query");`` * * @param obj $query Expects a `WP_User_Query` object, by reference. * @return null After possibly modifying the ``$query`` object. */ public static function users_list_query ( & $query = FALSE ) { global $wpdb ; /* Need this global object reference. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_users_list_search" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( isset ( $query - query_vars ) && !is_network_admin ( ) ) /* NOT in Network admin panels. */ if ( is_array ( $qv = $query - query_vars ) && ( $s = trim ( $qv [ "search" ] , "* \t \n \r \0 \x0B" ) ) && ( $s = "%" . esc_sql ( like_escape ( $s ) ) . "%" ) ) { $query - query_from = " FROM `" . $wpdb - users . "` INNER JOIN `" . $wpdb - usermeta . "` ON `" . $wpdb - users . "`.`ID` = `" . $wpdb - usermeta . "`.`user_id`" ; /**/ $query - query_where = " WHERE '1' = '1' AND (" . apply_filters ( "ws_plugin__s2member_before_users_list_search_where_or_before" , "" , get_defined_vars ( ) ) ; $query - query_where .= " (`" . $wpdb - usermeta . "`.`meta_key` = '" . $wpdb - prefix . "s2member_subscr_id' AND `" . $wpdb - usermeta . "`.`meta_value` LIKE '" . $s . "')" ; $query - query_where .= " OR (`" . $wpdb - usermeta . "`.`meta_key` = '" . $wpdb - prefix . "s2member_custom' AND `" . $wpdb - usermeta . "`.`meta_value` LIKE '" . $s . "')" ; $query - query_where .= " OR (`" . $wpdb - usermeta . "`.`meta_key` = '" . $wpdb - prefix . "s2member_custom_fields' AND `" . $wpdb - usermeta . "`.`meta_value` LIKE '" . $s . "')" ; $query - query_where .= " OR `user_login` LIKE '" . $s . "' OR `user_nicename` LIKE '" . $s . "' OR `user_email` LIKE '" . $s . "' OR `user_url` LIKE '" . $s . "' OR `display_name` LIKE '" . $s . "'" ; $query - query_where .= apply_filters ( "ws_plugin__s2member_before_users_list_search_where_or_after" , "" , get_defined_vars ( ) ) . ")" ; /* Leaving room for additional searches here. */ $query - query_where .= " AND `" . $wpdb - users . "`.`ID` IN(SELECT DISTINCT(`user_id`) FROM `" . $wpdb - usermeta . "` WHERE `meta_key` = '" . $wpdb - prefix . "capabilities'" . /**/ ( ( $qv [ "role" ] ) ? " AND `meta_value` LIKE '%" . esc_sql ( like_escape ( $qv [ "role" ] ) ) . "%'" : "" ) . ")" ; /**/ $query - query_from = apply_filters ( "ws_plugin__s2member_before_users_list_search_from" , $query - query_from , get_defined_vars ( ) ) ; $query - query_where = apply_filters ( "ws_plugin__s2member_before_users_list_search_where" , $query - query_where , get_defined_vars ( ) ) ; } /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_after_users_list_search" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ return ; /* Return for uniformity. */ } /** * Adds columns to the list of Users. * * @package s2Member\Users_List * @since 3.5 * * @attaches-to: ``add_filter ("manage_users_columns");`` * * @param array $columns Expects an array of columns to be passed through by the Filter. * @return array Array of columns, merged with columns introduced by this routine. */ public static function users_list_cols ( $cols = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_users_list_cols" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ $cols [ "s2member_registration_time" ] = "Registration Date" ; /**/ if ( apply_filters ( "ws_plugin__s2member_users_list_cols_display_paid_registration_times" , false ) ) $cols [ "s2member_paid_registration_times" ] = "Paid Registr. Date" ; /**/ $cols [ "s2member_subscr_id" ] = "Paid Subscr. ID" ; /**/ if ( ! is_multisite ( ) || !c_ws_plugin__s2member_utils_conds:: is_multisite_farm ( ) || is_main_site ( ) ) $cols [ "s2member_ccaps" ] = "Custom Capabilities" ; /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "custom_reg_fields" ] ) foreach ( json_decode ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "custom_reg_fields" ] , true ) as $field ) { $field_var = preg_replace ( "/[^a-z0-9]/i" , "_" , strtolower ( $field [ "id" ] ) ) ; $field_id_class = preg_replace ( "/_/" , "-" , $field_var ) ; /**/ $field_title = ucwords ( preg_replace ( "/_/" , " " , $field_var ) ) ; $cols [ "s2member_custom_field_" . $field_var ] = $field_title ; } /**/ $cols [ "s2member_login_counter" ] = "# Of Logins" ; /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_users_list_cols" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ return apply_filters ( "ws_plugin__s2member_users_list_cols" , $cols , get_defined_vars ( ) ) ; } /** * Displays column data in the row of details. * * @package s2Member\Users_List * @since 3.5 * * @attaches-to: ``add_filter ("manage_users_custom_column");`` * * @param str $val A value for this column, passed through by the Filter. * @param str $col The name of the column for which we might need to supply data for. * @param int|str $user_id Expects a WordPress® User ID, passed through by the Filter. * @return str A column value introduced by this routine, or existing value, or, if empty, a dash. */ public static function users_list_display_cols ( $val = FALSE , $col = FALSE , $user_id = FALSE ) { static $user , $last_user_id ; /* Used internally for optimization. */ static $fields , $last_fields_id ; /* Used for optimization. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_users_list_display_cols" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ $user = ( is_object ( $user ) && $user_id === $last_user_id ) ? $user : new WP_User ( $user_id ) ; /**/ if ( $col === "s2member_registration_time" ) $val = ( ( $time = strtotime ( get_date_from_gmt ( $user - user_registered ) ) ) ) ? esc_html ( date ( "D M jS, Y" , $time ) ) . 'br /small@ precisely ' . esc_html ( date ( "g:i a" , $time ) ) . '/small' : "—" ; /**/ else if ( $col === "s2member_paid_registration_times" ) { $val = "" ; /* Initialize $val before we begin. */ if ( is_array ( $v = get_user_option ( "s2member_paid_registration_times" , $user_id ) ) ) foreach ( $v as $level = $time ) /* Go through each Paid Registration Time. */ { $time = strtotime ( get_date_from_gmt ( date ( "Y-m-d H:i:s" , $time ) ) ) ; /**/ if ( $level === "level" ) /* First Payment Time, regardless of Level. */ $val .= ( ( $val ) ? "br /" : "" ) . 'span title="' . esc_attr ( date ( "D M jS, Y" , $time ) ) . ' @ precisely ' . esc_attr ( date ( "g:i a" , $time ) ) . '"' . esc_html ( date ( "D M jS, Y" , $time ) ) . '/span' ; else if ( preg_match ( "/^level([0-9]+)$/i" , $level ) && ( $level = preg_replace ( "/^level/" , "" , $level ) ) ) $val .= ( ( $val ) ? "br /" : "" ) . 'smallem@Level ' . esc_html ( $level ) . ': span title="' . esc_attr ( date ( "D M jS, Y" , $time ) ) . ' @ precisely ' . esc_attr ( date ( "g:i a" , $time ) ) . '"' . esc_html ( date ( "D M jS, Y" , $time ) ) . '/span/em/small' ; } } /**/ else if ( $col === "s2member_subscr_id" ) $val = ( $v = get_user_option ( "s2member_subscr_id" , $user_id ) ) ? esc_html ( $v ) : "—" ; /**/ else if ( $col === "s2member_ccaps" ) /* Custom Capabilities. */ { foreach ( $user - allcaps as $cap = $cap_enabled ) if ( preg_match ( "/^access_s2member_ccap_/" , $cap ) ) $ccaps [ ] = preg_replace ( "/^access_s2member_ccap_/" , "" , $cap ) ; /**/ $val = ( ! empty ( $ccaps ) ) ? implode ( "br /" , $ccaps ) : "—" ; } /**/ else if ( preg_match ( "/^s2member_custom_field_/" , $col ) ) { if ( ! $last_fields_id || $last_fields_id !== $user_id ) $fields = get_user_option ( "s2member_custom_fields" , $user_id ) ; /**/ $field_var = preg_replace ( "/^s2member_custom_field_/" , "" , $col ) ; /**/ if ( isset ( $fields [ $field_var ] ) && is_string ( $fields [ $field_var ] ) && preg_match ( "/^http(s?)\:/i" , $fields [ $field_var ] ) ) $val = 'a href="' . esc_attr ( $fields [ $field_var ] ) . '" target="_blank"' . esc_html ( substr ( $fields [ $field_var ] , strpos ( $fields [ $field_var ] , ":" ) + 3 , 25 ) . "..." ) . '/a' ; /**/ else if ( isset ( $fields [ $field_var ] ) && is_array ( $fields [ $field_var ] ) && ! empty ( $fields [ $field_var ] ) ) $val = preg_replace ( "/-\|br\|-/" , "br /" , esc_html ( implode ( "-|br|-" , $fields [ $field_var ] ) ) ) ; /**/ else if ( isset ( $fields [ $field_var ] ) && is_string ( $fields [ $field_var ] ) && strlen ( $fields [ $field_var ] ) ) $val = esc_html ( $fields [ $field_var ] ) ; /**/ $last_fields_id = $user_id ; /* Record this. */ } /**/ else if ( $col === "s2member_login_counter" ) $val = ( $v = get_user_option ( "s2member_login_counter" , $user_id ) ) ? esc_html ( $v ) : "—" ; /**/ $last_user_id = $user_id ; /* Record this for internal optimizations. */ /**/ return apply_filters ( "ws_plugin__s2member_users_list_display_cols" , ( ( strlen ( $val ) ) ? $val : "—" ) , get_defined_vars ( ) ) ; } } } ? [ full view ]s2member\includes\classes\users-list.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 3:14 pm


]]>
2011-07-11T17:30:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=27753#p27753 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: July 11, 2011, 6:30 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\users-list.inc.php ?php /** * Users list. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\Users_List * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_users_list" ) ) { /** * Users list. * * @package s2Member\Users_List * @since 3.5 */ class c_ws_plugin__s2member_users_list { /** * Adds Custom Fields to the admin Profile editing page. * * @package s2Member\Users_List * @since 3.5 * * @attaches-to: ``add_action("edit_user_profile");`` * @attaches-to: ``add_action("show_user_profile");`` * * @param obj $user Expects a `WP_User` object passed in by the Action Hook. * @return inner Return-value of inner routine. */ public static function users_list_edit_cols ( $user = FALSE ) { return c_ws_plugin__s2member_users_list_in:: users_list_edit_cols ( $user ) ; } /** * Saves Custom Fields after an admin updates Profile. * * @package s2Member\Users_List * @since 3.5 * * @attaches-to: ``add_action("edit_user_profile_update");`` * @attaches-to: ``add_action("personal_options_update");`` * * @param int|str $user_id Expects a numeric WordPress® User ID passed in by the Action Hook. * @return inner Return-value of inner routine. */ public static function users_list_update_cols ( $user_id = FALSE ) { return c_ws_plugin__s2member_users_list_in:: users_list_update_cols ( $user_id ) ; } /** * Modifies the search query. * * Affects searches performed in the list of Users. * * @package s2Member\Users_List * @since 3.5 * * @attaches-to: ``add_action("pre_user_query");`` * * @param obj $query Expects a `WP_User_Query` object, by reference. * @return null After possibly modifying the ``$query`` object. */ public static function users_list_query ( & $query = FALSE ) { global $wpdb ; /* Need this global object reference. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_users_list_search" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( isset ( $query - query_vars ) && !is_network_admin ( ) ) /* NOT in Network admin panels. */ if ( is_array ( $qv = $query - query_vars ) && ( $s = trim ( $qv [ "search" ] , "* \t \n \r \0 \x0B" ) ) && ( $s = "%" . esc_sql ( like_escape ( $s ) ) . "%" ) ) { $query - query_from = " FROM `" . $wpdb - users . "` INNER JOIN `" . $wpdb - usermeta . "` ON `" . $wpdb - users . "`.`ID` = `" . $wpdb - usermeta . "`.`user_id`" ; /**/ $query - query_where = " WHERE '1' = '1' AND (" . apply_filters ( "ws_plugin__s2member_before_users_list_search_where_or_before" , "" , get_defined_vars ( ) ) ; $query - query_where .= " (`" . $wpdb - usermeta . "`.`meta_key` = '" . $wpdb - prefix . "s2member_subscr_id' AND `" . $wpdb - usermeta . "`.`meta_value` LIKE '" . $s . "')" ; $query - query_where .= " OR (`" . $wpdb - usermeta . "`.`meta_key` = '" . $wpdb - prefix . "s2member_custom' AND `" . $wpdb - usermeta . "`.`meta_value` LIKE '" . $s . "')" ; $query - query_where .= " OR (`" . $wpdb - usermeta . "`.`meta_key` = '" . $wpdb - prefix . "s2member_custom_fields' AND `" . $wpdb - usermeta . "`.`meta_value` LIKE '" . $s . "')" ; $query - query_where .= " OR `user_login` LIKE '" . $s . "' OR `user_nicename` LIKE '" . $s . "' OR `user_email` LIKE '" . $s . "' OR `user_url` LIKE '" . $s . "' OR `display_name` LIKE '" . $s . "'" ; $query - query_where .= apply_filters ( "ws_plugin__s2member_before_users_list_search_where_or_after" , "" , get_defined_vars ( ) ) . ")" ; /* Leaving room for additional searches here. */ $query - query_where .= " AND `" . $wpdb - users . "`.`ID` IN(SELECT DISTINCT(`user_id`) FROM `" . $wpdb - usermeta . "` WHERE `meta_key` = '" . $wpdb - prefix . "capabilities'" . /**/ ( ( $qv [ "role" ] ) ? " AND `meta_value` LIKE '%" . esc_sql ( like_escape ( $qv [ "role" ] ) ) . "%'" : "" ) . ")" ; /**/ $query - query_from = apply_filters ( "ws_plugin__s2member_before_users_list_search_from" , $query - query_from , get_defined_vars ( ) ) ; $query - query_where = apply_filters ( "ws_plugin__s2member_before_users_list_search_where" , $query - query_where , get_defined_vars ( ) ) ; } /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_after_users_list_search" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ return ; /* Return for uniformity. */ } /** * Adds columns to the list of Users. * * @package s2Member\Users_List * @since 3.5 * * @attaches-to: ``add_filter ("manage_users_columns");`` * * @param array $columns Expects an array of columns to be passed through by the Filter. * @return array Array of columns, merged with columns introduced by this routine. */ public static function users_list_cols ( $cols = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_users_list_cols" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ $cols [ "s2member_registration_time" ] = "Registration Date" ; /* Date they signed up. */ /**/ if ( apply_filters ( "ws_plugin__s2member_users_list_cols_display_paid_registration_times" , false ) ) $cols [ "s2member_paid_registration_times" ] = "Paid Registr. Date" ; /* Payment Times. */ /**/ $cols [ "s2member_subscr_id" ] = "Paid Subscr. ID" ; /* Special field that is always applied. */ /**/ if ( ! is_multisite ( ) || !c_ws_plugin__s2member_utils_conds:: is_multisite_farm ( ) || is_main_site ( ) ) /* ^ Will change once Custom Capabilities are compatible with a Blog Farm. */ $cols [ "s2member_ccaps" ] = "Custom Capabilities" ; /* Custom Capabilities. */ /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "custom_reg_fields" ] ) foreach ( json_decode ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "custom_reg_fields" ] , true ) as $field ) { $field_var = preg_replace ( "/[^a-z0-9]/i" , "_" , strtolower ( $field [ "id" ] ) ) ; $field_id_class = preg_replace ( "/_/" , "-" , $field_var ) ; /**/ $field_title = ucwords ( preg_replace ( "/_/" , " " , $field_var ) ) ; $cols [ "s2member_custom_field_" . $field_var ] = $field_title ; } /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_users_list_cols" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ return apply_filters ( "ws_plugin__s2member_users_list_cols" , $cols , get_defined_vars ( ) ) ; } /** * Displays column data in the row of details. * * @package s2Member\Users_List * @since 3.5 * * @attaches-to: ``add_filter ("manage_users_custom_column");`` * * @param str $val A value for this column, passed through by the Filter. * @param str $col The name of the column for which we might need to supply data for. * @param int|str $user_id Expects a WordPress® User ID, passed through by the Filter. * @return str A column value introduced by this routine, or existing value, or, if empty, a dash. */ public static function users_list_display_cols ( $val = FALSE , $col = FALSE , $user_id = FALSE ) { static $user , $last_user_id ; /* Used internally for optimization. */ static $fields , $last_fields_id ; /* Used for optimization. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_users_list_display_cols" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ $user = ( is_object ( $user ) && $user_id === $last_user_id ) ? $user : new WP_User ( $user_id ) ; /**/ if ( $col === "s2member_registration_time" ) $val = ( ( $time = strtotime ( get_date_from_gmt ( $user - user_registered ) ) ) ) ? esc_html ( date ( "D M jS, Y" , $time ) ) . 'br /small@ precisely ' . esc_html ( date ( "g:i a" , $time ) ) . '/small' : "—" ; /**/ else if ( $col === "s2member_paid_registration_times" ) { $val = "" ; /* Initialize $val before we begin. */ if ( is_array ( $v = get_user_option ( "s2member_paid_registration_times" , $user_id ) ) ) foreach ( $v as $level = $time ) /* Go through each Paid Registration Time. */ { $time = strtotime ( get_date_from_gmt ( date ( "Y-m-d H:i:s" , $time ) ) ) ; /**/ if ( $level === "level" ) /* First Payment Time, regardless of Level. */ $val .= ( ( $val ) ? "br /" : "" ) . 'span title="' . esc_attr ( date ( "D M jS, Y" , $time ) ) . ' @ precisely ' . esc_attr ( date ( "g:i a" , $time ) ) . '"' . esc_html ( date ( "D M jS, Y" , $time ) ) . '/span' ; else if ( preg_match ( "/^level([0-9]+)$/i" , $level ) && ( $level = preg_replace ( "/^level/" , "" , $level ) ) ) $val .= ( ( $val ) ? "br /" : "" ) . 'smallem@Level ' . esc_html ( $level ) . ': span title="' . esc_attr ( date ( "D M jS, Y" , $time ) ) . ' @ precisely ' . esc_attr ( date ( "g:i a" , $time ) ) . '"' . esc_html ( date ( "D M jS, Y" , $time ) ) . '/span/em/small' ; } } /**/ else if ( $col === "s2member_subscr_id" ) $val = ( $v = get_user_option ( "s2member_subscr_id" , $user_id ) ) ? esc_html ( $v ) : "—" ; /**/ else if ( $col === "s2member_ccaps" ) /* Custom Capabilities. */ { foreach ( $user - allcaps as $cap = $cap_enabled ) if ( preg_match ( "/^access_s2member_ccap_/" , $cap ) ) $ccaps [ ] = preg_replace ( "/^access_s2member_ccap_/" , "" , $cap ) ; /**/ $val = ( ! empty ( $ccaps ) ) ? implode ( "br /" , $ccaps ) : "—" ; } /**/ else if ( preg_match ( "/^s2member_custom_field_/" , $col ) ) { if ( ! $last_fields_id || $last_fields_id !== $user_id ) $fields = get_user_option ( "s2member_custom_fields" , $user_id ) ; /**/ $field_var = preg_replace ( "/^s2member_custom_field_/" , "" , $col ) ; /**/ if ( isset ( $fields [ $field_var ] ) && is_string ( $fields [ $field_var ] ) && preg_match ( "/^http(s?)\:/i" , $fields [ $field_var ] ) ) $val = 'a href="' . esc_attr ( $fields [ $field_var ] ) . '" target="_blank"' . esc_html ( substr ( $fields [ $field_var ] , strpos ( $fields [ $field_var ] , ":" ) + 3 , 25 ) . "..." ) . '/a' ; /**/ else if ( isset ( $fields [ $field_var ] ) && is_array ( $fields [ $field_var ] ) && ! empty ( $fields [ $field_var ] ) ) $val = preg_replace ( "/-\|br\|-/" , "br /" , esc_html ( implode ( "-|br|-" , $fields [ $field_var ] ) ) ) ; /**/ else if ( isset ( $fields [ $field_var ] ) && is_string ( $fields [ $field_var ] ) && strlen ( $fields [ $field_var ] ) ) $val = esc_html ( $fields [ $field_var ] ) ; /**/ $last_fields_id = $user_id ; /* Record this. */ } /**/ $last_user_id = $user_id ; /* Record this for internal optimizations. */ /**/ return apply_filters ( "ws_plugin__s2member_users_list_display_cols" , ( ( strlen ( $val ) ) ? $val : "—" ) , get_defined_vars ( ) ) ; } } } ? [ full view ]s2member\includes\classes\users-list.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — July 11th, 2011, 5:30 pm


]]>
2011-07-09T06:10:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13090&p=25385#p25385 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\users-list.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — July 9th, 2011, 6:10 am


]]>