Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33720 closed enhancement (fixed)

Adding echo argument to wp_terms_checklist() to allow return of generated markup

Reported by: kevinlangleyjr's profile kevinlangleyjr Owned by: boonebgorges's profile boonebgorges
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.4
Component: Taxonomy Keywords: has-patch
Focuses: template Cc:

Description

Currently, wp_terms_checklist() echos the output with no way to just return the generated markup without opening an output buffer and capturing the output. In this patch, I've added an extra argument to wp_terms_checklist() to allow the return of the markup.

Attachments (1)

33720_add_ech_arg_wp_terms_checklist.diff (3.4 KB) - added by kevinlangleyjr 9 years ago.
Adding echo arg to wp_terms_checklist() function to allow returning of the generated markup or echo by default

Download all attachments as: .zip

Change History (4)

@kevinlangleyjr
9 years ago

Adding echo arg to wp_terms_checklist() function to allow returning of the generated markup or echo by default

#1 @kevinlangleyjr
9 years ago

  • Keywords has-patch added

#2 @boonebgorges
9 years ago

  • Component changed from General to Taxonomy
  • Focuses template added; administration removed
  • Milestone changed from Awaiting Review to 4.4
  • Owner set to boonebgorges
  • Status changed from new to reviewing

Bonus: this will make it easier to write unit tests.

#3 @boonebgorges
9 years ago

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

In 33904:

Allow wp_terms_checklist() to return markup rather than echoing it.

Props kevinlangleyjr.
Fixes #33720.

Note: See TracTickets for help on using tickets.