WordPress.org

Make WordPress Core

#33720 closed enhancement (fixed)

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

Reported by: kevinlangleyjr Owned by: 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 21 months 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
21 months ago

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

#1 @kevinlangleyjr
21 months ago

  • Keywords has-patch added

#2 @boonebgorges
21 months 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
21 months 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.