Deleting anonymous wp_users function not working?
Deleting anonymous wp_users function not working?
Deleting anonymous wp_users function not working?
Use the function current_user_can( $capability ). Where $capabilty applies. For example: If ( current_user_can( ‘update_plugins’ ){ //do some update plugin stuff }
Access level seems to have gone from admin to editor
You really should rename your field names with a hyphen (-) instead of an underscore. There is no solution for that other than replacing the underscores (_) for the hyphens (-) I read somewhere that the problem is with the new php naming conventions and when used in functions, it separates the words when an … Read more
I believe your issue is related to getting the correct post object on your single post page. From what I can detect from your question is that $post does not contain the post object which you expect. You must remember, $post is one of those very crappy globals which WordPress uses to store the current … Read more
How to bulk change user role to “No role for this site”
If your code, you use the first argument passed to wp_authenticate_user filter callback. That is a WP_User object, it not a email address and it is not a string. You may be confusing because of the name of the variable, $username, I suggest to change the name to $user, whcih is more appropiate and it … Read more
The Role Scoper plugin can enable this.
Seeing that the referenced answer stores users_online as an array of timestamps indexed by user ID, you can use the include argument for WP_User_Query: $args = array( ‘include’ => array_keys( $logged_in_users ), // Other arguments );
I found an answer here i will give this a try.. Confirmation required on email change