WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#11568 closed defect (bug) (invalid)

wp-settings.php can include functions.php twice which can cause theme to not display

Reported by: raysolomon Owned by:
Milestone: Priority: high
Severity: major Version: 2.9
Component: Themes Keywords: reporter-feedback
Focuses: Cc:

Description

In wp-settings.php it is possible for two conditions to be true in which will allow the inclusion of function.php twice. If this happens, the theme may not display.

I included a patch.

Attachments (1)

wp-settings.patch (632 bytes) - added by raysolomon 6 years ago.

Download all attachments as: .zip

Change History (4)

@raysolomon6 years ago

comment:1 @dd326 years ago

  • Keywords reporter-feedback added; has-patch removed

that logic is wrong.

The reason TEMPLATEPATH and STYLESHEETPATH are used is to serve Parent/Child themes.

What is the error you're seeing? What is the theme? Does the theme have a "Template:" header in its Style.css file?

comment:2 @raysolomon6 years ago

Ahh.. ok, I was re-declaring body_class() in the function.php file for my custom theme which was causing the error the whole time. Something I overlooked.

This ticket can be closed. I resolved my error.

comment:3 @dd326 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.