Add post_type_labels_{$post_type} filter. props scribu. fixes #21948.

git-svn-id: https://develop.svn.wordpress.org/trunk@22164 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-10-10 13:50:42 +00:00
parent 594ef24dca
commit caa32ba980
1 changed files with 5 additions and 1 deletions

View File

@ -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 );
}
/**