Ticket #33885: 33885.5.diff
File 33885.5.diff, 1.4 KB (added by , 7 years ago) |
---|
-
src/wp-admin/includes/template.php
596 596 $keys = apply_filters( 'postmeta_form_keys', null, $post ); 597 597 598 598 if ( null === $keys ) { 599 $keys = wp_cache_get( 'postmeta_form_keys', 'posts' ); 600 } 601 602 if ( ! $keys ) { 599 603 /** 600 604 * Filters the number of custom fields to retrieve for the drop-down 601 605 * in the Custom Fields meta box. … … 612 616 ORDER BY meta_key 613 617 LIMIT %d"; 614 618 $keys = $wpdb->get_col( $wpdb->prepare( $sql, $wpdb->esc_like( '_' ) . '%', $limit ) ); 619 620 wp_cache_set( 'postmeta_form_keys', $keys, 'posts' ); 615 621 } 616 622 617 623 if ( $keys ) { -
src/wp-includes/post.php
1713 1713 if ( $the_post = wp_is_post_revision($post_id) ) 1714 1714 $post_id = $the_post; 1715 1715 1716 wp_cache_delete( 'postmeta_form_keys', 'posts' ); 1717 1716 1718 return add_metadata('post', $post_id, $meta_key, $meta_value, $unique); 1717 1719 } 1718 1720 … … 1736 1738 if ( $the_post = wp_is_post_revision($post_id) ) 1737 1739 $post_id = $the_post; 1738 1740 1741 wp_cache_delete( 'postmeta_form_keys', 'posts' ); 1742 1739 1743 return delete_metadata('post', $post_id, $meta_key, $meta_value); 1740 1744 } 1741 1745