Browse Source

Create a template for privacy policy

Ben Dwyer 4 years ago
parent
commit
2fd4a1f46c

+ 7 - 6
alves/template-parts/footer/footer-content.php

@@ -3,23 +3,24 @@
 	<?php
 		$template = new A8C\FSE\WP_Template();
 		$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
-	else : // Otherwise we'll fallback to the default Varia footer below. ?>
+	else : // Otherwise we'll fallback to the default Varia footer below.
+		?>
 	<footer id="colophon" class="site-footer">
 		<?php
 		if ( ! ( true === get_theme_mod( 'hide_site_footer', false ) && is_front_page() && is_page() ) ) : // If this is the homepage and the footer elements are set to hide, don't load this part.
 			get_template_part( 'template-parts/footer/footer', 'widgets' );
-		endif; ?>
+		endif;
+		?>
 
 		<div id="footer-info-wrapper">
 
 		<?php
 		if ( ! ( true === get_theme_mod( 'hide_site_footer', false ) && is_front_page() && is_page() ) ) : // If this is the homepage and the footer elements are set to hide, don't load this part.
-			if ( function_exists( 'the_privacy_policy_link' ) ) {
-				the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-			}
+			get_template_part( 'template-parts/footer/privacy-policy', '' );
 			get_template_part( 'template-parts/footer/footer', 'navigation' );
 		endif;
-		get_template_part( 'template-parts/footer/footer', 'info' ); ?>
+		get_template_part( 'template-parts/footer/footer', 'info' );
+		?>
 		</div>
 	<?php endif; ?>
 

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

@@ -48,11 +48,7 @@
 		?>
 
 	<div class="site-info">
-		<?php
-		if ( function_exists( 'the_privacy_policy_link' ) ) {
-			the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-		}
-		?>
+		<?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>

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

@@ -23,11 +23,7 @@
 			/* translators: %s: WordPress. */
 			printf( __( 'proudly powered by %s.', 'varia' ), 'WordPress' );
 			?>
-			<?php
-			if ( function_exists( 'the_privacy_policy_link' ) ) {
-				the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-			}
-			?>
 		</a>
+		<?php get_template_part( 'template-parts/footer/privacy-policy', '' ); ?>
 	</div><!-- .site-info -->
 </footer><!-- #colophon -->

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

@@ -35,10 +35,6 @@
 			printf( __( 'proudly powered by %s.', 'varia' ), 'WordPress' );
 			?>
 		</a>
-		<?php
-		if ( function_exists( 'the_privacy_policy_link' ) ) {
-			the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-		}
-		?>
+		<?php get_template_part( 'template-parts/footer/privacy-policy', '' ); ?>
 	</div><!-- .site-info -->
 </footer><!-- #colophon -->

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

@@ -6,9 +6,7 @@
 		else : // Otherwise we'll fallback to the default footer below.
 			get_template_part( 'template-parts/footer/footer', 'widgets' );
 
-			if ( function_exists( 'the_privacy_policy_link' ) ) {
-				the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-			}
+			get_template_part( 'template-parts/footer/privacy-policy', '' );
 
 			if ( has_nav_menu( 'social' ) ) : ?>
 				<nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'rockfield' ); ?>">

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

@@ -1,11 +1,6 @@
 <footer id="colophon" class="site-footer">
 	<?php get_template_part( 'template-parts/footer/footer', 'widgets' ); ?>
-	<?php
-	if ( function_exists( 'the_privacy_policy_link' ) ) {
-		the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-	}
-	?>
-
+	<?php get_template_part( 'template-parts/footer/privacy-policy', '' ); ?>
 <?php if ( has_nav_menu( 'social' ) ) : ?>
 	<nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'rockfield' ); ?>">
 	<?php

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

@@ -16,15 +16,7 @@
 		</nav><!-- .social-navigation -->
 	<?php endif; ?>
 	<div class="site-info">
-		<?php
-		if ( function_exists( 'the_privacy_policy_link' ) ) {
-			?>
-			<div class="privacy-policy-container">
-			<?php the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' ); ?>
-			</div>
-			<?php
-		}
-		?>
+		<?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>

+ 9 - 0
stratford/template-parts/footer/privacy-policy.php

@@ -0,0 +1,9 @@
+<?php
+if ( function_exists( 'the_privacy_policy_link' ) ) {
+	?>
+	<div class="privacy-policy-container">
+	<?php the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' ); ?>
+	</div>
+	<?php
+}
+?>

+ 8 - 7
varia/template-parts/footer/footer-info.php

@@ -3,12 +3,13 @@
 	<?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 /* translators: 1: WordPress link, 2: WordPress. */
-	printf( '<a href="%1$s" class="imprint">proudly powered by %2$s</a>.',
+	<?php
+	/* translators: 1: WordPress link, 2: WordPress. */
+	printf(
+		'<a href="%1$s" class="imprint">proudly powered by %2$s</a>.',
 		esc_url( __( 'https://wordpress.org/', 'varia' ) ),
 		'WordPress'
-	); ?>
-	<?php if ( function_exists( 'the_privacy_policy_link' ) ) {
-		the_privacy_policy_link();
-	} ?>
-</div><!-- .site-info -->
+	);
+	?>
+	<?php get_template_part( 'template-parts/footer/privacy-policy', '' ); ?>
+</div><!-- .site-info -->

+ 3 - 0
varia/template-parts/footer/privacy-policy.php

@@ -0,0 +1,3 @@
+<?php if ( function_exists( 'the_privacy_policy_link' ) ) {
+	the_privacy_policy_link();
+}