Browse Source

replace site name code with a template

Ben Dwyer 4 năm trước cách đây
mục cha
commit
b43950c5b5

+ 2 - 5
alves/template-parts/footer/footer-info.php

@@ -1,12 +1,9 @@
 <div class="site-info">
-	<?php $blog_info = get_bloginfo( 'name' ); ?>
-	<?php if ( ! empty( $blog_info ) ) : ?>
-		<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-	<?php endif; ?>
+	<?php get_template_part( 'template-parts/footer/site-name', '' ); ?>
 	<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'alves' ) ); ?>" class="imprint">
 		<?php
 		/* translators: %s: WordPress. */
 		printf( __( 'proudly powered by %s.', 'alves' ), 'WordPress' );
 		?>
 	</a>
-</div>
+</div>

+ 1 - 4
balasana/template-parts/footer/footer-content.php

@@ -49,10 +49,7 @@
 
 	<div class="site-info">
 		<?php get_template_part( 'template-parts/footer/privacy-policy', '' ); ?>
-		<?php $blog_info = get_bloginfo( 'name' ); ?>
-		<?php if ( ! empty( $blog_info ) ) : ?>
-			<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-		<?php endif; ?>
+		<?php get_template_part( 'template-parts/footer/site-name', '' ); ?>
 		<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'balasana' ) ); ?>" class="imprint">
 			<?php
 			/* translators: %s: WordPress. */

+ 1 - 4
brompton/template-parts/footer/footer-content.php

@@ -14,10 +14,7 @@
 		</nav><!-- .footer-navigation -->
 	<?php endif; ?>
 	<div class="site-info">
-		<?php $blog_info = get_bloginfo( 'name' ); ?>
-		<?php if ( ! empty( $blog_info ) ) : ?>
-			<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-		<?php endif; ?>
+		<?php get_template_part( 'template-parts/footer/site-name', '' ); ?>
 		<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'varia' ) ); ?>" class="imprint">
 			<?php
 			/* translators: %s: WordPress. */

+ 1 - 4
dalston/template-parts/footer/footer-content.php

@@ -25,10 +25,7 @@
 		?>
 
 	<div class="site-info">
-		<?php $blog_info = get_bloginfo( 'name' ); ?>
-		<?php if ( ! empty( $blog_info ) ) : ?>
-			<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-		<?php endif; ?>
+		<?php get_template_part( 'template-parts/footer/site-name', '' ); ?>
 		<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'varia' ) ); ?>" class="imprint">
 			<?php
 			/* translators: %s: WordPress. */

+ 1 - 4
rivington/template-parts/footer/footer-content.php

@@ -28,10 +28,7 @@
 		?>
 
 	<div class="site-info">
-		<?php $blog_info = get_bloginfo( 'name' ); ?>
-		<?php if ( ! empty( $blog_info ) ) : ?>
-			<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-		<?php endif; ?>
+		<?php get_template_part( 'template-parts/footer/site-name', '' ); ?>
 		<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'rivington' ) ); ?>" class="imprint">
 			<?php
 			/* translators: %s: WordPress. */

+ 1 - 4
rockfield/template-parts/footer/footer-content.php

@@ -31,10 +31,7 @@
 		</nav><!-- .footer-navigation -->
 	<?php endif; ?>
 	<div class="site-info">
-		<?php $blog_info = get_bloginfo( 'name' ); ?>
-		<?php if ( ! empty( $blog_info ) ) : ?>
-			<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-		<?php endif; ?>
+		<?php get_template_part( 'template-parts/footer/site-name', '' ); ?>
 		<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'rockfield' ) ); ?>" class="imprint">
 			<?php
 			/* translators: %s: WordPress. */

+ 1 - 4
stratford/template-parts/footer/footer-content.php

@@ -17,10 +17,7 @@
 	<?php endif; ?>
 	<div class="site-info">
 		<?php get_template_part( 'template-parts/footer/privacy-policy', '' ); ?>
-		<?php $blog_info = get_bloginfo( 'name' ); ?>
-		<?php if ( ! empty( $blog_info ) ) : ?>
-			<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-		<?php endif; ?>
+		<?php get_template_part( 'template-parts/footer/site-name', '' ); ?>
 		<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'varia' ) ); ?>" class="imprint">
 			<?php
 			/* translators: %s: WordPress. */

+ 1 - 4
varia/template-parts/footer/footer-info.php

@@ -1,8 +1,5 @@
 <div class="site-info">
-	<?php $blog_info = get_bloginfo( 'name' ); ?>
-	<?php if ( ! empty( $blog_info ) ) : ?>
-		<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-	<?php endif; ?>
+	<?php get_template_part( 'template-parts/footer/site-name', '' ); ?>
 	<?php
 	/* translators: 1: WordPress link, 2: WordPress. */
 	printf(

+ 4 - 0
varia/template-parts/footer/site-name.php

@@ -0,0 +1,4 @@
+<?php $blog_info = get_bloginfo( 'name' ); ?>
+<?php if ( ! empty( $blog_info ) ) : ?>
+	<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
+<?php endif; ?>