You appear to be a bot. Output may be restricted
Description
Returns a limited number of unindexed posts.
Usage
$int = Abstract_Indexing_Action::get_limited_unindexed_count( $limit );
Parameters
- $limit
- ( int ) required – Limit the maximum number of unindexed posts that are counted.
Returns
int The limited number of unindexed posts. 0 if the query fails.
Source
File name: wordpress-seo/src/actions/indexing/abstract-indexing-action.php
Lines:
1 to 19 of 19
public function get_limited_unindexed_count( $limit ) { $transient = \get_transient( static::UNINDEXED_LIMITED_COUNT_TRANSIENT ); if ( $transient !== false ) { return (int) $transient; } \set_transient( static::UNINDEXED_LIMITED_COUNT_TRANSIENT, 0, ( \MINUTE_IN_SECONDS * 15 ) ); $query = $this->get_select_query( $limit ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Function get_count_query returns a prepared query. $unindexed_object_ids = $this->wpdb->get_col( $query ); $count = (int) \count( $unindexed_object_ids ); \set_transient( static::UNINDEXED_LIMITED_COUNT_TRANSIENT, $count, ( \MINUTE_IN_SECONDS * 15 ) ); return $count; }