Themes: Add a return value to theme functions calling locate_template():

* `get_header()`
* `get_footer()`
* `get_sidebar()`
* `get_template_part()`

These functions now return false if the template file could not be found, to allow for easier debugging.

Props tferry, sphakka, johnbillion, pento, davidbinda, desrosj, birgire, garrett-eclipse, williampatton, davidbaumwald, SergeyBiryukov.
Fixes #40969.

git-svn-id: https://develop.svn.wordpress.org/trunk@48209 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-06-28 23:08:57 +00:00
parent 43823df70a
commit 9f053c58fe
5 changed files with 65 additions and 10 deletions

View File

@@ -0,0 +1 @@
Footer

View File

@@ -0,0 +1 @@
Header

View File

@@ -0,0 +1 @@
Sidebar