Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename filter back. #21498

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

thijsoo
Copy link
Contributor

@thijsoo thijsoo commented Jul 24, 2024

Context

  • Changes back an accidental rename.

Summary

This PR can be summarized in the following changelog entry:

  • Fixes a bug where the wpseo_posts_for_related_keywords filter would not work anymore since it was accidentally renamed.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Open a post and add a keyphrase to that post.
  • Paste wpseoScriptData.metabox.keyword_usage in the browser console to see the usage of this keyphrase.
  • Add the following code to your functions.php:
add_filter('wpseo_posts_for_related_keywords', 'enhance_related_keywords');

function enhance_related_keywords($posts) {
	$posts['extraPost'] = ['22'];
	return $posts;
}
  • Refresh you post and paste wpseoScriptData.metabox.keyword_usage again to see the extraPost keyword also added.

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #21497

@thijsoo thijsoo added changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog fix-before-release labels Jul 24, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9e1a48fa6f36bda97414335286d4c62ced486123

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on change_back_renamed_filter at 50.412%

Totals Coverage Status
Change from base Build 8cb9ce535ca7f67c532c79aecd5742c47a3e9dea: 50.4%
Covered Lines: 16076
Relevant Lines: 31889

💛 - Coveralls

@enricobattocchi enricobattocchi self-assigned this Jul 24, 2024
Copy link
Member

@enricobattocchi enricobattocchi left a comment

Choose a reason for hiding this comment

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

CR & ACC ✅

@enricobattocchi enricobattocchi added this to the 23.2 milestone Jul 24, 2024
@enricobattocchi enricobattocchi merged commit 33c40eb into release/23.2 Jul 24, 2024
23 checks passed
@enricobattocchi enricobattocchi deleted the change_back_renamed_filter branch July 24, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants