Skip to content

Commit 6111295

Browse files
committed
add comments to apply_filters
1 parent f8083e5 commit 6111295

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

classes/class-admin.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,13 @@ public function erase_large_records( int $total, int $done, int $last_entry, int
851851
return;
852852
}
853853

854-
// We will do at most 250000 at a time.
854+
/**
855+
* Filters the number of records in the {$wpdb->stream} table to do at a time.
856+
*
857+
* @since 4.1.0
858+
*
859+
* @param int $batch_size The batch size, default 250000.
860+
*/
855861
$batch_size = apply_filters( 'wp_stream_batch_size', 250000 );
856862

857863
// This will tend to erase them in reverse chronological order,

classes/class-plugin.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,14 @@ public function get_site_type(): string {
384384
* @return bool Whether or not this should be considered large.
385385
*/
386386
public function is_large_records_table( int $record_number ): bool {
387+
/**
388+
* Filters whether or not the number of records should be considered a large table.
389+
*
390+
* @since 4.1.0
391+
*
392+
* @param bool $is_large_table Whether or not the number of records should be considered large.
393+
* @param int $record_number The number of records being checked.
394+
*/
387395
return apply_filters( 'wp_stream_is_large_records_table', $record_number > 1000000, $record_number );
388396
}
389397

0 commit comments

Comments
 (0)