_prime_post_caches [ WordPress-Funktionen ]
_prime_post_caches ( $ids, $update_term_cache = true, $update_meta_cache = true )
| Zugriff: |
|
| Parameter: |
|
| Definiert in: |
|
| Codex |
Ähnliche Funktionen: update_post_caches, update_post_cache, clean_post_cache, update_postmeta_cache, wp_get_post_cats
Adds any posts from the given ids to the cache that do not already exist in cache
Quellcode
function _prime_post_caches( $ids, $update_term_cache = true, $update_meta_cache = true ) {
global $wpdb;
$non_cached_ids = _get_non_cached_ids( $ids, 'posts' );
if ( !empty( $non_cached_ids ) ) {
$fresh_posts = $wpdb->get_results( sprintf( "SELECT $wpdb->posts.* FROM $wpdb->posts WHERE ID IN (%s)", join( ",", $non_cached_ids ) ) );
update_post_caches( $fresh_posts, 'any', $update_term_cache, $update_meta_cache );
}
}Beispiele [ wp-snippets.com ]
Top Google Suchergebnisse
- _prime_post_caches (WordPress Function) - WPSeek.com
Adds any posts from the given ids to the cache that do not already exist in cache WordPress lookup for _prime_post_caches, a WordPress Function.
wpseek.com - FATAL ERROR MESSAGE while updating to new version - WordPress
Fatal error: Call to undefined function _prime_post_caches() in /home/content/f/v/ s/fvsschone/html/wp-includes/query.php on line 2645. WordPress Admin: ...
wordpress.org - WordPress › Support » error_log error
Mar 3, 2013... _prime_post_caches, update_post_caches, update_object_term_cache, wp_get_object_terms [03-Mar-2013 16:04:23] ERROR Can't create ...
wordpress.org - #18536 (Improve performance of WP_Query core) – WordPress Trac
I don't think _prime_post_caches() has a use case outside of WP_Query. If you wish to prime post caches elsewhere, simply use WP_Query. (For example, we ...
core.trac.wordpress.org
