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

(DON'T MERGE) Only display default credit info if FSE is not active. #1612

Closed
wants to merge 4 commits into from

Conversation

noahtallen
Copy link
Contributor

@noahtallen noahtallen commented Oct 30, 2019

We'll be using the FSE footer credit block instead.

Note: This should NOT be deployed until the footer credit is included on WordPress.com.

Changes:

  • Move footer credit structure inside if statement which runs if FSE is not active.
  • (EDIT): Removed manual text align setting for credit if FSE is active. We want the user to set that with blocks (tm)

Testing:

  1. Pull these changes to your local FSE setup.
  2. The footer credit will no longer show up if FSE is active.
  3. The footer credit will show up if FSE is inactive.
  4. You can use the footer credit block from the below PR. If you put it in the footer, it should look identical to the implementation we are moving in this PR.

Related issue(s): Automattic/wp-calypso#37012

We want to use the footer credit block in FSE instead.
@noahtallen noahtallen requested a review from a team October 30, 2019 23:33
@noahtallen noahtallen self-assigned this Oct 30, 2019
Copy link
Contributor

@Copons Copons left a comment

Choose a reason for hiding this comment

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

I think you have moved the site-info into the wrong conditional block 😅

It's inside this:

themes/varia/footer.php

Lines 26 to 38 in dde2d7c

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;

But instead it should go at the end of this:

themes/varia/footer.php

Lines 23 to 39 in dde2d7c

else : // Otherwise we'll fallback to the default Varia footer below.
get_template_part( 'template-parts/footer/footer', 'widgets' );
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;
endif;

@noahtallen
Copy link
Contributor Author

Ah great catch! Does 34c3287 look right?

Copy link
Contributor

@Copons Copons left a comment

Choose a reason for hiding this comment

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

Changes in footer.php LGTM!

Though, there are some SCSS changes going on at the moment with the Varia themes, that might break stuff unexpectedly.
Since this change does not have any styling changes, do you mind removing the CSS files from the PR before merging?

@noahtallen
Copy link
Contributor Author

noahtallen commented Nov 1, 2019 via email

@Copons
Copy link
Contributor

Copons commented Nov 1, 2019

@noahtallen Ah, you're right, there are a few unrelated CSS changes but also related ones, sorry about it.

Anyway, yes let's wait for the Site Credit block, and deploy in sync! 👍

@noahtallen noahtallen changed the title Only display default credit info if FSE is not active. (DON'T MERGE) Only display default credit info if FSE is not active. Nov 1, 2019
@noahtallen
Copy link
Contributor Author

I'll wait to rebase until closer to release

@noahtallen
Copy link
Contributor Author

this will be superseded by proper FSE themes.

@noahtallen noahtallen closed this May 19, 2020
@pbking pbking deleted the fix/remove-site-credit-varia-fse branch September 13, 2021 17:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants