wp_enqueue_style('GaslightifyMultiSiteStyle', plugins_url('css/GaslightifyMultiSite.css', __FILE__));
}
}
- if (!current_user_can('edit_posts')) {
+ if ( !current_user_can( 'edit_posts' ) ) {
?>
<style type="text/css">
#menu-posts, #menu-comments {
</style>
<?php
}
+ if ( !current_user_can( 'edit_others_posts' ) ) {
+ ?>
+ <style type="text/css">
+ #menu-comments {
+ display: none !important;
+ }
+ </style>
+ <?php
+ }
wp_enqueue_style('GaslightifyGlobalStyle', plugins_url('css/GaslightifyGlobal.css', __FILE__));
add_editor_style( 'scss/admin/tinymce.css' );
}
';
}
function Gaslightify_menu() {
- add_menu_page('Server Stats', 'Server Stats', 'edit_posts', 'glm_stats', 'glm_stats', 'dashicons-chart-area');
- if (class_exists('Ninja_Forms')) {
- add_menu_page('Form Submissions', 'Form Submissions', 'edit_posts', 'edit.php?post_type=nf_sub', '', 'dashicons-feedback');
+ if ( current_user_can( 'edit_others_posts' ) ) {
+ add_menu_page('Server Stats', 'Server Stats', 'edit_posts', 'glm_stats', 'glm_stats', 'dashicons-chart-area');
+ if (class_exists('Ninja_Forms')) {
+ add_menu_page('Form Submissions', 'Form Submissions', 'edit_posts', 'edit.php?post_type=nf_sub', '', 'dashicons-feedback');
+ }
}
}
add_action('admin_menu', 'Gaslightify_menu');