Make WordPress Core

Ticket #17447: 17447.2.2.diff

File 17447.2.2.diff, 1.2 KB (added by MikeSchinkel, 10 years ago)

Patch to allow the 'register_post_type_args' hook to work on '_builtin' posts.

  • wp-includes/post-functions.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    991991        // Sanitize post type name
    992992        $post_type = sanitize_key( $post_type );
    993993
    994         if ( empty( $args['_builtin'] ) ) {
    995                 /**
    996                  * Filter the arguments for registering a post type.
    997                  *
    998                  * Not available for built-in post types.
    999                  *
    1000                  * @since 4.4.0
    1001                  *
    1002                  * @param array|string $args      Array or string of arguments for registering a post type.
    1003                  * @param string       $post_type Post type key.
    1004                  */
    1005                 $args = apply_filters( 'register_post_type_args', $args, $post_type );
    1006         }
     994        /**
     995         * Filter the arguments for registering a post type.
     996         *
     997         * Not available for built-in post types.
     998         *
     999         * @since 4.4.0
     1000         *
     1001         * @param array|string $args      Array or string of arguments for registering a post type.
     1002         * @param string       $post_type Post type key.
     1003         */
     1004        $args = apply_filters( 'register_post_type_args', $args, $post_type );
    10071005
    10081006        // Args prefixed with an underscore are reserved for internal use.
    10091007        $defaults = array(