From 6c63977ec25f5ea7eda2d10cb26ddb934f525fc7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 22 Sep 2015 22:31:25 +0000 Subject: [PATCH] Make the `'register_post_type_args'` filter introduced in [34242] available for built-in post types too. Props MikeSchinkel. Fixes #17447. git-svn-id: https://develop.svn.wordpress.org/trunk@34451 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post-functions.php | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/wp-includes/post-functions.php b/src/wp-includes/post-functions.php index c2b71dd501..4297a537b4 100644 --- a/src/wp-includes/post-functions.php +++ b/src/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(