Ticket #17447: 17447.3.diff
File 17447.3.diff, 1.0 KB (added by , 9 years ago) |
---|
-
src/wp-includes/post-functions.php
992 992 993 993 // Sanitize post type name 994 994 $post_type = sanitize_key( $post_type ); 995 $args = wp_parse_args( $args ); 995 996 996 997 /** 997 998 * Filter the arguments for registering a post type. 998 999 * 999 1000 * @since 4.4.0 1000 1001 * 1001 * @param array |string $args Array or stringof arguments for registering a post type.1002 * @param string 1002 * @param array $args Array of arguments for registering a post type. 1003 * @param string $post_type Post type key. 1003 1004 */ 1004 1005 $args = apply_filters( 'register_post_type_args', $args, $post_type ); 1005 1006 … … 1031 1032 '_builtin' => false, 1032 1033 '_edit_link' => 'post.php?post=%d', 1033 1034 ); 1034 $args = wp_parse_args( $args, $defaults );1035 $args = array_merge( $defaults, $args ); 1035 1036 $args = (object) $args; 1036 1037 1037 1038 $args->name = $post_type;