1 | 674,675c674 |
---|
2 | < $try = $limit * 4; |
---|
3 | < $sql = "SELECT distinct meta_key |
---|
4 | --- |
---|
5 | > $sql = "SELECT meta_key |
---|
6 | 676a676,678 |
---|
7 | > GROUP BY meta_key |
---|
8 | > HAVING meta_key NOT LIKE %s |
---|
9 | > ORDER BY meta_key |
---|
10 | 678c680 |
---|
11 | < $keys = $wpdb->get_col( $wpdb->prepare( $sql, $try ) ); |
---|
12 | --- |
---|
13 | > $keys = $wpdb->get_col( $wpdb->prepare( $sql, $wpdb->esc_like( '_' ) . '%', $limit ) ); |
---|
14 | 681,688d682 |
---|
15 | < foreach($keys as $index => $key) { |
---|
16 | < if ($key[0] == '_') { |
---|
17 | < unset($keys[$index]); |
---|
18 | < } |
---|
19 | < } |
---|
20 | < if (count($keys) > $limit) { |
---|
21 | < $keys = array_slice($keys, 0, $limit); |
---|
22 | < } |
---|