Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#7850 closed defect (bug) (fixed)

get_page_templates() -- $description extracted, but never used

Reported by: mrasnika's profile Mrasnika Owned by:
Milestone: 2.8 Priority: lowest
Severity: trivial Version: 2.6.1
Component: Administration Keywords: has-patch needs-testing
Focuses: Cc:

Description

in wp-admin/includes/theme.php, in the get_page_templates() function, the template data is parsed to extract the description for the template, but it is never returned.

If this $description var is obsolete, why not remove the parsing for it ? And if it is not, please add a way to make it possible to use it (like building a global/static list of all the available templates, with name, description, filename, etc.)

Attachments (1)

do_not_process_description.diff (722 bytes) - added by simonwheatley 16 years ago.
Patch removes the unnecessary processing of Description in template files

Download all attachments as: .zip

Change History (7)

#1 @jacobsantos
16 years ago

  • Milestone changed from 2.7 to 2.8
  • Owner changed from anonymous to jacobsantos

Might mean nothing, but I'll take ownership of this for 2.8.

#2 @jacobsantos
16 years ago

  • Status changed from new to assigned

@simonwheatley
16 years ago

Patch removes the unnecessary processing of Description in template files

#3 @simonwheatley
16 years ago

  • Keywords has_patch needs_testing added

I found this to be the case as well. The Description meta information for a template is regexed from the template, but then not used, wasting valuable processor cycles. ;)

The patch I've just attached removes the unnecessary code.

#4 @jacobsantos
16 years ago

  • Keywords has-patch needs-testing added; has_patch needs_testing removed

#5 @jacobsantos
16 years ago

  • Owner changed from jacobsantos to anonymous
  • Status changed from assigned to new

#6 @ryan
16 years ago

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

(In [10706]) Don't process page template description since it is not used. Props simonwheatley. fixes #7850

Note: See TracTickets for help on using tickets.