Make WordPress Core

Ticket #34428: 34428.patch

File 34428.patch, 854 bytes (added by sebastian.pisula, 9 years ago)
  • wp-includes/post-functions.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    11811181}
    11821182
    11831183/**
     1184 * Check if post type has archive
     1185 *
     1186 * @since 4.4.0
     1187 *
     1188 * @param $post_type
     1189 *
     1190 * @return bool
     1191 */
     1192function has_archive_post_type( $post_type ) {
     1193        if ( ! $post_type_obj = get_post_type_object( $post_type ) ) {
     1194                return false;
     1195        }
     1196
     1197        return (bool) $post_type_obj->has_archive;
     1198}
     1199
     1200/**
    11841201 * Build an object with all post type capabilities out of a post type object
    11851202 *
    11861203 * Post type capabilities use the 'capability_type' argument as a base, if the