Trac #31711 - refresh "is_front_page flag affected by frontpage ID and page Title strange conflict"
This code change updates original changes from the trac ticket below, to match the current code from WordPress Trunk. Everything should match what the original patch submitter added, with the exception of strict type checking between integers.
Trac ticket: See https://core.trac.wordpress.org/ticket/31711
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 props-bot label.
Core Committers: Use this line as a base for the props when committing in SVN:
Props tw2113, mukesh27.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.
Test using WordPress Playground
The 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
- The Plugin and Theme Directories cannot be accessed within Playground.
- All changes will be lost when closing a tab with a Playground instance.
- All changes will be lost when refreshing the page.
- A fresh instance is created each time the link below is clicked.
- Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance, it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.
@tw2113 The unit tests going failed, could you please check it?
Still checking on the unit test portion.
Notes for future me:
7) Tests_Query_Conditionals::test_page_on_front
is_front_page is false but is expected to be true.
/var/www/tests/phpunit/includes/abstract-testcase.php:1145
/var/www/tests/phpunit/tests/query/conditionals.php:49
/var/www/vendor/bin/phpunit:122
8) Tests_Query_Conditionals::test_is_front_page_id_equals_the_title_of_other_page
Failed asserting that false is true.
/var/www/tests/phpunit/tests/query/conditionals.php:1321
/var/www/vendor/bin/phpunit:122
9) Tests_Query_VerbosePageRules::test_page_on_front
is_front_page is false but is expected to be true.
/var/www/tests/phpunit/includes/abstract-testcase.php:1145
/var/www/tests/phpunit/tests/query/conditionals.php:49
/var/www/vendor/bin/phpunit:122
10) Tests_Query_VerbosePageRules::test_is_front_page_id_equals_the_title_of_other_page
Failed asserting that false is true.
/var/www/tests/phpunit/tests/query/conditionals.php:1321
/var/www/vendor/bin/phpunit:122
@mukeshpanchal27 This is ready for re-review after fixing strict type checking.
Thanks.