WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 15 months ago

#13151 closed defect (bug) (invalid)

add filter to term_description()

Reported by: scribu Owned by: westi
Milestone: Priority: low
Severity: normal Version:
Component: Plugins Keywords: has-patch hooks
Focuses: Cc:

Description

Since term_description() is a wrapper, it should also apply a filter to it's output.

Attachments (1)

term_description.diff (536 bytes) - added by scribu 5 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 @scribu5 years ago

Example use case: the Front-end Editor plugin.

Having this filter would allow the plugin to make term descriptions editable from the front-end.

@scribu5 years ago

comment:2 @scribu5 years ago

  • Milestone 3.0 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Just found all the possible filters already added in sanitize_term_field().

comment:3 follow-up: @lkraav15 months ago

Hey, @scribu, pardon me for gravedigging but what sense do you think https://core.trac.wordpress.org/browser/trunk/src/wp-includes/default-filters.php#L112 makes?

There is no such thing as apply_filters "term_description" anywhere in core code.

comment:4 in reply to: ↑ 3 @SergeyBiryukov15 months ago

Replying to lkraav:

There is no such thing as apply_filters "term_description" anywhere in core code.

There are dynamic filters in sanitize_term_field(): tags/3.8.1/src/wp-includes/taxonomy.php#L1722.

comment:5 @lkraav15 months ago

Obviously. Sorry for the spam.

Note: See TracTickets for help on using tickets.