diff --git a/wp-includes/post-functions.php b/wp-includes/post-functions.php index 376b4f7977..fdd01eed0c 100644 --- a/wp-includes/post-functions.php +++ b/wp-includes/post-functions.php @@ -1337,6 +1337,8 @@ function get_post_type_labels( $post_type_object ) { $post_type = $post_type_object->name; + $default_labels = clone $labels; + /** * Filter the labels of a specific post type. * @@ -1349,7 +1351,12 @@ function get_post_type_labels( $post_type_object ) { * * @param object $labels Object with labels for the post type as member variables. */ - return apply_filters( "post_type_labels_{$post_type}", $labels ); + $labels = apply_filters( "post_type_labels_{$post_type}", $labels ); + + // Ensure that the filtered labels contain all required default values. + $labels = (object) array_merge( (array) $default_labels, (array) $labels ); + + return $labels; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 554a97cc00..352c532671 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33775'; +$wp_version = '4.4-alpha-33776'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.