Make WordPress Core


Ignore:
Timestamp:
01/15/2016 12:19:15 PM (8 years ago)
Author:
swissspidy
Message:

Post Types: Introduce unregister_post_type().

This new function can be used to completely unregister non built-in post types.

Fixes #14761.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/capabilities.php

    r35747 r36316  
    1616 *
    1717 * @since 2.0.0
     18 *
     19 * @global array $post_type_meta_caps Used to get post type meta capabilities.
    1820 *
    1921 * @param string $cap       Capability name.
     
    378380    default:
    379381        // Handle meta capabilities for custom post types.
    380         $post_type_meta_caps = _post_type_meta_capabilities();
     382        global $post_type_meta_caps;
    381383        if ( isset( $post_type_meta_caps[ $cap ] ) ) {
    382384            $args = array_merge( array( $post_type_meta_caps[ $cap ], $user_id ), $args );
Note: See TracChangeset for help on using the changeset viewer.