Make WordPress Core


Ignore:
Timestamp:
06/28/2016 04:40:33 PM (8 years ago)
Author:
ocean90
Message:

Posts: Introduce WP_Post_Type and use it in register_post_type() and unregister_post_type().

This changes the global $wp_post_types to an array of WP_Post_Type objects. WP_Post_Type includes methods to handle post type supports, rewrite rules, meta boxes, hooks, and taxonomies.
Each post type argument becomes a property of WP_Post_Type.

Props swissspidy, flixos90.
Fixes #36217.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r37674 r37890  
    884884     * @access protected
    885885     *
    886      * @param object $post_type Post type object.
    887      * @param array  $fields    The subset of post fields to return.
     886     * @param WP_Post_Type $post_type Post type object.
     887     * @param array        $fields    The subset of post fields to return.
    888888     * @return array The prepared post type data.
    889889     */
     
    923923         * @since 3.4.0
    924924         *
    925          * @param array  $_post_type An array of post type data.
    926          * @param object $post_type  Post type object.
     925         * @param array        $_post_type An array of post type data.
     926         * @param WP_Post_Type $post_type  Post type object.
    927927         */
    928928        return apply_filters( 'xmlrpc_prepare_post_type', $_post_type, $post_type );
Note: See TracChangeset for help on using the changeset viewer.