Posts visible when 'edit posts' capability
authorLaury GvR <laury@gaslightmedia.com>
Tue, 16 Dec 2014 18:52:48 +0000 (13:52 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 16 Dec 2014 18:52:48 +0000 (13:52 -0500)
Gaslightify.php
css/Gaslightify.css
js/Gaslightify.js

index a3eec38..346419f 100755 (executable)
@@ -31,6 +31,15 @@ function interface_client_safeguard() {
             wp_enqueue_style('GaslightifyMSStyle', plugins_url('css/GaslightifyMS.css', __FILE__));
         }
     }
+    if (!current_user_can('edit_posts')) {
+        ?>
+        <style type="text/css"> 
+            #menu-posts, #menu-comments {
+                display: none !important;
+            }
+        </style>
+        <?php
+    }
 }
 
 add_action('after_setup_theme', 'GLM_general_settings');
index d7ed35b..493841c 100755 (executable)
@@ -2,8 +2,6 @@
 .update-nag,
 #screen-meta-links,
 select[name="seo_filter"],
-#menu-posts,
-#menu-comments,
 #menu-tools,
 #menu-users,
 #wp-admin-bar-edit-profile,
index 5c00194..4744e11 100755 (executable)
@@ -21,7 +21,8 @@ jQuery(document).ready(function(){
         
         /* MetaSlider */
         jQuery('#toplevel_page_metaslider .wp-menu-name').text("Slideshow");
-        jQuery('#toplevel_page_metaslider img').attr("src","");
+//        jQuery('#toplevel_page_metaslider img').attr("src",""); 
+//        would like this replaced with an icon before we get rid of it
         
         /* General WP */
         jQuery("#wp-admin-bar-wp-logo > .ab-item").attr("href","#").attr("title","");