Make WordPress Core

Ticket #17850: 17850.diff

File 17850.diff, 710 bytes (added by ryan, 14 years ago)
  • wp-includes/meta.php

     
    588588 * @return bool True if the key is protected, false otherwise.
    589589 */
    590590function is_protected_meta( $meta_key, $meta_type = null ) {
    591         $protected = (  '_' == $meta_key[0] );
     591        $protected = false;
     592        $protected_keys = array( '_edit_last', '_edit_lock', '_thumbnail_id' );
    592593
     594        if ( 0 === strpos( $meta_key, '_wp_' ) || 0 === strpos( $meta_key, '_menu_item_' ) || in_array( $meta_key, $protected_keys ) )
     595                $protected = true;
     596
    593597        return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
    594598}
    595599