--- /dev/null
+<?php
+
+/*
+Plugin Name: Gaslightify
+Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
+Description: A gasline to a Wordpress website.
+Version: 1.26
+Author: Gaslight Media
+Author URI: http://www.gaslightmedia.com
+License: Gaslight Media
+*/
+
+//function basic_content_replace ($text){
+//$text = str_replace(‘Old’,’New’,$text)
+//return $text;
+//}
+//add_filter(‘the_content’,’basic_content_replace’);
+//add_filter(‘the_title’,’basic_content_replace’);
+
+function my_admin_theme_style() {
+// wp_enqueue_style('my-admin-theme', plugins_url('css/Gaslightify.css', __FILE__));
+}
+add_action('admin_enqueue_scripts', 'my_admin_theme_style');
+add_action('login_enqueue_scripts', 'my_admin_theme_style');
+
+function my_admin_footer() {
+ echo '<p>This Theme was made by <a href="http://www.gaslightmedia.com">Gaslight Media</a>.</p>';
+}
+
+add_action('admin_footer_text', 'my_admin_footer');
+
+function left_admin_footer_text_output($text) {
+// $text = '<p>This Theme was made by <a href="http://www.gaslightmedia.com">Gaslight Media</a>.</p>';
+ return $text;
+}
+
+add_filter('update_footer', 'right_admin_footer_text_output', 11, true); //right side
+function right_admin_footer_text_output($text) {
+ $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_style('GaslightifyStyle');
+ 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__));
+
+ }
+}
+
+
+
+add_filter('login_errors','login_error_message');
+
+function login_error_message($error){
+ //check if that's the error you are looking for
+ $pos = strpos($error, 'incorrect');
+ if (is_int($pos)) {
+ //its the right error so you can overwrite it
+ $error = "Invalid Credentials. Please ensure the username and password you entered are correct.";
+ }
+ return $error;
+}
+
+
+add_action('admin_bar_menu', 'glm_custom_logo');
+
+function glm_custom_logo() {
+ ?>
+ <style type="text/css">
+
+ #adminmenu .wp-menu-image img {
+ content: url(<?php echo plugins_url(); ?>/Gaslightify/img/GLM_flame_box_inverted_16x16b.png) !important;
+ }
+ #dashboard_activity .no-activity .smiley:before {
+ content: url(<?php echo bloginfo('template_url', __FILE__); ?>/assets/DashboardActivityLogo.png);
+ }
+ #wp-admin-bar-wp-logo > .ab-item .ab-icon:before, #header-logo {
+ content: url(<?php echo plugins_url(); ?>/Gaslightify/img/GLM_flame_none_trans_32x32.png) !important;
+ }
+ </style>
+ <?php
+
+}
+
+add_action('login_form','my_login_logo');
+
+function my_login_logo() { ?>
+ <style type="text/css">
+
+ #login > h1 > a {
+ background-image: url(<?php echo plugins_url(); ?>/Gaslightify/img/GLM_title_box_272x71.gif);
+ width: auto;
+ background-size: auto;
+ }
+ </style>
+
+<?php }
+
+function replace_howdy( $wp_admin_bar ) {
+ $my_account=$wp_admin_bar->get_node('my-account');
+ $newtitle = str_replace( 'Howdy,', 'Welcome back,', $my_account->title . "!" );
+ $wp_admin_bar->add_node( array(
+ 'id' => 'my-account',
+ 'title' => $newtitle,
+ ) );
+ }
+ add_filter( 'admin_bar_menu', 'replace_howdy',25 );
+?>