Ticket #35658: 35658.30.diff
File 35658.30.diff, 896 bytes (added by , 8 years ago) |
---|
-
src/wp-includes/meta.php
1075 1075 } 1076 1076 } 1077 1077 1078 $object_subtype = ''; 1079 1080 if ( ! empty( $args['object_subtype'] ) ) { 1081 $object_subtype = $args['object_subtype']; 1082 } 1083 1078 1084 // Back-compat: old sanitize and auth callbacks applied to all of an object type 1079 1085 if ( $has_old_sanitize_cb ) { 1080 1086 add_filter( "sanitize_{$object_type}_meta_{$meta_key}", $args['sanitize_callback'], 10, 4 ); … … 1090 1096 } 1091 1097 1092 1098 // 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 ) ) { 1095 1100 $wp_meta_keys[ $object_type ][ $object_subtype ][ $meta_key ] = $args; 1096 1101 1097 1102 return true;