Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Try: Add hide site header/footer Customizer options to Varia #2961

Merged
merged 37 commits into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c6ff72a
Try: Add hide site header/footer Customizer options to Varia.
kjellr Jan 4, 2021
bfeedb6
Hide the footer widget area too.
kjellr Jan 6, 2021
7d979a0
Fix incorrect setting name.
kjellr Jan 6, 2021
6bee1f4
Fix another variable name.
kjellr Jan 6, 2021
cb5315e
Remove top margin and padding from entry content by default.
kjellr Jan 6, 2021
722be47
Merge branch 'trunk' into try/varia-header-footer-hide
kjellr Jan 12, 2021
007f935
Begin refactor to more closely match #2985
kjellr Jan 12, 2021
fd4c213
Tidy up into partials.
kjellr Jan 12, 2021
2e52a5e
footer info template part and Alves footer fix
MaggieCabrera Jan 19, 2021
4662cf6
refactor footer templates to make it easier to share code
scruffian Jan 19, 2021
2fd4a1f
Create a template for privacy policy
scruffian Jan 19, 2021
b43950c
replace site name code with a template
scruffian Jan 19, 2021
ffcae3f
move the WordPress credit into the site name template
scruffian Jan 19, 2021
4229d46
social navigation template part
MaggieCabrera Jan 19, 2021
00ed303
stratford social nav
MaggieCabrera Jan 19, 2021
bbbac69
header for Balasana
MaggieCabrera Jan 19, 2021
a15f25b
footer for Brompton
MaggieCabrera Jan 19, 2021
a458920
header for Coutoire
MaggieCabrera Jan 19, 2021
5156757
header Dalston
MaggieCabrera Jan 19, 2021
f5897b4
footer dalston, margin top header too
MaggieCabrera Jan 19, 2021
eec55a5
fix spacing
scruffian Jan 19, 2021
1f1d687
fix spacing
scruffian Jan 19, 2021
b35115c
header Morden
MaggieCabrera Jan 19, 2021
217cd6e
another small refactor
scruffian Jan 19, 2021
195bf6e
Merge branch 'try/varia-header-footer-hide' of github.com:Automattic/…
MaggieCabrera Jan 19, 2021
45286ee
Merge branch 'try/varia-header-footer-hide' of github.com:Automattic/…
scruffian Jan 19, 2021
cff4974
rockfield header and footer
MaggieCabrera Jan 19, 2021
07ab78f
Stow header
MaggieCabrera Jan 19, 2021
a436457
Merge branch 'try/varia-header-footer-hide' of github.com:Automattic/…
MaggieCabrera Jan 19, 2021
5227731
small refactor, rivington header and footer
MaggieCabrera Jan 19, 2021
6e1a598
Stratford header and footer
MaggieCabrera Jan 19, 2021
1e4cb5f
refactor FSE header templates
scruffian Jan 20, 2021
4a0a3ff
refactor FSE header templates
scruffian Jan 20, 2021
7f79b14
remove unconnected change
scruffian Jan 20, 2021
2260fd2
refactored site-navigation
MaggieCabrera Jan 20, 2021
65829ef
Merge branch 'try/varia-header-footer-hide' of github.com:Automattic/…
MaggieCabrera Jan 20, 2021
fce321c
fix spacing issues
scruffian Jan 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 0 additions & 69 deletions alves/footer.php

This file was deleted.

27 changes: 27 additions & 0 deletions alves/template-parts/footer/footer-content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
<footer class="fse-template-part fse-footer entry-content">
<?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.
?>
<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;
?>

<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.
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' );
?>
</div>
<?php endif; ?>

</footer><!-- #colophon -->
12 changes: 12 additions & 0 deletions alves/template-parts/footer/footer-info.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<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/', 'alves' ) ); ?>" class="imprint">
<?php
/* translators: %s: WordPress. */
printf( __( 'proudly powered by %s.', 'alves' ), 'WordPress' );
?>
</a>
</div>
88 changes: 0 additions & 88 deletions balasana/footer.php

This file was deleted.

63 changes: 63 additions & 0 deletions balasana/template-parts/footer/footer-content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<footer id="colophon" class="site-footer responsive-max-width">
<?php
if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content.
$template = new A8C\FSE\WP_Template();
$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
else : // Otherwise we'll fallback to the default Balasana footer below.
get_template_part( 'template-parts/footer/footer', 'widgets' );

if ( has_nav_menu( 'menu-2' ) || has_nav_menu( 'social' ) ) : ?>
<div class="footer-menus">

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

if ( has_nav_menu( 'social' ) ) :
?>
<nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'balasana' ); ?>">
<?php
wp_nav_menu(
array(
'theme_location' => 'social',
'menu_class' => 'social-links-menu',
'link_before' => '<span class="screen-reader-text">',
'link_after' => '</span>' . varia_get_icon_svg( 'link' ),
'depth' => 1,
)
);
?>
</nav><!-- .social-navigation -->
<?php endif; ?>

</div><!-- .footer-menus -->
<?php
endif;
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; ?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'balasana' ) ); ?>" class="imprint">
<?php
/* translators: %s: WordPress. */
printf( __( 'proudly powered by %s.', 'balasana' ), 'WordPress' );
?>
</a>
</div><!-- .site-info -->
</footer><!-- #colophon -->
57 changes: 0 additions & 57 deletions brompton/footer.php

This file was deleted.

29 changes: 29 additions & 0 deletions brompton/template-parts/footer/footer-content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<footer id="colophon" class="site-footer">
<?php get_template_part( 'template-parts/footer/footer', 'widgets' ); ?>
<?php if ( has_nav_menu( 'menu-2' ) ) : ?>
<nav class="footer-navigation" aria-label="<?php esc_attr_e( 'Footer Menu', 'varia' ); ?>">
<?php
wp_nav_menu(
array(
'theme_location' => 'menu-2',
'menu_class' => 'footer-menu',
'depth' => 1,
)
);
?>
</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; ?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'varia' ) ); ?>" class="imprint">
<?php
/* translators: %s: WordPress. */
printf( __( 'proudly powered by %s.', 'varia' ), 'WordPress' );
?>
</a>
<?php get_template_part( 'template-parts/footer/privacy-policy', '' ); ?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this is a change - previously the privacy policy was inside the wordpress.org link, but I assume that is a bug.

</div><!-- .site-info -->
</footer><!-- #colophon -->
Loading