芝麻web文件管理V1.00
编辑当前文件:/home/elegucvf/public_html/src/actions/indexing/abstract-indexing-action.php
get_select_query( $limit ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Function get_count_query returns a prepared query. $unindexed_object_ids = ( $query === '' ) ? [] : $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; } /** * Returns the total number of unindexed posts. * * @return int|false The total number of unindexed posts. False if the query fails. */ 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 = ( $query === '' ) ? 0 : $this->wpdb->get_var( $query ); if ( \is_null( $count ) ) { return false; } \set_transient( static::UNINDEXED_COUNT_TRANSIENT, $count, \DAY_IN_SECONDS ); /** * Action: 'wpseo_indexables_unindexed_calculated' - sets an option to timestamp when there are no unindexed indexables left. * * @internal */ \do_action( 'wpseo_indexables_unindexed_calculated', static::UNINDEXED_COUNT_TRANSIENT, $count ); return (int) $count; } }