WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#39023 closed task (blessed) (fixed)

REST API: show_in_rest property missing from the register_post_type() and register_taxonomy() args docblocks

Reported by: johnbillion Owned by: pento
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.7
Component: REST API Keywords: has-patch commit dev-reviewed
Focuses: docs, rest-api Cc:

Description

[38832] (#38373) introduced a show_in_rest property for post types and taxonomies. This property is not documented in the args docblocks of the register_post_type() and register_taxonomy() functions.

Attachments (2)

39023.patch (1.9 KB) - added by ketuchetan 4 months ago.
39023.2.patch (20.7 KB) - added by rahulsprajapati 4 months ago.
Add args docblocks of the register_post_type() and register_taxonomy() for 'show_in_rest', 'rest_base', and 'rest_controller_class' arguments.

Download all attachments as: .zip

Change History (12)

#1 @ketuchetan
4 months ago

  • Keywords has-patch added; needs-patch removed

Hi @johnbillion

I have added my patch can you please look into it and please let me know if I understand the ticket correctly or not.

If I am wrong then please can you please tell me the more description about this ticket please.

Thanks,
Chetan

@ketuchetan
4 months ago

@rahulsprajapati
4 months ago

Add args docblocks of the register_post_type() and register_taxonomy() for 'show_in_rest', 'rest_base', and 'rest_controller_class' arguments.

#2 @rahulsprajapati
4 months ago

@johnbillion
There are 'rest_base', and 'rest_controller_class' arguments also missing from arg docblock.
I've added in 39023.2.

#3 @rahulsprajapati
4 months ago

  • Keywords needs-docs removed

#4 @pento
4 months ago

  • Keywords dev-feedback commit added

This looks good to me. @DrewAPicture, could you confirm that you're cool with the whitespace changes?

#5 @johnbillion
4 months ago

  • Summary changed from show_in_rest property missing from the register_post_type() and register_taxonomy() args docblocks to REST API: show_in_rest property missing from the register_post_type() and register_taxonomy() args docblocks

This ticket was mentioned in Slack in #core by chetansatasiya. View the logs.


4 months ago

#7 @nacin
4 months ago

  • Keywords dev-reviewed added; dev-feedback removed

#8 @pento
4 months ago

  • Owner set to pento
  • Status changed from new to assigned

#9 @pento
4 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 39462:

Docs: Add missing REST API-related args to register_post_type() and register_taxonomy().

These functions now accept the show_in_rest, rest_base, and rest_controller_class args.

Props ketuchetan, rahulsprajapati.
Fixes #39023.

#10 @pento
4 months ago

In 39463:

Docs: Add missing REST API-related args to register_post_type() and register_taxonomy().

These functions now accept the show_in_rest, rest_base, and rest_controller_class args.

Merges [39462] to the 4.7 branch.

Props ketuchetan, rahulsprajapati.
Fixes #39023.

Note: See TracTickets for help on using tickets.