Allow users with Editor role to edit menus (without a plugin)

Recently I had to tackle the same issue. Instead of setting the capability permanently for editors, I used user_has_cap filter to allow access dynamically. add_filter(‘user_has_cap’, ‘editor_allow_edit_menu’, 10, 4); function editor_allow_edit_menu($allcaps, $caps, $args, $user) { if ( ! isset( $allcaps[‘editor’] ) || true !== $allcaps[‘editor’] ) { return $allcaps; } global $pagenow; // new items are … Read more

Giving permission to anyone (non-users as well) with a password to edit a post, possible?

I would suggest having a generic form that can be completed by the public on the front end. The submission of the form would would generate the post, saving a random string in its meta data (the password), and send an email containing a link to /?p=PAGEID&post_id=THE_POST_ID&pw=THE_PASSWORD. THE_POST_ID and THE_PASSWORD are those values from the … Read more

Show metabox for a special role

The Download stats Metabox has a check for view_product_stats capability in EDD codes. in /easy-digital-downloads/includes/admin/downloads/metabox.php Line:42 if ( current_user_can( ‘view_product_stats’, get_the_ID() ) ) { /** Product Stats */ add_meta_box( ‘edd_product_stats’, sprintf( __( ‘%1$s Stats’, ‘easy-digital-downloads’ ), edd_get_label_singular(), edd_get_label_plural() ), ‘edd_render_stats_meta_box’, $post_type, ‘side’, ‘high’ ); } You can simply remove the view_product_stats capability for Your special … Read more