Check what capabilitie(s) an action requires
Check what capabilitie(s) an action requires
Check what capabilitie(s) an action requires
Not allow add New Page for role ‘editor’
I would recommend NOT forcing HTTPS quite yet. Instead, remove all that stuff in wp-config.php and in the .htaccess. Then, login to WordPress making sure you’re using the HTTPS link. If you can login, then you now know you can login as both HTTP and HTTPS. Then, you can force HTTPS. If you can login … Read more
Ok I got an solution for my case. Maybe a bit confusing but I did’nt saw anothere possibility to do this. If you know a better way let me know. First I hide the Edit Item in the Admin Menu: add_action( ‘admin_bar_menu’, array($this,’sa_classbook_remove_admin_bar_items’), 999 ); function sa_classbook_remove_admin_bar_items(){ global $wp_admin_bar; $wp_admin_bar->remove_node(‘user-admin’); } Then I check the … Read more
You can try something like this if ( is_myrole() ) { add_action( ‘some_menu’, ‘my_plugin_menu’ ); } function my_plugin_menu() { add_options_page(‘My Plugin Settings’, ‘My Plugin’, ‘manage_options’, ‘my-plugin-settings’, ‘my_plugin_admin_page’); }
Answering my own question, if your system is not performance-critical, you can use a plugin for it, such as User Role Editor: It supports multi-site, multiple roles per user and a lot more. Optionally, If I were to write it: If I would like to have total control over it and write my custom code, … Read more
you should follow the below code and also see the wordpress docs <?php function remove_menus(){ remove_menu_page( ‘index.php’ ); //Dashboard //remove_menu_page( ‘jetpack’ ); //Jetpack* //remove_menu_page( ‘edit.php’ ); //Posts //remove_menu_page( ‘upload.php’ ); //Media //remove_menu_page( ‘edit.php?post_type=page’ ); //Pages //remove_menu_page( ‘edit-comments.php’ ); //Comments //remove_menu_page( ‘themes.php’ ); //Appearance //remove_menu_page( ‘plugins.php’ ); //Plugins //remove_menu_page( ‘users.php’ ); //Users //remove_menu_page( ‘tools.php’ ); //Tools … Read more
save meta data of custom post type: WP_Error has no effect, even if insufficient capabilities
The recommended way of using RichText Component inside save function is – <RichText.Content tagName=”p” style={ styles } className={ className ? className : undefined } value={ content } dir={ direction } /> See, how this core paragraph block is doing it. Instead of using normal HTML use RichText Content on text fields
Multiple useres editing specified content