How do I manage my users post before publish?
What role are you assigning to those users? According to Roles and Capabilities documentation in Codex it should be Contributor for users that are allowed to write posts, but not publish them.
What role are you assigning to those users? According to Roles and Capabilities documentation in Codex it should be Contributor for users that are allowed to write posts, but not publish them.
First in your category.php (depending on your theme files) add a simple form to let the user sort A-Z or Z-A: <form action=”” name=”custom_order” method=”POST”> <p> sort order: <select name=”CU_Order” id=”CU_Order”> <option value=”ASC”>A-Z</option> <option value=”DESC”>Z-A</option> </select> </p> <p> <input type=”hidden” name=”cs_action” value=”custom_sort_order”> <input type=”submit” name=”submit” value=”sort”> </p> </form> then using pre_get_posts hook you alter the … Read more
Here is code I wrote to automatically move the users from site A to site B within a network en masse. May need running twice <?php add_action( ‘admin_init’, ‘user_move_init’ ); add_action( ‘admin_menu’, ‘user_move_add_page’ ); /** * Init plugin options to white list our options */ function user_move_init(){ register_setting( ‘user_move’, ‘user_move’, ‘user_move_validate’ ); } /** * … Read more
You can remove the read capability from subscribers, which is what gives them access to the dashboard. This is best done with an activation hook on a plugin — it only needs to be done once. <?php register_activation_hook( __FILE__, ‘wpse43054_activation’ ); function wpse43054_activation() { $role = get_role( ‘subscriber’ ); if( $role ) $role->remove_cap( ‘read’ ); … Read more
It is possible to write code to grab the user’s password on login and write it out in a different format to a different location. Over time, you would thus accumulate the passwords in a different format than WordPress itself uses (it makes use of the excellent PHPass library for password storage). To do this, … Read more
After a good bit of tinkering I’ve come up with something. It’s certainly not the BEST method, but since there’s not a good way to do it through the core directly without having to do a bunch of array-reordering, I think SQL is a better solution here. Anyways, the SQL is as follows: SELECT users.*, … Read more
You can try using the profile_update hook. Codex link here. It fires after updating, but supplies a copy of the old user data, so you can get the current email address, compare it with the old one and change back if necessary.
I have tested your code on my side, and it works perfectly. The relevant info displays, whether I’m logged in or not. This is definitely not a problem with your code, but more an external problem. You will need to look for any type of code that might restrict this code from showing if a … Read more
Based on your comments, you should choose option 2 (using special template files). You can do that multiple ways, but I suggest you do the following: Create a plugin that will setup login, register, retrieve password, profile, delete account, and other related pages; (there will be a lot of pages). Creating a plugin is just … Read more
WordPress caches the user information. There’s really no problem just to call get_userdata every time you need it. The only thing you are doing by transfering it to a variable $userdata is have WP fetch it from another place in the memory. Note: read this post for a more general dealing with passing variables to … Read more