Ticket #2225 (closed defect (bug): fixed)

Opened 6 years ago

Last modified 5 years ago

*_template filters execute twice

Reported by: wundbread Owned by: anonymous
Priority: normal Milestone:
Component: General Version: 2.0
Severity: normal Keywords: template filters bg|has-patch
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

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

Change History

  • Keywords bg|has-patch added

comment:2   ryan6 years ago

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

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

comment:3   ryan6 years ago

  • Milestone changed from 2.1 to 2.0.1
  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.