From ac6f57de76ae27073a617edd0544e3750fe9a57f Mon Sep 17 00:00:00 2001
From: Andrew Nacin <wp@andrewnacin.com>
Date: Wed, 10 Oct 2012 13:50:42 +0000
Subject: [PATCH] Add post_type_labels_{$post_type} filter. props scribu. fixes
 #21948.

git-svn-id: http://core.svn.wordpress.org/trunk@22164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
 wp-includes/post.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/wp-includes/post.php b/wp-includes/post.php
index c1dfd168d9..37e1057e98 100644
--- a/wp-includes/post.php
+++ b/wp-includes/post.php
@@ -1379,7 +1379,11 @@ function get_post_type_labels( $post_type_object ) {
 		'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) )
 	);
 	$nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
-	return _get_custom_object_labels( $post_type_object, $nohier_vs_hier_defaults );
+
+	$labels = _get_custom_object_labels( $post_type_object, $nohier_vs_hier_defaults );
+
+	$post_type = $post_type_object->name;
+	return apply_filters( "post_type_labels_{$post_type}", $labels );
 }
 
 /**