WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#2556 closed defect (bug) (invalid)

Theme's functions.php needs to be include_once()'d

Reported by: markjaquith Owned by: anonymous
Priority: normal Milestone:
Component: Administration Version: 2.0.1
Severity: normal Keywords:
Cc:

Description

Before WP 2.0 came out, people were already bundling functions.php with some of their themes, and including it at the top of header.php or something like that. They get function redefined errors in WP 2.x because WP calls functions.php automatically.

WP should include_once() the theme's functions.php file to avoid this.

Change History (5)

comment:1 davidhouse7 years ago

Wouldn't help if the theme authors didn't use include_once, right?

comment:2 markjaquith7 years ago

  • Resolution set to invalid
  • Status changed from new to closed

bah, you're right. And if they include_once(), then it doesn't matter whether we _once or not... for some reason I was thinking that include_once() would prevent future include()s, not true. ... back you your regularly scheduled programming.

comment:3 davidhouse7 years ago

Wouldn't help if the theme authors didn't use include_once, right?

comment:4 davidhouse7 years ago

Stupid Firefox. Actually, stupid Session Saver.

comment:5 Nazgul6 years ago

  • Milestone 2.1 deleted
Note: See TracTickets for help on using tickets.