From afdcaf0da9131f9ccda94bbb71ffd17bfc0c8c33 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Wed, 22 Oct 2014 16:45:10 -0400 Subject: [PATCH] Nextgen cleanup --- Gaslightify.php | 37 +++++++++++++++++-------------------- css/Gaslightify.css | 4 +++- js/Gaslightify.js | 7 +++++-- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/Gaslightify.php b/Gaslightify.php index 4b6c91d..d3dfcd4 100755 --- a/Gaslightify.php +++ b/Gaslightify.php @@ -17,6 +17,22 @@ License: Gaslight Media //add_filter(‘the_content’,’basic_content_replace’); //add_filter(‘the_title’,’basic_content_replace’); +add_action('admin_enqueue_scripts', 'interface_client_safeguard'); + +function interface_client_safeguard() { + if ( current_user_can( 'manage_options' ) ) { + /* A user with admin privileges */ + + } else { + /* A user without admin privileges */ + wp_enqueue_script('GaslightifyJs', plugins_url('js/Gaslightify.js', __FILE__),array(),'1.0.0', true); + wp_enqueue_style('GaslightifyStyle', plugins_url('css/Gaslightify.css', __FILE__)); + if ( is_multisite() ) { + wp_enqueue_style('GaslightifyMSStyle', plugins_url('css/GaslightifyMS.css', __FILE__)); + } + } +} + function my_admin_theme_style() { // wp_enqueue_style('my-admin-theme', plugins_url('css/Gaslightify.css', __FILE__)); } @@ -24,7 +40,7 @@ add_action('admin_enqueue_scripts', 'my_admin_theme_style'); add_action('login_enqueue_scripts', 'my_admin_theme_style'); function my_admin_footer() { - echo '

This Theme was made by Gaslight Media.

'; + echo '

This Theme was created by Gaslight Media.

'; } add_action('admin_footer_text', 'my_admin_footer'); @@ -40,24 +56,6 @@ function right_admin_footer_text_output($text) { return $text; } -add_action('admin_enqueue_scripts', 'interface_client_safeguard'); - -function interface_client_safeguard() { - if ( current_user_can( 'manage_options' ) ) { - /* A user with admin privileges */ - - } else { - /* A user without admin privileges */ - wp_enqueue_script('GaslightifyJs', plugins_url('js/Gaslightify.js', __FILE__),array(),'1.0.0', true); - wp_enqueue_style('GaslightifyStyle', plugins_url('css/Gaslightify.css', __FILE__)); - if ( is_multisite() ) { - wp_enqueue_style('GaslightifyMSStyle', plugins_url('css/GaslightifyMS.css', __FILE__)); - } - } -} - - - add_filter('login_errors','login_error_message'); function login_error_message($error){ @@ -70,7 +68,6 @@ function login_error_message($error){ return $error; } - add_action('admin_bar_menu', 'glm_custom_logo'); function glm_custom_logo() { diff --git a/css/Gaslightify.css b/css/Gaslightify.css index 14fc117..94859e8 100755 --- a/css/Gaslightify.css +++ b/css/Gaslightify.css @@ -20,7 +20,9 @@ select[name="seo_filter"], #toplevel_page_wpcf7, #wp-admin-bar-blog-4-n, #wp-admin-bar-blog-4-c, -.http-off { +.http-off, +#ngg_page_content #side-container, +#ngg_about_meta_box { display: none !important; } // To delete the dashboard menu option diff --git a/js/Gaslightify.js b/js/Gaslightify.js index bd120d1..bcb9297 100755 --- a/js/Gaslightify.js +++ b/js/Gaslightify.js @@ -11,8 +11,11 @@ jQuery(document).ready(function(){ jQuery("#wp-admin-bar-wp-logo").hover(function() { return false; }); - var jurl = jQuery(".ngg-gallery-thumbnail").attr("title"); - jQuery(".ngg-gallery-thumbnail").attr("href","http://gaslight.upnorth.net/our-work/"+jurl); + jQuery("#ngg_page_content .wrap h2").text("GLM Photo Gallery"); + jQuery("#ngg_page_content #dashboard_right_now .hndle span").text("Welcome to the gallery!"); + jQuery('#toplevel_page_nextgen-gallery ul li:contains("Gallery Settings")').css('display', 'none'); + jQuery('#toplevel_page_nextgen-gallery ul li:contains("Other Options")').css('display', 'none'); + jQuery('#toplevel_page_nextgen-gallery ul li:contains("Upgrade to Pro")').css('display', 'none'); jQuery("#wp-admin-bar-wp-logo > .ab-item").attr("href","#").attr("title",""); jQuery('#wp-admin-bar-my-account > a').attr("href","#").attr("title",""); -- 2.17.1