class-hook-registry.php

Hook registry — WordPress hook registration extracted from Main::setup_hooks().

Source includes/Core/class-hook-registry.php2 min readPart of Performance Optimisation

includes/Core/class-hook-registry.php

Hook registry — WordPress hook registration extracted from Main::setup_hooks().

Namespace: PerformanceOptimise\\Inc · Lines: 689

Class Hook_Registry

Class Hook_Registry

Source: includes/Core/class-hook-registry.php, line 37

final class Hook_Registry

Tags: @since 2.4.0

Properties

PropertyVisibilityTypeDefaultLine
$mainprivateMain—50
$optionsprivatearray—62
$image_optimisationprivateImage_Optimisation—70
$google_fontsprivateGoogle_Fonts—78

public __construct()

public function __construct(Main $main, array $options, Image_Optimisation $image_optimisation, Google_Fonts $google_fonts)

Constructor.

ParameterTypeDefaultDescription
$mainMain—Main instance (callback target).
$optionsarray—Main options snapshot (registration gates only).
$image_optimisationImage_Optimisation—Image optimisation callback target.
$google_fontsGoogle_Fonts—Google Fonts callback target.

Tags: @since 2.4.0

Source: includes/Core/class-hook-registry.php, line 89

public register()

public function register(): void

Register every plugin hook.

Return: void.

Tags: @since 2.4.0

Source: includes/Core/class-hook-registry.php, line 109

public register_head_hint_hooks()

public function register_head_hint_hooks(): void

Register frontend head-hint hooks (preload/preconnect/speculation).

Return: void.

Tags: @since 2.2.0 · @since 2.4.0 Relocated from Main to Hook_Registry (REF-005).

Source: includes/Core/class-hook-registry.php, line 541

public register_background_hooks()

public function register_background_hooks(): void

Register background-job hooks (Action Scheduler + save_post queue).

Return: void.

Tags: @since 2.2.0 · @since 2.4.0 Relocated from Main to Hook_Registry (REF-005).

Source: includes/Core/class-hook-registry.php, line 557

public register_invalidation_hooks()

public function register_invalidation_hooks(): void

Register cache-invalidation hooks (structural changes).

Return: void.

Tags: @since 2.2.0 · @since 2.4.0 Relocated from Main to Hook_Registry (REF-005).

Source: includes/Core/class-hook-registry.php, line 597

public register_integration_hooks()

public function register_integration_hooks(): void

Register third-party integration hooks (LiteSpeed sync, ESI bridge).

Return: void.

Tags: @since 2.2.0 · @since 2.4.0 Relocated from Main to Hook_Registry (REF-005).

Source: includes/Core/class-hook-registry.php, line 632

public register_block_assets_filters()

public function register_block_assets_filters(bool $loads_separate_core_block_assets_on_demand): void

Register filters that control when core block assets load.

ParameterTypeDefaultDescription
$loads_separate_core_block_assets_on_demandbool—Whether WP 6.9+ is active (core loads separate core block assets on demand).

Return: void.

Tags: @since 2.4.0 Relocated from Main to Hook_Registry (REF-005).

Source: includes/Core/class-hook-registry.php, line 669

Hooks

Hooks referenced in includes/Core/class-hook-registry.php:

HookTypeLineNotes
wppo_run_upgradesaction registration116—
wppo_after_cache_clearaction registration381—
wppo_after_cache_clearaction registration418—
wppo_generate_ccssaction registration519—
wppo_convert_image_backgroundaction registration559—
wppo_pagespeed_scanaction registration562—
wppo_used_css_generateaction registration571—
wppo_ai_css_refresh_queuedaction registration577—
wppo_google_fonts_downloadaction registration580—