Replace all uses of like_escape() with $wpdb->esc_like().

Props miqrogroove.
See #10041.


git-svn-id: https://develop.svn.wordpress.org/trunk@28712 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-06-10 00:43:32 +00:00
parent 2a551f57a4
commit 84ad12b439
19 changed files with 122 additions and 76 deletions
+5 -5
View File
@@ -632,14 +632,14 @@ function meta_form( $post = null ) {
*
* @param int $limit Number of custom fields to retrieve. Default 30.
*/
$limit = (int) apply_filters( 'postmeta_form_limit', 30 );
$keys = $wpdb->get_col( "
SELECT meta_key
$limit = apply_filters( 'postmeta_form_limit', 30 );
$sql = "SELECT meta_key
FROM $wpdb->postmeta
GROUP BY meta_key
HAVING meta_key NOT LIKE '\_%'
HAVING meta_key NOT LIKE %s
ORDER BY meta_key
LIMIT $limit" );
LIMIT %d";
$keys = $wpdb->get_col( $wpdb->prepare( $sql, $wpdb->esc_like( '_' ) . '%', $limit ) );
if ( $keys ) {
natcasesort( $keys );
$meta_key_input_id = 'metakeyselect';