How can I prevent a writer from being able to edit an article that has been scheduled?

Me, like @fischi think that filter ‘user_has_cap’ is the best choiche for the pourpose, however, I think that is better to the work, regardless the $_GET post or action: WordPress check the meta cabability on a per-post basis, using an additional argument. In few words, when filtering ‘user_has_cap’ for a meta capability (see https://codex.wordpress.org/Function_Reference/map_meta_cap) we … Read more

What is the difference between “create_users” and “add_users” capabilities?

I explored WordPress to find difference between it and in schema.php file i found the following function only where in WordPress add_users capability is used. /** * Create and modify WordPress roles for WordPress 3.0. * * @since 3.0.0 */ function populate_roles_300() { $role =& get_role( ‘administrator’ ); if ( !empty( $role ) ) { … Read more

Is there a simple way to manage capabilities per user?

You don’t necessarily have to assign roles to manage the user’s capabilities. First, register your custom post types with their respective capabilities. See capabilities under Function Reference/register post type – Parameters Managing User Capabilities You can use add_cap or remove_cap to add or remove user capabilities for a specific user. // Add capability to a … Read more

How to allow Unfiltered HTML in a wordpress multisite install

This had me baffled for a while as well. Not exactly a solution for your problem, but this should get you on your way. add_action( ‘admin_init’, ‘my_kses_remove_filters’ ); function my_kses_remove_filters() { $current_user = wp_get_current_user(); if ( my_user_has_role( ‘administrator’, $current_user ) ) kses_remove_filters(); } function my_user_has_role( $role=””, $user = null ) { $user = $user ? … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)