WordPress.org

Make WordPress Core

Opened 6 months ago

Last modified 6 months ago

#49169 new enhancement

Action Hook 'edited_terms' in function 'wp_update_term()' needs the Form POST Parameters

Reported by: bodohugobarwich Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Hello,

In order to implement the Term Meta Data Form as documented in #48000
I found that the Edit Form POST Parameters are not passed the Action Hook edited_terms in the function wp_update_term().

The Filter wp_update_term_data does receive the POST Parameters in the $args Variable but the later Action edited_terms does not.

According to the Relationship between the Term Meta Data and the Term it is required that the Term is a valid Database Entry in order to insert savely the Term Meta Data.
So only AFTER checking that the Term is correct and exists the Term Meta Data can be inserted.

So I would love to change the Action Function Call accordingly.

Change History (4)

#1 follow-up: @bodohugobarwich
6 months ago

I also saw Tickets about removing the Action Hook edited_terms.
This would directly disable any possibilities to extend the Terms Functionalities.

#2 @SergeyBiryukov
6 months ago

  • Description modified (diff)

#3 in reply to: ↑ 1 @SergeyBiryukov
6 months ago

Hi there, welcome to WordPress Trac! Thanks for the ticket.

Replying to bodohugobarwich:

I also saw Tickets about removing the Action Hook edited_terms.
This would directly disable any possibilities to extend the Terms Functionalities.

I could not find any tickets about removing the edited_terms hook.

The only relevant change I found was [29862] / #29848, which replaced a duplicate call in wp_insert_term() with wp_update_term() in WordPress 4.1, but the original hook still exists, there are no plans to remove it.

#4 @bodohugobarwich
6 months ago

Thank you for the clarification.

Note: See TracTickets for help on using tickets.