Opened 19 months ago

Closed 8 months ago

#18972 closed defect (bug) (fixed)

register_post_status() fixes

Reported by: scribu Owned by: duck_
Priority: normal Milestone: 3.5
Component: General Version:
Severity: minor Keywords: has-patch
Cc:

Description

Found some minor bugs related to register_post_status():

  • doc says it registers a post type
  • statuses can't be hierarchical and don't have capability types

Attachments (3)

18972.diff (2.8 KB) - added by scribu 19 months ago.
18972.2.diff (2.8 KB) - added by scribu 19 months ago.
18972.3.diff (809 bytes) - added by duck_ 10 months ago.

Download all attachments as: .zip

Change History (9)

'_edit_link' isn't used either.

  • Owner set to duck_
  • Resolution set to fixed
  • Status changed from new to closed

In [21302]:

Remove unused arguments (hierarchical, _edit_link, capability_type) from register_post_status

Props scribu, simonwheatley. Fixes #18578, #18972.

  • Milestone changed from Awaiting Review to 3.5
  • Resolution fixed deleted
  • Status changed from closed to reopened

Also unused are show_in_admin_all and single_view_cap. Both added in [13172]. It looks like show_in_admin_all might be from an early version of a patch, but didn't get removed. Not sure about single_view_cap.

See 18972.3.diff.

duck_10 months ago

Instead of 'single_view_cap', WP_Query uses 'internal', 'protected' etc.

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

In [21846]:

Remove unused show_in_admin_all and single_view_cap from register_post_status(). props duck_. fixes #18972.

Note: See TracTickets for help on using tickets.