Changeset 21919
- Timestamp:
- 09/19/2012 06:11:43 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r21802 r21919 1167 1167 $sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1" ); 1168 1168 1169 $query = "SELECT p. *FROM $wpdb->posts AS p $join $where $sort";1169 $query = "SELECT p.id FROM $wpdb->posts AS p $join $where $sort"; 1170 1170 $query_key = 'adjacent_post_' . md5($query); 1171 1171 $result = wp_cache_get($query_key, 'counts'); 1172 1172 if ( false !== $result ) { 1173 if ( is_object( $result ))1174 $result = new WP_Post( $result );1173 if ( $result ) 1174 $result = get_post( $result ); 1175 1175 return $result; 1176 1176 } 1177 1177 1178 $result = $wpdb->get_ row("SELECT p.* FROM $wpdb->posts AS p $join $where $sort");1178 $result = $wpdb->get_var( $query ); 1179 1179 if ( null === $result ) 1180 1180 $result = ''; … … 1182 1182 wp_cache_set($query_key, $result, 'counts'); 1183 1183 1184 if ( is_object( $result ))1185 $result = new WP_Post( $result );1184 if ( $result ) 1185 $result = get_post( $result ); 1186 1186 1187 1187 return $result; … … 2058 2058 $url = WP_PLUGIN_URL; 2059 2059 2060 2060 2061 2061 $url = set_url_scheme( $url ); 2062 2062
Note: See TracChangeset
for help on using the changeset viewer.