Browse Source

olor login url

windhamdavid 5 months ago
parent
commit
0fa02f2b0a
2 changed files with 48 additions and 2 deletions
  1. 46 0
      functions.php
  2. 2 2
      theme.json

+ 46 - 0
functions.php

@@ -142,6 +142,52 @@ function lps24_remove_help_tabs() {
     $screen->remove_help_tabs();
     $screen->remove_help_tabs();
 }
 }
 
 
+add_filter('site_url', 'lps24_wplogin_filter', 10, 3);
+function lps24_wplogin_filter( $url, $path, $orig_scheme ) {
+  $old = array( "/(wp-login\.php)/");
+  $new = array( "SRH");
+  return preg_replace( $old, $new, $url, 1);
+}
+
+add_filter( 'login_headerurl', 'lps24_login_url' );
+function lps24_login_url() {  return home_url(); }
+
+add_filter( 'login_headertext', 'lps24_login_title' );
+function lps24_login_title() { return get_option( 'blogname' ); }
+
+add_action( 'login_enqueue_scripts', 'lps24_login_logo' );
+function lps24_login_logo() {
+  $logo_image = wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' );
+  ?>
+    <style type="text/css">
+      #login h1 a, .login h1 a {
+        background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/img/_site-icon.png) !important;
+      }
+      body.login {
+        background-color: #001A40 !important;
+      }
+      .wp-core-ui .button-primary {
+        background: #19458c !important;
+        border-color: #001A40 !important;
+      }
+      .wp-core-ui .button-primary.focus, 
+      .wp-core-ui .button-primary.hover, 
+      .wp-core-ui .button-primary:focus, 
+      .wp-core-ui .button-primary:hover {
+        background: #001A40 !important;
+        border-color: #001A40 !important;
+      }
+      .login #nav a {
+        color: #E9E4DC !important;
+      }
+      .login #backtoblog a {
+        display: none !important;
+      }
+    </style>
+<?php }
+
+
+
 /***********************************************************
 /***********************************************************
 ####################### Comments ###########################
 ####################### Comments ###########################
 ************************************************************/
 ************************************************************/

+ 2 - 2
theme.json

@@ -27,12 +27,12 @@
 				},
 				},
 				{
 				{
 					"slug": "primary",
 					"slug": "primary",
-					"color": "#19458c",
+					"color": "#19448c",
 					"name": "Primary"
 					"name": "Primary"
 				},
 				},
 				{
 				{
 					"slug": "contrast",
 					"slug": "contrast",
-					"color": "#001A40",
+					"color": "#102C5B",
 					"name": "Contrast"
 					"name": "Contrast"
 				},
 				},
 				{
 				{