Make WordPress Core

Changeset 37990


Ignore:
Timestamp:
07/06/2016 06:00:23 PM (9 years ago)
Author:
jeremyfelt
Message:

Meta: Ensure $object_subtype is available before use in register_meta().

Props sc0ttkclark.
See #35658.

File:
1 edited

Legend:

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

    r37934 r37990  
    10761076    }
    10771077
     1078    $object_subtype = '';
     1079
     1080    if ( ! empty( $args['object_subtype'] ) ) {
     1081        $object_subtype = $args['object_subtype'];
     1082    }
     1083
    10781084    // Back-compat: old sanitize and auth callbacks applied to all of an object type
    10791085    if ( $has_old_sanitize_cb ) {
     
    10911097
    10921098    // Global registry only contains meta keys registered in the new way with a subtype.
    1093     if ( ! empty( $args['object_subtype'] ) ) {
    1094         $object_subtype = $args['object_subtype'];
     1099    if ( ! empty( $object_subtype ) ) {
    10951100        $wp_meta_keys[ $object_type ][ $object_subtype ][ $meta_key ] = $args;
    10961101
Note: See TracChangeset for help on using the changeset viewer.