WordPress SEO by Yoast: Hide Meta Boxes in Posts for Non-admins

It didn’t say in the API docs on the Yoast SEO plugin site what the ID was and I don’t have a copy of Yoast at installed at disposal, but according to yoas-plugin-dir/admin/class-metabox.php line 144, the meta_box registered is; add_meta_box( ‘wpseo_meta’, …etc ); … Which is hooked onto add_meta_boxes hook on line 32 of the … Read more

what’s the meaning of the field wp_capabilities in table wp_usermeta

The wp_capabilities saves the value as serilized array, you can try it in your php or for this example here: http://blog.tanist.co.uk/files/unserialize/. The Code: a:1:{s:13:”administrator”;b:1;} Is: Array ( [administrator] => 1 ) Meaning the user is an administrator. You can add new roles to the database by running the function add_role, and only run it once!

Custom post type role permissions won’t let me read

Your custom post type looks like it’s set up properly. It works on my test install. Try this instead of whatever add_role and add_cap code you’re currently using. (For testing purposes only. Don’t use it in production code, for reasons outlined below.) It’s working for me: function prefix_set_up_supplier_role(){ remove_role( ‘supplier’ ); add_role( ‘supplier’, ‘Supplier’, array( … Read more

add_role() run only once?

The user roles and capabilities are saved in the database so once you have you have used add_role() its saved and then next load WordPress will know that role just like the built in roles. Now if you look at the function add_role() more specifically at line 141 you will see that it only saves … Read more

Reset default roles and capabilities

I use User Role Editor. You can delete added roles, and reset roles from the plugin page. To reset the administator role, you can, as of WP 3.4+, add define(‘URE_SHOW_ADMIN_ROLE’, 1); to your wp-config.php file. After having done so, you need to go to Users > User Role Editor and click “Reset”.

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