Switch to a more performant query in meta_form().
Props lumaraf, swissspidy, rarylson, pento Fixes #24498 git-svn-id: https://develop.svn.wordpress.org/trunk@33390 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e42e418450
commit
f9ec35ddab
@ -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";
|
||||||
|
Loading…
Reference in New Issue
Block a user