wpce_after_document_from_post v3.31 β
Fires after a Document instance has been created via Document::from_post.
Parameters
WPCE\Document $documentThe
Documentinstance that has been created.?WP_Post $postThe post the document was loaded for. May be
nullto indicate that the post should be detected from the environment (e.g. the loop's current post or a$_GET['post']parameter).bool $previewWhether the document has been loaded as a preview.
Example
php
add_action('wpce_after_document_from_post', function (WPCE\Document $document, ?WP_Post $post, bool $preview) {
// ...
}, 10, 3);