Fixes #16436. Allow filtering of indexable creation. #18222
+124
−48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This changeset standardises the order in which the type of the indexable page is determined. It also adds two filters, so developers can manipulate the order and logic with which the indexables are created far easier than is currently the case.
This PR can be summarized in the following changelog entry: changelog:bugfix, changelog: enhancement
wpseo_frontend_page_type_mapping
andwpseo_frontend_indexable_mapping
. These filters allow developers to change the order and logic of the creation of indexables.Relevant technical choices:
term_archive
line over thepost_type_archive
line, as I think in most cases the term archive title will be more specific and valuable than the post archive title.static_posts_page
seems to be missing from theIndexable_Repository::for_current_page
method. It is unclear if this is intentional.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Test instructions for QA when the code is in the RC
UI changes
Other environments
[shopify-seo]
and I have added test instructions for Shopify.Documentation
Quality assurance
Fixes #16436