-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Twenty Nineteen: Enhance get_the_archive_title filter flexibility #10734
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
Twenty Nineteen: Enhance get_the_archive_title filter flexibility #10734
Conversation
Changes the priority of the default get_the_archive_title filter in Twenty Nineteen from 10 to 1. This allows plugins and child themes to override the title using the default priority of 10, instead of requiring a higher priority. Props mukesh27. Fixes #45955.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
| return $title; | ||
| } | ||
| add_filter( 'get_the_archive_title', 'twentynineteen_get_the_archive_title' ); | ||
| add_filter( 'get_the_archive_title', 'twentynineteen_get_the_archive_title', 1 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this change would also need to be applied to Twenty Twenty:
| add_filter( 'get_the_archive_title', 'twentytwenty_get_the_archive_title' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I add this also on Twenty Twenty latest commit.
|
Closing per https://core.trac.wordpress.org/ticket/45955#comment:7 Thank you for opening a PR! |
Description
Changes the priority of the
get_the_archive_titlefilter intwentynineteen_get_the_archive_titlefrom 10 to 1. This allows plugins and child themes to override the archive title using the default priority of 10, resolving conflict issues where the theme would forcefully overwrite plugin customizations.This PR refreshes the initial patch provided by @mukesh27.
I tested the patch and confirmed that everything behaves as expected. The patch just needed a refresh, so I am submitting this PR to update the initial patch.
Tickets: https://core.trac.wordpress.org/ticket/45955
Steps to Reproduce
functions.php) with the following code to override the archive title at the default priority (10):Test Report