Changeset 55085 for trunk/src/wp-includes/link-template.php
- Timestamp:
- 01/18/2023 11:18:36 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/link-template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r54943 r55085 1977 1977 $sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1", $post, $order ); 1978 1978 1979 $query = "SELECT p.ID FROM $wpdb->posts AS p $join $where $sort"; 1980 $query_key = 'adjacent_post_' . md5( $query ); 1981 $result = wp_cache_get( $query_key, 'counts' ); 1979 $query = "SELECT p.ID FROM $wpdb->posts AS p $join $where $sort"; 1980 $key = md5( $query ); 1981 $last_changed = wp_cache_get_last_changed( 'posts' ); 1982 if ( $in_same_term || ! empty( $excluded_terms ) ) { 1983 $last_changed .= wp_cache_get_last_changed( 'terms' ); 1984 } 1985 $cache_key = "adjacent_post:$key:$last_changed"; 1986 1987 $result = wp_cache_get( $cache_key, 'posts' ); 1982 1988 if ( false !== $result ) { 1983 1989 if ( $result ) { … … 1992 1998 } 1993 1999 1994 wp_cache_set( $ query_key, $result, 'counts' );2000 wp_cache_set( $cache_key, $result, 'posts' ); 1995 2001 1996 2002 if ( $result ) {
Note: See TracChangeset
for help on using the changeset viewer.