Recent

Bulk_Pageclass

Bulk_Page

Provides the resumable Bulk Optimize screen and AJAX endpoints.

Namespace: WebberZone\Image_Optimizer\Admin
Since: 1.0.0
Source: includes/admin/class-bulk-page.php line 30

Methods

__construct()

Constructor.

Since: 1.0.0
Line: 54

public function __construct(  );

register_page()

Register the screen under the Media menu.

Since: 1.0.0
Line: 70

public function register_page(  ): void;

Returns: void

enqueue_assets()

Enqueue the screen assets.

Since: 1.0.0
Line: 93

public function enqueue_assets( $hook_suffix ): void;
Type Name Description
string $hook_suffix Current admin page.

Returns: void

render()

Render the screen.

Since: 1.0.0
Line: 146

public function render(  ): void;

Returns: void

render_cron_health_notice()

Render a warning when the background queue has stopped being processed.

Since: 1.1.0
Line: 299

public function render_cron_health_notice( ?string $status = ... ): void;
Type Name Description
string|null $status Cron health status. Defaults to the current status.

Returns: void

get_stats() static

Collect the numbers shown on the screen.

Since: 1.0.0
Line: 334

static public function get_stats(  ): array;

Returns: array — int, optimized: int, remaining: int, saved: int, saved_human: string, source: int, source_human: string, saved_percent: float, done: int, original_saved_human: string, backup_bytes_human: string, original_resized: int, copies_human: string, copies_breakdown: string} Stats.

format_breakdown() static

Describe the bytes held by each format.

Since: 1.2.0
Line: 368

static public function format_breakdown( array $formats ): string;
Type Name Description
array $formats

Returns: string — Breakdown such as “WebP 4 MB, AVIF 2 MB”.

ajax_scan()

Build the queue.

Since: 1.0.0
Line: 402

public function ajax_scan(  ): void;

Returns: void

ajax_step()

Process one batch.

Since: 1.0.0
Line: 437

public function ajax_step(  ): void;

Returns: void

ajax_status()

Report the current numbers.

Since: 1.0.0
Line: 452

public function ajax_status(  ): void;

Returns: void

ajax_reset()

Empty the queue.

Since: 1.0.0
Line: 465

public function ajax_reset(  ): void;

Returns: void