PressQueue fires a small number of WordPress hooks. Two observation actions let code on the same site watch what PressQueue records. One filter registers providers, and two filters adjust social images.
How the observation hooks behave
They are best effort. Subscribers run after the outermost database commit has succeeded. An exception thrown by a subscriber is caught and redacted, and it does not undo the committed operation.
Payloads carry identities, classifications, states, hashes and timestamps. They do not carry snapshot bodies, event detail bodies, rendered content, media URLs, credentials, encrypted credential envelopes, Authorization headers, raw HTTP request arguments, raw provider responses, full provider payloads or actor user IDs.
pressqueue_decision_recorded
Fires once for each newly inserted decision, after the transaction commits. It does not fire when deduplication returns an existing decision row.
add_action( 'pressqueue_decision_recorded', function ( array $payload ): void {
// $payload['result'] is included, excluded, skipped or policy_error.
} );
Payload keys: schema_version, decision_public_id, decision_key, event_key, post_id, scope_type, scope_public_id, trigger, event_mode, result, rule_public_id, rule_version, snapshot_hash and created_at_utc.
pressqueue_delivery_event_recorded
Fires once per newly committed delivery event, after the transaction commits. It does not fire on rollback.
Payload keys: schema_version, event_public_id, delivery_public_id, delivery_key, event_type, from_state, to_state, attempt_number, action_id, actor_type, provider_result, retry_safety, classification and created_at_utc.
pressqueue_provider_adapters
A filter that receives an array of ProviderDescriptor instances and returns an array of descriptors. The built-in buffer descriptor is inserted before the filter runs and cannot be replaced. See Providers.
Social image filters
pressqueue_social_card_titlefilters the text drawn on a post's social image. It receives the title as a string and theWP_Post, and returns the text to draw.pressqueue_social_card_post_typesfilters which post types get the social image as their link preview. It receives an array of post type names. By default these are the public post types without attachments and pages.
Lifecycle actions
pressqueue_bootstrap_loaded fires when the plugin has loaded. pressqueue_before_activation, pressqueue_after_activation, pressqueue_before_deactivation and pressqueue_after_deactivation fire around activation and deactivation, each with a $network_wide boolean.