How can I control multiple editing of wordpress posts?
How can I control multiple editing of wordpress posts?
How can I control multiple editing of wordpress posts?
Locking Down WordPress Application Password Permissions / Capabilities
The read capability must be set to true, so they can access. Keep in mind, roles are saved to the database, when you run it on every init action, this is considered to be time consuming. The Codex suggests to run those actions in the register_activation_hook(). Since you are using this code in your theme, … Read more
#Update: Wow, I feel like such a buffoon… haha. WP_Role::has_cap I can’t (role) my eyes hard enough. $caps = array( ‘cap_1’, ‘cap_2’, ‘cap_3’ ); $roles = array( ‘administrator’, ‘editor’ ); foreach( $roles as $role ) { if( $role_object = get_role( $role ) ) { foreach( $caps as $cap ) { if( !$role_object->has_cap( $cap ) ) … Read more
If I understand you correctly, you want all attachment status set to ‘publish’ on upload in stead of ‘inherit’ to prevent that status changing when the parent post status changes. Let’s take a look at wp_insert_post if it offers any possibilities. First on line 3483 (current version) the post status is set to ‘inherit’ in … Read more
The problem is that when the special subscriber tries to Add New a sub-cpt post, it is denied permission. However, when the CPT menu is a top-admin-menu, then everything works out fine. The issue is related to the placement of the CPT’s UI menu in the back-end: if it’s top-level (show_in_menu=TRUE), all is well; if … Read more
Role Approved Comment plugin http://wordpress.org/extend/plugins/role-approved-comment/ This plugin will allow any specified role to have their comments automatically approved.
I figured it out on my own — the code snippet I needed to follow is here. Justin Tadlock is the man.
You should declare your desired capabilities when you are registering the post type. Justin’s article here is a good one for custom post types: http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress When you are registering your custom post type, you can set this to be standard capabilities for posts, eg: ‘capability_type’ => ‘post’, or to be standard capabilities for pages, eg. … Read more
Capabilities are stored in database, that is why they keep active even if you remove your function. Capabilities need to be expressly removed: $admin = get_role(‘author’); $admin->remove_cap( ‘edit_teacher’ ); And, because they are stored in database, you should stop adding them in every page load (as you are doing in init event). Usually, you should … Read more