Browse Source

dry blank canvas and seedlet

Ben Dwyer 4 years ago
parent
commit
f0b991b363

+ 0 - 43
blank-canvas/footer.php

@@ -1,43 +0,0 @@
-<?php
-/**
- * The template for displaying the footer
- *
- * Contains the closing of the #content div and all content after.
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package Blank Canvas
- * @since 1.0
- */
-
-?>
-
-	</div><!-- #content -->
-
-	<footer id="colophon" class="site-footer default-max-width" role="contentinfo" aria-label="<?php esc_attr_e( 'Footer', 'blank-canvas' ); ?>">
-
-		<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; ?>
-			<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'seedlet' ) ); ?>" class="imprint">
-				<?php
-				/* translators: %s: WordPress. */
-				printf( __( 'Proudly powered by %s.', 'seedlet' ), 'WordPress' );
-				?>
-			</a>
-			<?php
-			if ( function_exists( 'the_privacy_policy_link' ) ) {
-				the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-			}
-			?>
-		</div><!-- .site-info -->
-	</footer><!-- #colophon -->
-
-</div><!-- #page -->
-
-<?php wp_footer(); ?>
-
-</body>
-</html>

+ 1 - 0
blank-canvas/template-parts/footer/footer-content.php

@@ -0,0 +1 @@
+<?php get_template_part( 'template-parts/footer/footer-info' );

+ 1 - 36
seedlet/footer.php

@@ -15,42 +15,7 @@
 	</div><!-- #content -->
 
 	<footer id="colophon" class="site-footer default-max-width" role="contentinfo" aria-label="<?php esc_attr_e( 'Footer', 'seedlet' ); ?>">
-
-		<?php if ( false === get_theme_mod( 'hide_site_footer', false ) ) : ?>
-			<?php get_template_part( 'template-parts/footer/footer-widgets' ); ?>
-
-			<?php if ( has_nav_menu( 'footer' ) ) : ?>
-			<nav class="footer-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Menu', 'seedlet' ); ?>">
-				<?php
-				wp_nav_menu(
-					array(
-						'theme_location' => 'footer',
-						'menu_class'     => 'footer-menu',
-						'depth'          => 1,
-					)
-				);
-				?>
-			</nav><!-- .footer-navigation -->
-			<?php endif; ?>
-		<?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; ?>
-			<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'seedlet' ) ); ?>" class="imprint">
-				<?php
-				/* translators: %s: WordPress. */
-				printf( __( 'Proudly powered by %s.', 'seedlet' ), 'WordPress' );
-				?>
-			</a>
-			<?php
-			if ( function_exists( 'the_privacy_policy_link' ) ) {
-				the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-			}
-			?>
-		</div><!-- .site-info -->
+		<?php get_template_part( 'template-parts/footer/footer-content' ); ?>
 	</footer><!-- #colophon -->
 
 </div><!-- #page -->

+ 7 - 0
seedlet/template-parts/footer/footer-content.php

@@ -0,0 +1,7 @@
+<?php if ( false === get_theme_mod( 'hide_site_footer', false ) ) : ?>
+	<?php get_template_part( 'template-parts/footer/footer-widgets' ); ?>
+	<?php get_template_part( 'template-parts/footer/footer-menu' ); ?>
+<?php endif; ?>
+
+<?php
+get_template_part( 'template-parts/footer/footer-info' );

+ 17 - 0
seedlet/template-parts/footer/footer-info.php

@@ -0,0 +1,17 @@
+<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; ?>
+	<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'seedlet' ) ); ?>" class="imprint">
+		<?php
+		/* translators: %s: WordPress. */
+		printf( __( 'Proudly powered by %s.', 'seedlet' ), 'WordPress' );
+		?>
+	</a>
+	<?php
+	if ( function_exists( 'the_privacy_policy_link' ) ) {
+		the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
+	}
+	?>
+</div><!-- .site-info -->

+ 13 - 0
seedlet/template-parts/footer/footer-menu.php

@@ -0,0 +1,13 @@
+<?php if ( has_nav_menu( 'footer' ) ) : ?>
+	<nav class="footer-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Menu', 'seedlet' ); ?>">
+		<?php
+		wp_nav_menu(
+			array(
+				'theme_location' => 'footer',
+				'menu_class'     => 'footer-menu',
+				'depth'          => 1,
+			)
+		);
+		?>
+	</nav><!-- .footer-navigation -->
+<?php endif; ?>