Browse Source

functions

windhamdavid 3 weeks ago
parent
commit
65e6cddb42
4 changed files with 105 additions and 38 deletions
  1. 52 0
      functions.php
  2. 31 20
      patterns/footer.php
  3. 11 3
      style.css
  4. 11 15
      theme.json

+ 52 - 0
functions.php

@@ -43,6 +43,33 @@ add_action('updated_option', 'uhp24_browsersync_save', 10, 3);
 
 add_filter( 'show_admin_bar', '__return_false' );
 
+add_action( 'login_enqueue_scripts', 'uhp24_login_logo' );
+function uhp24_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 esc_url( $logo_image[0] ); ?>);
+        background-size:cover;
+        height:110px;
+		    width:320px;
+      }
+      body.login {
+        background-color: #0F1B44 !important;
+      }
+      .login #nav a {
+        color: #E9E4DC !important;
+      }
+      .login #backtoblog a {
+        display: none !important;
+      }
+    </style>
+<?php }
+
+add_filter( 'login_headerurl', 'uhp24_login_url' );
+function uhp24_login_url() {  return home_url(); }
+
+
 add_filter('admin_title', 'uhp24_admin_title', 10, 2);
 function uhp24_admin_title($admin_title, $title) {
     return $title .' - '. get_bloginfo('name');
@@ -221,6 +248,8 @@ function uhp24_sort_last_login_column( $query ) {
 ######################## Editor ############################
 ************************************************************/
 
+add_filter( 'styles_inline_size_limit', '__return_zero' );
+
 add_action( 'enqueue_block_assets', 'uhp24_block_styles', 5 );
 function uhp24_block_styles(){
 	wp_enqueue_style('uhp24-css', get_stylesheet_directory_uri() . '/style.css');
@@ -236,6 +265,29 @@ function uhp24_disable_remote_patterns() {
 	return false;
 }
 
+add_action( 'init', 'dwp23_disable_emojis' );
+function dwp23_disable_emojis() {
+	remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
+	remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
+	remove_action( 'wp_print_styles', 'print_emoji_styles' );
+	remove_action( 'admin_print_styles', 'print_emoji_styles' );
+	remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
+	remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
+	remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
+	add_filter( 'emoji_svg_url', '__return_false' );
+}
+
+add_action( 'init', 'uhp24_cleaner_header' );
+function uhp24_cleaner_header() {
+	remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10);
+  remove_action('wp_head', 'wlwmanifest_link');
+  remove_action('wp_head', 'rsd_link');
+	remove_action('wp_head', 'wp_shortlink_wp_head', 10);
+	remove_action('wp_head', 'wp_generator');
+	remove_action('wp_head', 'feed_links_extra', 3 );
+	remove_action('wp_head', 'feed_links', 2 );
+}
+
 
 /***********************************************************
 ####################### Comments ###########################

+ 31 - 20
patterns/footer.php

@@ -14,25 +14,42 @@
 	<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|50"}}}} -->
 	<div class="wp-block-group alignwide container" style="padding-top:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--50)">
 		
-
+	<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
+	<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
+	<!-- /wp:spacer -->
 		
 		<!-- wp:columns {"style":{"spacing":{"padding":{"top":"var:preset|spacing|10"}}}} -->
 		<div class="wp-block-columns" style="padding-top:var(--wp--preset--spacing--10)">
 			
 			<!-- wp:column {"width":"50%"} -->
 			<div class="wp-block-column" style="flex-basis:50%">
-				<!-- wp:paragraph -->
-				<p>
-				</p>
+
+				<!-- wp:image {"id":385,"width":"160px","height":"auto","sizeSlug":"full","linkDestination":"none"} -->
+				<figure class="wp-block-image size-full is-resized"><img src="https://uhp.ovid/wp-content/uploads/Upstate-Health-Partners-white.png" alt="" class="wp-image-385" style="width:160px;height:auto"/></figure>
+				<!-- /wp:image -->
+
+				<!-- wp:paragraph {"style":{"typography":{"lineHeight":"0","font-size":"1.2rem"}}} -->
+				<p style="font-size:1.2rem;line-height:0"> PO Box 1234</p>
+				<!-- /wp:paragraph -->
+
+				<!-- wp:paragraph {"style":{"typography":{"lineHeight":"0","font-size":"1.2rem"}}} -->
+				<p style="font-size:1.2rem;line-height:0"> City, SC 12345</p>
 				<!-- /wp:paragraph -->
-				<!-- wp:paragraph -->
-				<p class="fs-3"> <a class="link-light" href="https://www.linkedin.com/company/the-greenwood-promise?trk=public_post_follow-view-profile" target="_blank"><i class="bi bi-linkedin"></i></a> <a class="link-light" href="https://www.facebook.com/TheGreenwoodPromise/" target="_blank"><i class="bi bi-facebook"></i></a> <a class="link-light" href="https://twitter.com/thegwdpromise" target="_blank"><i class="bi bi-twitter-x"></i></a> <a class="link-light" href="https://www.instagram.com/greenwoodpromise/" target="_blank"><i class="bi bi-instagram"></i></a></p>
+
+				<!-- wp:paragraph {"style":{"typography":{"lineHeight":"0","font-size":"1.2rem"}}} -->
+				<p style="font-size:1.2rem;line-height:0"> 888-123-4567</p>
 				<!-- /wp:paragraph -->
+
+				<!-- wp:paragraph {"style":{"typography":{"lineHeight":"0","font-size":"1.2rem"}}} -->
+				<p style="font-size:1.2rem;line-height:0"> email@uhp.org</p>
+				<!-- /wp:paragraph -->
+
 				<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
 				<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
 				<!-- /wp:spacer -->
-			</div>
-			<!-- /wp:column -->
+
+		</div>
+		<!-- /wp:column -->
 			
 			<!-- wp:column {"width":"50%"} -->
 			<div class="wp-block-column" style="flex-basis:50%">
@@ -40,19 +57,9 @@
 				<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","orientation":"horizontal"}} -->
 				<div class="wp-block-group">
 
-					<!-- wp:heading {"level":3,"style":{"typography":{"fontStyle":"normal","fontSize":"large","fontWeight":"100"}}} -->
-					<h3 class="wp-block-heading has-large-font-size has-text-color-base has-font-weight-100"></h3>
-					<!-- /wp:heading -->
-
 				</div>
 				<!-- /wp:group -->
 
-				<!-- wp:query -->
-				<div class="wp-block-query">
-					<!-- wp:pattern {"slug":"uhp/query-short"} /-->
-				</div>
-				<!-- /wp:query -->
-
 			</div>
 			<!-- /wp:column -->
 
@@ -72,8 +79,12 @@
 			</div>
 			<!-- /wp:group -->
 
-			<!-- wp:paragraph -->
-			<p class="float-end mb-1"><a href="#"><i class="bi bi-arrow-up-circle-fill text-light fs-2"></i></a></p>
+			<!-- wp:paragraph {"className":"float-end","style":{"typography":{"font-size":"2rem"}}} -->
+			<p style="font-size:2rem" class="float-end has-primary-link-color"><a href="#"><span class="dashicons dashicons-arrow-up"></span>&#8679;</a></p>
+			<!-- /wp:paragraph -->
+
+			<!-- wp:paragraph {"style":{"typography":{"font-size":"0.8rem"},"elements":{"link":{"color":{"text":"var:preset|color|highlight"}}}}} -->
+			<p class="float-end has-small-font-size has-contrast-color has-text-color">Last Updated: <?php echo get_the_modified_time('F jS, Y');?></p>
 			<!-- /wp:paragraph -->
 
 		</div>

+ 11 - 3
style.css

@@ -20,10 +20,18 @@ img {
   max-width: 100%;
   height: auto;
 }
+.dashicons-arrow-up {
+  content: "\f142";
+}
 
-.negative-bottom-margin {
+.negative-bottom-margin-20 {
+  margin-bottom: -20px !important;
+}
+.negative-bottom-margin-30 {
   margin-bottom: -30px !important;
-  opacity: 1;
+}
+.negative-bottom-margin-50 {
+  margin-bottom: -50px !important;
 }
 
 .wp-block-navigation a {
@@ -48,6 +56,6 @@ img {
   font-weight: 600;
 }
 .wp-block-latest-posts li {
-  margin-bottom: 5em !important;
+  margin-bottom: 3em !important;
 }
 

+ 11 - 15
theme.json

@@ -27,7 +27,7 @@
 				},
 				{
 					"slug": "contrast",
-					"color": "#696B6E",
+					"color": "#5D6168",
 					"name": "Contrast"
 				},
 				{
@@ -87,6 +87,16 @@
 					"colors": ["#009C9F", "#FFFFFF"],
 					"slug": "primary-light",
 					"name": "Primary Light"
+				},
+				{
+					"colors": ["#009C9F", "#19458C"],
+					"slug": "primary-secondary",
+					"name": "Primary Secondary"
+				},
+				{
+					"colors": ["#e5f6f7", "#FFFFFF"],
+					"slug": "primary-light-light",
+					"name": "Primary Light Light"
 				}
 			]
 		},
@@ -108,20 +118,6 @@
 					"name": "Monospace",
 					"slug": "monospace",
 					"fontFamily": "Consolas,Menlo,Monaco,\"SF Mono\",\"DejaVu Sans Mono\",\"Roboto Mono\",\"Courier New\",Courier,monospace"
-				},
-				{
-					"name": "Amatic",
-					"slug": "amatic",
-					"fontFamily": "Amatic",
-					"fontFace": [
-						{
-							"src": "file:./css/fonts/amatic-sc-v22-latin-700.woff2",
-							"fontFamily": "\"Amatic\"",
-							"fontWeight": "400",
-							"fontStyle": "normal",
-							"fontDisplay": "swap"
-						}
-					]
 				}
 			],
 			"fontSizes": [