mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user