[Plugin: ThreeWP Activity Monitor] Sort Login Statistics within User List
-
I’d like to sort the latest Login Statistics on the user list. I’ve tried retrieving the information from ThreeWP_Activity_Monitor.php but have been unsuccessful. I’m able to cause the list to sort but the information does not correspond appropriately. I think I may have the meta_key incorrect. Any idea how I could resolve this?
function user_column_sortable($columns) { $custom = array( // meta column id => sortby value used in query '3wp_activity_monitor' => 'latest_login', ); return wp_parse_args($custom, $columns); } add_filter( 'manage_users_sortable_columns', 'user_column_sortable' ); function sortable_user_column( $vars ) { if ( isset( $vars['orderby'] ) && 'latest_login' == $vars['orderby'] ) { $vars = array_merge( $vars, array( 'meta_key' => latest_login, 'orderby' => 'meta_value' ) ); } return $vars; } add_filter( 'request', 'sortable_user_column' );
https://www.ads-software.com/extend/plugins/threewp-activity-monitor/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: ThreeWP Activity Monitor] Sort Login Statistics within User List’ is closed to new replies.