Skip to content

Commit

Permalink
Merge pull request #4243 from Codeinwp/fix/footer_schema
Browse files Browse the repository at this point in the history
Fix/footer schema
  • Loading branch information
vytisbulkevicius authored Jul 2, 2024
2 parents da3a223 + d8e247f commit f998c88
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions e2e-tests/specs/customizer/hfg/hfg-copyright-component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,26 @@ test('Checks the copyright in front-end', async ({ page }) => {
await expect(
page.locator('.hfg_footer .footer--row[data-show-on="desktop"]')
).toHaveText('Neve | Powered by WordPress');
await expect(
page
.locator('.hfg_footer .footer--row[data-show-on="desktop"] a')
.nth(0)
).toHaveAttribute('href', 'https://themeisle.com/themes/neve/');
await expect(
page
.locator('.hfg_footer .footer--row[data-show-on="desktop"] a')
.nth(1)
).toHaveAttribute('href', 'https://wordpress.org');

// Check that the text is also present for the Mobile footer
await expect(
page.locator('.hfg_footer .footer--row[data-show-on="mobile"]')
).toHaveText('Neve | Powered by WordPress');

await expect(
page.locator('.hfg_footer .footer--row[data-show-on="mobile"] a').nth(0)
).toHaveAttribute('href', 'https://themeisle.com/themes/neve/');
await expect(
page.locator('.hfg_footer .footer--row[data-show-on="mobile"] a').nth(1)
).toHaveAttribute('href', 'https://wordpress.org');
});
2 changes: 1 addition & 1 deletion header-footer-grid/Core/Builder/Footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function add_footer_component( $builder, $row, $slot ) {
/* translators: %1$s is Theme Name ( Neve ), %2$s is WordPress */
esc_html__( '%1$s | Powered by %2$s', 'neve' ),
wp_kses_post( '<p><a href="https://themeisle.com/themes/neve/" rel="nofollow">Neve</a>' ),
wp_kses_post( '<a href="http://wordpress.org" rel="nofollow">WordPress</a></p>' )
wp_kses_post( '<a href="https://wordpress.org" rel="nofollow">WordPress</a></p>' )
);
$output .= '</div></div></div></div>';

Expand Down

0 comments on commit f998c88

Please sign in to comment.