includes/Core/class-preload-buffer-coordinator.php
Frontend preload, output-buffer, and cache-warm coordination.
Class Preload_Buffer_Coordinator
Coordinates frontend buffering and cache-warm scheduling.
final class Preload_Buffer_CoordinatorProperties
| Property | Visibility | Type | Default | Line |
|---|---|---|---|---|
$get_options | private | callable(): | — | 39 |
$image_optimisation | private | Image_Optimisation | — | 47 |
$google_fonts | private | Google_Fonts | — | 55 |
$safe_mode_active | private | callable(array): | — | 63 |
$aggressive_bypass_active | private | callable(): | — | 71 |
$enqueue_unique_async_action | private | callable(string,array,string): | — | 79 |
$used_css_buffer_enhanced | private | bool | false | 87 |
public __construct()
public function __construct(callable $get_options, Image_Optimisation $image_optimisation, Google_Fonts $google_fonts, callable $safe_mode_active, callable $aggressive_bypass_active, ?callable=null $enqueue_unique_async_action)Constructor. Parameter Type Default Description $get_optionscallable— Resolved options reader. $image_optimisationImage_Optimisation— LCP output callback target. $google_fontsGoogle_Fonts— Google Fonts output callback target. $safe_mode_activecallable— Safe-mode decision port. $aggressive_bypass_activecallable— Aggressive-bypass decision port. $enqueue_unique_async_action?callable=null— Optional atomic scheduling port.
publicstatic should_use_core_template_buffer()
public static function should_use_core_template_buffer(): boolWhether WP 6.9+ core owns the template-enhancement output buffer.
Return: bool — True when core\’s template-enhancement path is available.
public process_used_css_only()
public function process_used_css_only($filtered_output, $output)Process used-CSS on the WP 6.9+ enhancement filter path. Parameter Type Default Description $filtered_outputmixed— Output from earlier enhancement filters. $outputmixed— Raw template output.
Return: string — Fail-open HTML string.
public start_used_css_buffer()
public function start_used_css_buffer(): voidStart the legacy used-CSS buffer on supported pre-6.9 paths.
Return: void.
public start_lcp_priority_buffer()
public function start_lcp_priority_buffer(): voidStart the legacy LCP buffer on supported pre-6.9 paths.
Return: void.
public process_used_css_capture()
public function process_used_css_capture($buffer)Process the legacy used-CSS output buffer. Parameter Type Default Description $buffermixed— Output-buffer content.
Return: string — Fail-open HTML string.
public queue_crawler_warm_after_cache_invalidation()
public function queue_crawler_warm_after_cache_invalidation(int $post_id, ?array=null $settings): voidQueue a cache warm after smart purge when sitemap preload is enabled. Parameter Type Default Description $post_idint— Saved post ID. $settings?array=null— Optional settings snapshot.
Return: void.
public queue_used_css_regeneration()
public function queue_used_css_regeneration(int $post_id, ?array=null $settings): voidQueue used-CSS generation when the setting is enabled. Parameter Type Default Description $post_idint— Saved post ID. $settings?array=null— Optional settings snapshot.
Return: void.
private legacy_buffer_owned_by_core()
private function legacy_buffer_owned_by_core(): boolWhether a runtime core enhancement buffer owns the legacy route.
Return: bool — True when no legacy buffer may open.
private should_optimise_for_logged_in()
private function should_optimise_for_logged_in(): boolWhether optimisation may run for the current viewer.
Return: bool — True when frontend optimisation is eligible.
private reject_legacy_woo_dynamic_url()
private function reject_legacy_woo_dynamic_url(string $url, array $options): boolMixed-version fallback for rejecting dynamic Woo preload URLs. Parameter Type Default Description $urlstring— Candidate permalink. $optionsarray— Resolved settings snapshot.
Return: bool — True when the URL must not be scheduled.
Hooks
Hooks referenced in includes/Core/class-preload-buffer-coordinator.php: Hook Type Line Notes wppo_debug_logaction 173 — wppo_debug_logaction 251 —