WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта
функция не описана

Yoast\WP\SEO\Integrations\Admin

Admin_Columns_Cache_Integration::fill_cache() public Yoast 1.0

Fills the cache of indexables for all known post IDs.

{} Это метод класса: Admin_Columns_Cache_Integration{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$Admin_Columns_Cache_Integration = new Admin_Columns_Cache_Integration();
$Admin_Columns_Cache_Integration->fill_cache();

Код Admin_Columns_Cache_Integration::fill_cache() Yoast 16.8

<?php
public function fill_cache() {
	global $wp_query;

	// No need to continue building a cache if the main query did not return anything to cache.
	if ( empty( $wp_query->posts ) ) {
		return;
	}

	$posts    = $wp_query->posts;
	$post_ids = [];

	// Post lists return a list of objects.
	if ( isset( $posts[0] ) && \is_a( $posts[0], 'WP_Post' ) ) {
		$post_ids = \wp_list_pluck( $posts, 'ID' );
	}
	elseif ( isset( $posts[0] ) && \is_object( $posts[0] ) ) {
		$post_ids = $this->get_current_page_page_ids( $posts );
	}
	elseif ( ! empty( $posts ) ) {
		// Page list returns an array of post IDs.
		$post_ids = \array_keys( $posts );
	}

	if ( empty( $post_ids ) ) {
		return;
	}

	if ( isset( $posts[0] ) && ! \is_a( $posts[0], WP_Post::class ) ) {
		// Prime the post caches as core would to avoid duplicate queries.
		// This needs to be done as this executes before core does.
		\_prime_post_caches( $post_ids );
	}

	$indexables = $this->indexable_repository->find_by_multiple_ids_and_type( $post_ids, 'post', false );

	foreach ( $indexables as $indexable ) {
		$this->indexable_cache[ $indexable->object_id ] = $indexable;
	}
}