Make WordPress Core

Opened 12 months ago

Last modified 12 months ago

#58924 new feature request

Add a small precision on the documentation of the register_taxonomy function

Reported by: ltrihan's profile ltrihan Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 6.2.2
Component: Taxonomy Keywords:
Focuses: docs Cc:

Description

Hello,

I was wondering if it wouldn't be interesting to add a little clarification here https://github.com/WordPress/wordpress-develop/blob/12a0205829c1411f16b4e216a713a153bcc62e2f/src/wp-includes/taxonomy.php#L410 .

Indeed, I searched for a while why when editing a CPT I did not have the categories in the form of a checkbox. By searching on https://developer.wordpress.org/reference/functions/register_taxonomy/ I found no indication about the change of UI of the choice of categories on the edition of a post.

I would find it interesting to add a very small precision to indicate that the hierarchical parameter changes the way of choosing its categories on a post: checkboxes if it is true, input text if false.

I hope I wrote and classified my ticket correctly, sorry if not, this is my first ticket / first contribution.

Change History (2)

#1 @swissspidy
12 months ago

Hi there and welcome to WordPress Trac!

There is already such a note below the description for the hierarchical parameter explaining this:

Note: Hierarchical taxonomies will have a list with checkboxes to select an existing category in the taxonomy admin box on the post edit page (like default post categories). Non-hierarchical taxonomies will just have an empty text field to type-in taxonomy terms to associate with the post (like default post tags).

Source: https://developer.wordpress.org/reference/functions/register_taxonomy/#arguments

Are you suggesting moving this note somewhere else?

#2 @ltrihan
12 months ago

Ok my bad, I was stuck reading only the Parameters section.

If I had gone down to the arguments section I would have found the answer to my question. I will know for next time

Note: See TracTickets for help on using tickets.