Make WordPress Core

Ticket #37369: meta.patch

File meta.patch, 1.1 KB (added by vishalkakadiya, 9 years ago)
  • wp-includes/meta.php

    diff --git a/wp-includes/meta.php b/wp-includes/meta.php
    index ff32086..f9cf57b 100644
    a b function registered_meta_key_exists( $object_type, $object_subtype, $meta_key ) 
    11311131                return false;
    11321132        }
    11331133
    1134         // Only specific core object types are supported.
    11351134        if ( ! wp_object_type_exists( $object_type ) ) {
    1136                 return new WP_Error( 'invalid_meta_key', __( 'Invalid meta key. Not a core object type.' ) );
     1135                return false;
    11371136        }
    11381137
    11391138        if ( ! isset( $wp_meta_keys[ $object_type ] ) ) {
    function registered_meta_key_exists( $object_type, $object_subtype, $meta_key ) 
    11651164function unregister_meta_key( $object_type, $object_subtype, $meta_key ) {
    11661165        global $wp_meta_keys;
    11671166
     1167        // Only specific core object types are supported.
     1168        if ( ! wp_object_type_exists( $object_type ) ) {
     1169                return new WP_Error( 'invalid_meta_key', __( 'Invalid meta key. Not a core object type.' ) );
     1170        }
     1171
    11681172        if ( ! registered_meta_key_exists( $object_type, $object_subtype, $meta_key ) ) {
    11691173                return new WP_Error( 'invalid_meta_key', __( 'Invalid meta key' ) );
    11701174        }