Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#2225 closed defect (bug) (fixed)

*_template filters execute twice

Reported by: wundbread's profile wundbread Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: General Keywords: template filters bg|has-patch
Focuses: Cc:

Description

In wordpress 2.0 I noticed that all the template filters ('single_template','achive_template', etc) get run twice. I currently do not understand why this is occuring or how to fix it. I don't believe this happened in 1.52.

Here is a simple plugin to show this.

/*

Plugin Name: Template Filters Execute Twice

Description: Demonstates that *_template filters are currently executing twice.

Author: Michael O'Connell

Version: 1.0

*/
add_filter('archive_template', 'print_trace');

function print_trace($template)
{
foreach(debug_backtrace() as $call)
echo "{$callfile?} ({$callline?}) in {$callfunction?}()<br/>";
return $template;
}

Attachments (1)

2225.diff (2.8 KB) - added by davidhouse 19 years ago.

Download all attachments as: .zip

Change History (5)

@davidhouse
19 years ago

#1 @davidhouse
19 years ago

  • Keywords bg|has-patch added; removed

#2 @ryan
19 years ago

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

(In [3409]) Avoid invoking template filters twice. Props David House. fixes #2225

#3 @ryan
19 years ago

  • Milestone changed from 2.1 to 2.0.1

#4 @(none)
18 years ago

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.