wp = $wp; $this->batch_size = max( 1, (int) $batch_size ); } /** * {@inheritdoc} */ public function urls() { $after_id = 0; do { $rows = $this->wp->author_rows( $after_id, $this->batch_size ); $full_batch = count( $rows ) === $this->batch_size; foreach ( $rows as $row ) { $after_id = $row['id']; $link = $this->wp->author_link( $row['id'] ); if ( null === $link ) { continue; } yield new DiscoveredUrl( $link, 'author', 'user', $row['id'], $row['modified_gmt'] ); yield from Pagination::urls( $this->wp, $link, $row['count'] ); } } while ( $full_batch ); } }