Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#18972 closed defect (bug) (fixed)

register_post_status() fixes

Reported by: scribu's profile scribu Owned by: duck_'s profile duck_
Milestone: 3.5 Priority: normal
Severity: minor Version:
Component: General Keywords: has-patch
Focuses: 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 13 years ago.
18972.2.diff (2.8 KB) - added by scribu 13 years ago.
18972.3.diff (809 bytes) - added by duck_ 13 years ago.

Download all attachments as: .zip

Change History (9)

@scribu
13 years ago

@scribu
13 years ago

#1 @scribu
13 years ago

'_edit_link' isn't used either.

#2 @duck_
13 years ago

  • 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.

#3 @duck_
13 years ago

  • Milestone changed from Awaiting Review to 3.5

#4 @duck_
13 years ago

  • 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_
13 years ago

#5 @scribu
13 years ago

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

#6 @nacin
13 years ago

  • 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.