Make WordPress Core

Ticket #35658: 35658.30.diff

File 35658.30.diff, 896 bytes (added by jeremyfelt, 8 years ago)

object_subtype variable needs to be available

  • src/wp-includes/meta.php

     
    10751075                }
    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 ) {
    10801086                add_filter( "sanitize_{$object_type}_meta_{$meta_key}", $args['sanitize_callback'], 10, 4 );
     
    10901096        }
    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
    10971102                return true;