Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#11842 closed enhancement (fixed)

general-template.php echo/return fixes

Reported by: ShaneF Owned by: ShaneF
Milestone: 3.0 Priority: low
Severity: minor Version: 2.9.1
Component: Formatting Keywords: has-patch commit tested
Focuses: Cc:


There are 3 functions that does have a way to 'return' data:

  • get_search_form
  • wp_register
  • get_calendar

This patch has all the changes. Tested and working! ;-)

Attachments (5)

11842.diff (7.1 KB) - added by ShaneF 9 years ago.
11842.2.diff (7.1 KB) - added by ShaneF 9 years ago.
removed 'ob_end_clean()'
11842.3.diff (7.3 KB) - added by ShaneF 9 years ago.
added code from '#10575'
11842.4.diff (7.7 KB) - added by ShaneF 9 years ago.
11842.5.2.diff (8.0 KB) - added by ShaneF 9 years ago.
for master rboren

Download all attachments as: .zip

Change History (13)

9 years ago

9 years ago

removed 'ob_end_clean()'

#1 @westi
9 years ago

  • Milestone changed from 2.9.2 to 3.0

As a code tidy up this shouldn't be done in a Maintenance release.

#2 @sirzooro
9 years ago

  • Cc sirzooro added

Related: #10575. Path attached to that ticket also adds get_calendar filter.

9 years ago

added code from '#10575'

#3 @sirzooro
9 years ago

There is one more thing to fix - at the beginning get_calendar() checks if there is a cached version exists, and if yes it takes and displays it. You should also check $echo and use get_calendar filter there.

#4 @ShaneF
9 years ago

Copy that. Making the change...

9 years ago

#5 @ShaneF
9 years ago

  • Owner set to ShaneF
  • Status changed from new to accepted

9 years ago

for master rboren

#7 @ryan
9 years ago

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

#8 @hakre
8 years ago

Keep in mind that there are output buffer functions in PHP and you can use echo to deal for anything in case that's not provided by the original function:

$ouput = ob_get_clean();


echo function_that_returns();

Related: #7352

Note: See TracTickets for help on using tickets.