Make WordPress Core

Ticket #37369: 37369.patch

File 37369.patch, 520 bytes (added by vishalkakadiya, 9 years ago)

Refresh this patch added comment and removed if conditions from unregister_meta_key() as it is already checked in registered_meta_key_exists()

  • wp-includes/meta.php

    diff --git a/wp-includes/meta.php b/wp-includes/meta.php
    index ff32086..2e0f4e3 100644
    a b function registered_meta_key_exists( $object_type, $object_subtype, $meta_key ) 
    11331133
    11341134        // Only specific core object types are supported.
    11351135        if ( ! wp_object_type_exists( $object_type ) ) {
    1136                 return new WP_Error( 'invalid_meta_key', __( 'Invalid meta key. Not a core object type.' ) );
     1136                return false;
    11371137        }
    11381138
    11391139        if ( ! isset( $wp_meta_keys[ $object_type ] ) ) {