Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#17458 closed defect (bug) (fixed)

is_page_template() returns true for no page template

Reported by: johnbillion's profile johnbillion Owned by: ryan's profile ryan
Milestone: 3.2 Priority: normal
Severity: minor Version:
Component: Template Keywords: has-patch
Focuses: Cc:

Description

At some point the _wp_page_template post meta field went from being empty to having a value of 'default' for pages that have no template.

is_page_template() hasn't been updated to reflect this, and will return true for pages that do not have a template (unless you specify the $template parameter)

Patch upcoming.

Attachments (1)

17458.patch (521 bytes) - added by johnbillion 14 years ago.

Download all attachments as: .zip

Change History (4)

@johnbillion
14 years ago

#1 @johnbillion
14 years ago

  • Keywords has-patch added

Patch

#2 @scribu
14 years ago

  • Milestone changed from Awaiting Review to 3.2

Looks good.

#3 @ryan
14 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [18062]:

Return false from is_page_template() if the template is default. Props johnbillion. fixes #17458

Note: See TracTickets for help on using tickets.