Make WordPress Core

Ticket #32449: template.php.patch.txt

File template.php.patch.txt, 767 bytes (added by jeichorn, 10 years ago)

Patch for wp-admin/includes/template.php

Line 
1674,675c674
2<       $try = $limit * 4;
3<       $sql = "SELECT distinct meta_key
4---
5>       $sql = "SELECT meta_key
6676a676,678
7>               GROUP BY meta_key
8>               HAVING meta_key NOT LIKE %s
9>               ORDER BY meta_key
10678c680
11<       $keys = $wpdb->get_col( $wpdb->prepare( $sql, $try ) );
12---
13>       $keys = $wpdb->get_col( $wpdb->prepare( $sql, $wpdb->esc_like( '_' ) . '%', $limit ) );
14681,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<               }