Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#35609 closed enhancement (fixed)

is_post_type_viewable should allow string to be passed.

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

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

Download all attachments as: .zip

Change History (4)

@spacedmonkey
11 years ago

#1 @johnbillion
11 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review → 4.5

#2 @boonebgorges
11 years ago

In 36401:

Add tests for is_post_type_viewable().

See #35609.

#3 @boonebgorges
11 years ago

  • Owner set to boonebgorges
  • Resolution → fixed
  • Status new → 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.