WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#35609 closed enhancement (fixed)

is_post_type_viewable should allow string to be passed.

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

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 4 years ago.

Download all attachments as: .zip

Change History (4)

@spacedmonkey
4 years ago

#1 @johnbillion
4 years ago

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

#2 @boonebgorges
4 years ago

In 36401:

Add tests for is_post_type_viewable().

See #35609.

#3 @boonebgorges
4 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.