Move 'helps' argument to the taxonomy labels object. Also move over help_nojs and help_cloud, both introduced in 3.0. This adds three new core labels for non-hierarchical taxonomies, for tweaking the meta box strings. fixes #13805.

git-svn-id: https://develop.svn.wordpress.org/trunk@15190 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-06-10 16:07:33 +00:00
parent acbc109260
commit 9d38c0af9e
3 changed files with 14 additions and 12 deletions
+2 -4
View File
@@ -966,13 +966,11 @@ function get_post_type_labels( $post_type_object ) {
*/
function _get_custom_object_labels( $object, $nohier_vs_hier_defaults ) {
if ( isset( $object->label ) ) {
if ( isset( $object->label ) && empty( $object->labels['name'] ) )
$object->labels['name'] = $object->label;
}
if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) ) {
if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) )
$object->labels['singular_name'] = $object->labels['name'];
}
$defaults = array_map( create_function( '$x', $object->hierarchical? 'return $x[1];' : 'return $x[0];' ), $nohier_vs_hier_defaults );
$labels = array_merge( $defaults, $object->labels );