Make WordPress Core

Opened 3 months ago

#60710 new defect (bug)

save_post_{$post->post_type} hook returns inconsistent $_POST['tax_input'] format

Reported by: jenunderscore_'s profile jenUnderscore_ Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.4.3
Component: Taxonomy Keywords:
Focuses: Cc:

Description

In the save_post_{$post->post_type} hook:

Case 1: If we do not make any changes to the taxonomy $_POST['tax_input'][$term] returns a comma delimited string WITH a space.

Output Example: Maple, Spring, Summer, Winter

Case 2: If we modify the taxonomy (adding or removing), it eliminates the space:

Output Example: Spring,Summer,Winter

Proposed solution, eliminate the space in the first case for consistency.

Change History (0)

Note: See TracTickets for help on using tickets.