Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#11842 closed enhancement (fixed)

general-template.php echo/return fixes

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

Description

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 17 years ago.
11842.2.diff​ (7.1 KB ) - added by ShaneF 17 years ago.
removed 'ob_end_clean()'
11842.3.diff​ (7.3 KB ) - added by ShaneF 17 years ago.
added code from '#10575'
11842.4.diff​ (7.7 KB ) - added by ShaneF 17 years ago.
11842.5.2.diff​ (8.0 KB ) - added by ShaneF 17 years ago.
for master rboren

Download all attachments as: .zip

Change History (13)

@ShaneF
17 years ago

@ShaneF
17 years ago

removed 'ob_end_clean()'

#1 @westi
17 years ago

  • Milestone 2.9.2 → 3.0

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

#2 @sirzooro
17 years ago

  • Cc sirzooro added

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

@ShaneF
17 years ago

added code from '#10575'

#3 @sirzooro
17 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
17 years ago

Copy that. Making the change...

@ShaneF
17 years ago

#5 @ShaneF
17 years ago

  • Owner set to ShaneF
  • Status new → accepted

@ShaneF
17 years ago

for master rboren

#7 @ryan
17 years ago

  • Resolution → fixed
  • Status accepted → closed

#8 @hakre
16 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:

ob_start();
function_that_echos();
$ouput = ob_get_clean();

and

echo function_that_returns();

Related: #7352

Note: See TracTickets for help on using tickets.