Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#35609 closed enhancement (fixed)

is_post_type_viewable should allow string to be passed.

Reported by: spacedmonkey's profile spacedmonkey Owned by: boonebgorges's profile boonebgorges
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.4
Component: Posts, Post Types Keywords: has-patch
Focuses: Cc:

Description

The is_post_type_viewable function should allow you to give it the name of the post type.

Attachments (1)

35609.patch (1.0 KB) - added by spacedmonkey 7 years ago.

Download all attachments as: .zip

Change History (4)

@spacedmonkey
7 years ago

#1 @johnbillion
7 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.5

#2 @boonebgorges
7 years ago

In 36401:

Add tests for is_post_type_viewable().

See #35609.

#3 @boonebgorges
7 years ago

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

In 36402:

Allow is_post_type_viewable() to accept a post type name.

Previously, it accepted only a post type object.

Props spacedmonkey.
Fixes #35609.

Note: See TracTickets for help on using tickets.