You appear to be a bot. Output may be restricted
Description
Returns the total number of unindexed posts.
Usage
$int|false = Abstract_Indexing_Action::get_total_unindexed();
Parameters
Returns
int|false The total number of unindexed posts. False if the query fails.
Source
File name: wordpress-seo/src/actions/indexing/abstract-indexing-action.php
Lines:
1 to 24 of 24
public function get_total_unindexed() { $transient = \get_transient( static::UNINDEXED_COUNT_TRANSIENT ); if ( $transient !== false ) { return (int) $transient; } // Store transient before doing the query so multiple requests won't make multiple queries. // Only store this for 15 minutes to ensure that if the query doesn't complete a wrong count is not kept too long. \set_transient( static::UNINDEXED_COUNT_TRANSIENT, 0, ( \MINUTE_IN_SECONDS * 15 ) ); $query = $this->get_count_query(); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Function get_count_query returns a prepared query. $count = $this->wpdb->get_var( $query ); if ( \is_null( $count ) ) { return false; } \set_transient( static::UNINDEXED_COUNT_TRANSIENT, $count, \DAY_IN_SECONDS ); return (int) $count; }