Ticket #26746: 26746.patch
File 26746.patch, 5.6 KB (added by , 7 years ago) |
---|
-
wp-includes/taxonomy.php
459 459 if ( isset( $tax->no_tagcloud ) && empty( $tax->labels['not_found'] ) ) 460 460 $tax->labels['not_found'] = $tax->no_tagcloud; 461 461 462 $nohier_vs_hier_defaults = array( 463 'name' => array( _x( 'Tags', 'taxonomy general name' ), _x( 'Categories', 'taxonomy general name' ) ), 464 'singular_name' => array( _x( 'Tag', 'taxonomy singular name' ), _x( 'Category', 'taxonomy singular name' ) ), 465 'search_items' => array( __( 'Search Tags' ), __( 'Search Categories' ) ), 466 'popular_items' => array( __( 'Popular Tags' ), null ), 467 'all_items' => array( __( 'All Tags' ), __( 'All Categories' ) ), 468 'parent_item' => array( null, __( 'Parent Category' ) ), 469 'parent_item_colon' => array( null, __( 'Parent Category:' ) ), 470 'edit_item' => array( __( 'Edit Tag' ), __( 'Edit Category' ) ), 471 'view_item' => array( __( 'View Tag' ), __( 'View Category' ) ), 472 'update_item' => array( __( 'Update Tag' ), __( 'Update Category' ) ), 473 'add_new_item' => array( __( 'Add New Tag' ), __( 'Add New Category' ) ), 474 'new_item_name' => array( __( 'New Tag Name' ), __( 'New Category Name' ) ), 475 'separate_items_with_commas' => array( __( 'Separate tags with commas' ), null ), 476 'add_or_remove_items' => array( __( 'Add or remove tags' ), null ), 477 'choose_from_most_used' => array( __( 'Choose from the most used tags' ), null ), 478 'not_found' => array( __( 'No tags found.' ), null ), 479 ); 480 $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name']; 462 static $nohier_vs_hier_defaults = array(); 463 if ( empty( $nohier_vs_hier_defaults ) ) { 464 $nohier_vs_hier_defaults = array( 465 'name' => array( _x( 'Tags', 'taxonomy general name' ), _x( 'Categories', 'taxonomy general name' ) ), 466 'singular_name' => array( _x( 'Tag', 'taxonomy singular name' ), _x( 'Category', 'taxonomy singular name' ) ), 467 'search_items' => array( __( 'Search Tags' ), __( 'Search Categories' ) ), 468 'popular_items' => array( __( 'Popular Tags' ), null ), 469 'all_items' => array( __( 'All Tags' ), __( 'All Categories' ) ), 470 'parent_item' => array( null, __( 'Parent Category' ) ), 471 'parent_item_colon' => array( null, __( 'Parent Category:' ) ), 472 'edit_item' => array( __( 'Edit Tag' ), __( 'Edit Category' ) ), 473 'view_item' => array( __( 'View Tag' ), __( 'View Category' ) ), 474 'update_item' => array( __( 'Update Tag' ), __( 'Update Category' ) ), 475 'add_new_item' => array( __( 'Add New Tag' ), __( 'Add New Category' ) ), 476 'new_item_name' => array( __( 'New Tag Name' ), __( 'New Category Name' ) ), 477 'separate_items_with_commas' => array( __( 'Separate tags with commas' ), null ), 478 'add_or_remove_items' => array( __( 'Add or remove tags' ), null ), 479 'choose_from_most_used' => array( __( 'Choose from the most used tags' ), null ), 480 'not_found' => array( __( 'No tags found.' ), null ), 481 ); 482 $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name']; 483 } 481 484 482 485 return _get_custom_object_labels( $tax, $nohier_vs_hier_defaults ); 483 486 } -
wp-includes/post.php
1482 1482 * @return object object with all the labels as member variables 1483 1483 */ 1484 1484 function get_post_type_labels( $post_type_object ) { 1485 $nohier_vs_hier_defaults = array( 1486 'name' => array( _x('Posts', 'post type general name'), _x('Pages', 'post type general name') ), 1487 'singular_name' => array( _x('Post', 'post type singular name'), _x('Page', 'post type singular name') ), 1488 'add_new' => array( _x('Add New', 'post'), _x('Add New', 'page') ), 1489 'add_new_item' => array( __('Add New Post'), __('Add New Page') ), 1490 'edit_item' => array( __('Edit Post'), __('Edit Page') ), 1491 'new_item' => array( __('New Post'), __('New Page') ), 1492 'view_item' => array( __('View Post'), __('View Page') ), 1493 'search_items' => array( __('Search Posts'), __('Search Pages') ), 1494 'not_found' => array( __('No posts found.'), __('No pages found.') ), 1495 'not_found_in_trash' => array( __('No posts found in Trash.'), __('No pages found in Trash.') ), 1496 'parent_item_colon' => array( null, __('Parent Page:') ), 1497 'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ) 1498 ); 1499 $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name']; 1500 1485 static $nohier_vs_hier_defaults = array(); 1486 if ( empty( $nohier_vs_hier_defaults ) ) { 1487 $nohier_vs_hier_defaults = array( 1488 'name' => array( _x('Posts', 'post type general name'), _x('Pages', 'post type general name') ), 1489 'singular_name' => array( _x('Post', 'post type singular name'), _x('Page', 'post type singular name') ), 1490 'add_new' => array( _x('Add New', 'post'), _x('Add New', 'page') ), 1491 'add_new_item' => array( __('Add New Post'), __('Add New Page') ), 1492 'edit_item' => array( __('Edit Post'), __('Edit Page') ), 1493 'new_item' => array( __('New Post'), __('New Page') ), 1494 'view_item' => array( __('View Post'), __('View Page') ), 1495 'search_items' => array( __('Search Posts'), __('Search Pages') ), 1496 'not_found' => array( __('No posts found.'), __('No pages found.') ), 1497 'not_found_in_trash' => array( __('No posts found in Trash.'), __('No pages found in Trash.') ), 1498 'parent_item_colon' => array( null, __('Parent Page:') ), 1499 'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ) 1500 ); 1501 $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name']; 1502 } 1501 1503 $labels = _get_custom_object_labels( $post_type_object, $nohier_vs_hier_defaults ); 1502 1504 1503 1505 $post_type = $post_type_object->name;