Hi! I just hacked a file quickly to make administrative notes searchable, so we can find demoted users by typing their previous Payment IDs, amongst other things (thanks for leaving that for us to use @clavaque ).
To do that, I replaced FALSE
with TRUE
at line 97 (on Version 201209-RC, adjust if using another) of the file /s2member/src/includes/classes/users-list.inc.php
:
Original Version (search capability OFF, less resource intensive):
if(apply_filters(âws_plugin__s2member_users_list_search_admin_notesâ, FALSE, get_defined_vars())) // Off by default; this can get very slow on large sites.
Modified Version (search ON, sorry I donât know how to do this using an external file, so I just changed the original for now, Iâll update this once I learn how to do it ):
if(apply_filters(âws_plugin__s2member_users_list_search_admin_notesâ, TRUE, get_defined_vars())) // Off by default; this can get very slow on large sites.
I also added the column to the user list by adding some code, so itâs available under âscreen optionsâ if you want to see them as well:
New Line 155 ADDED:
$cols[âs2member_notesâ] = âNotesâ;
New Lines 250 & 251 ADDED (after adding the line above, just be sure the block is inserted BEFORE $last_user_id = $ user_id;
or youâll get a fatal error):
else if($col === âs2member_notesâ)
$val = ($v = get_user_option(âs2member_notesâ, $user_id)) ? esc_html($v) : âââ;
Please accept my apologies in advance for my inelegant job here, I just wanted a quick way to achieve that result and thatâs what I did for now.