Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- @ To enable the query monitor for all users, you need to give the view_query_monitor capability.
- @ The below code enable query monitor for all users even for non-logged-in one
- @ ref- https://stackoverflow.com/a/62670534/4954197
- **/
- add_action( 'init', function() {
- $current_user = wp_get_current_user();
- $current_user->add_cap( 'view_query_monitor' );
- } );
Add Comment
Please, Sign In to add comment