How to give “author” user role appropriate capabilities to add PollDaddy polls? WordPress multisite

Open the file “polldaddy.php” and look near the first few dozen lines for this: $this->is_admin = (bool) current_user_can( ‘manage_options’ ); Change that to $this->is_admin = (bool) current_user_can( ‘edit_posts’ ); That would in theory grant authors and above the same access as an admin – you have to test yourself to be sure. See the admin_menu() … Read more

Grant access to admin menu?

I am not claiming this is a canonical list but the user related capabilities I see are: add_users create_users delete_users edit_users list_users promote_users remove_users I got this working with only list_users and edit_users. I did test all combinations of those, just a few obvious ones. Of course, you may want more capabilities than that.

Capability to read/edit page in wp-admin only for administrators

Thanks brasofilo! add_action( ‘pre_get_posts’, ‘hide_pages_to_user_except_admins’ ); function hide_pages_to_user_except_admins( $query ) { if( !is_admin() ) return $query; global $pagenow; $pages = array(‘201′,’38’,’99’); //page ids if( ‘edit.php’ == $pagenow && ( get_query_var(‘post_type’) && ‘page’ == get_query_var(‘post_type’) ) ) $query->set( ‘post__not_in’, $pages ); return $query; }

Is there a way of retrieving the core WP capabilities?

As said in comment above is more easy remove the added capabilities. Below, as example, a simple implementation: class MyAwesomePlugin { static $capabilities = array(‘a_cap’=> true, ‘another_one’=> true, ‘third_cap’=> true); static $custom_roles = array(‘one_role’ => ‘One Role’, ‘second_role’ => ‘Second Role’); static $core_roles = array(‘administrator’, ‘editor’, ‘author’); static function install() { // add custom capabilities … Read more

Can’t create new Pods pages

I found the problem. There was a line of code that was deleting all posts as soon they were created. It may seems slly but it was wanted, I’m building a really custom app based on wordpress… Simply I forgot that this would cancel many other things that pods saves as post, like pods pages … Read more