Update for allowing screen options on site
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 9 Jun 2015 19:53:23 +0000 (15:53 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 9 Jun 2015 19:53:23 +0000 (15:53 -0400)
for the users

functions.php
style.css

index 726eae4..62ac41e 100644 (file)
@@ -12,7 +12,8 @@ function setupLeadMenus()
         && !current_user_can('delete_posts')
         && is_admin()
     ) {
-        echo '<style>
+        if (!current_user_can('delete_posts')) {
+            echo '<style>
             #menu-posts,
             #menu-comments,
             #toplevel_page_glm_stats,
@@ -20,6 +21,19 @@ function setupLeadMenus()
                 display:none;
             }
             </style>';
+        }
+        echo '<style>
+            #screen-meta-links {
+                display: block !important;
+            }
+            </style>';
+            echo '<script>
+            function showGlmOpts(){
+                var el = document.getElementById("screen-meta-links");
+                el.setAttribute("style", "display:block !important;");
+            }
+            addEventListener("load", showGlmOpts);
+            </script>';
     }
 }
 add_action('admin_menu', 'setupLeadMenus');
index 950f106..3b16bb4 100644 (file)
--- a/style.css
+++ b/style.css
@@ -3,5 +3,5 @@ Theme Name: Munising CVB
 Author: Gaslight Media
 Author URI: http://www.gaslightmedia.com
 Description: A custom theme for Munising Convention and Visitor's Bureau.
-Version: 1.0.7
+Version: 1.0.8
 */