From 18d95526f6eea035e35957b97bc9b02687da6a3a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 22 Sep 2015 22:32:24 +0000 Subject: [PATCH] Make the `'register_post_type_args'` filter introduced in [34242] available for built-in post types too. Props MikeSchinkel. Fixes #17447. Built from https://develop.svn.wordpress.org/trunk@34451 git-svn-id: http://core.svn.wordpress.org/trunk@34415 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-functions.php | 22 +++++++++------------- wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/wp-includes/post-functions.php b/wp-includes/post-functions.php index c2b71dd501..4297a537b4 100644 --- a/wp-includes/post-functions.php +++ b/wp-includes/post-functions.php @@ -993,19 +993,15 @@ function register_post_type( $post_type, $args = array() ) { // Sanitize post type name $post_type = sanitize_key( $post_type ); - if ( empty( $args['_builtin'] ) ) { - /** - * Filter the arguments for registering a post type. - * - * Not available for built-in post types. - * - * @since 4.4.0 - * - * @param array|string $args Array or string of arguments for registering a post type. - * @param string $post_type Post type key. - */ - $args = apply_filters( 'register_post_type_args', $args, $post_type ); - } + /** + * Filter the arguments for registering a post type. + * + * @since 4.4.0 + * + * @param array|string $args Array or string of arguments for registering a post type. + * @param string $post_type Post type key. + */ + $args = apply_filters( 'register_post_type_args', $args, $post_type ); // Args prefixed with an underscore are reserved for internal use. $defaults = array( diff --git a/wp-includes/version.php b/wp-includes/version.php index 13b172053e..06a8a2dba7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34450'; +$wp_version = '4.4-alpha-34451'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.