WordPress.org

Make WordPress Core

Changeset 25553


Ignore:
Timestamp:
09/21/2013 05:43:14 PM (5 years ago)
Author:
wonderboymusic
Message:

Add @access private to _get_custom_object_labels(), which was already implied by the dangling underscore. Cast $labels to array in get_taxonomy_labels() and _get_custom_object_labels().

Props nacin, foofy.
Fixes #16310.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r25312 r25553  
    14741474 *
    14751475 * @since 3.0.0
     1476 * @access private
     1477 *
    14761478 * @param object $post_type_object
    14771479 * @return object object with all the labels as member variables
     
    15071509 */
    15081510function _get_custom_object_labels( $object, $nohier_vs_hier_defaults ) {
     1511    $object->labels = (array) $object->labels;
    15091512
    15101513    if ( isset( $object->label ) && empty( $object->labels['name'] ) )
  • trunk/src/wp-includes/taxonomy.php

    r25551 r25553  
    439439
    440440function get_taxonomy_labels( $tax ) {
     441    $tax->labels = (array) $tax->labels;
     442
    441443    if ( isset( $tax->helps ) && empty( $tax->labels['separate_items_with_commas'] ) )
    442444        $tax->labels['separate_items_with_commas'] = $tax->helps;
Note: See TracChangeset for help on using the changeset viewer.