Switch to a more performant query in meta_form().
Props lumaraf, swissspidy, rarylson, pento Fixes #24498 Built from https://develop.svn.wordpress.org/trunk@33390 git-svn-id: http://core.svn.wordpress.org/trunk@33358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d2893c5a5e
commit
765714ac0b
|
@ -677,9 +677,9 @@ function meta_form( $post = null ) {
|
||||||
* @param int $limit Number of custom fields to retrieve. Default 30.
|
* @param int $limit Number of custom fields to retrieve. Default 30.
|
||||||
*/
|
*/
|
||||||
$limit = apply_filters( 'postmeta_form_limit', 30 );
|
$limit = apply_filters( 'postmeta_form_limit', 30 );
|
||||||
$sql = "SELECT meta_key
|
$sql = "SELECT DISTINCT meta_key
|
||||||
FROM $wpdb->postmeta
|
FROM $wpdb->postmeta
|
||||||
GROUP BY meta_key
|
WHERE meta_key NOT BETWEEN '_' AND '_z'
|
||||||
HAVING meta_key NOT LIKE %s
|
HAVING meta_key NOT LIKE %s
|
||||||
ORDER BY meta_key
|
ORDER BY meta_key
|
||||||
LIMIT %d";
|
LIMIT %d";
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-beta4-33387';
|
$wp_version = '4.3-beta4-33390';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue