wpce_load_node v3.20
Fires for each Node in a WPCE Document when it's created.
Parameters
object $nodeThe node that is being loaded.
WPCE\Document $documentThe
Documentwhich contains the node.
Example
php
add_action('wpce_load_node', function (object $node, WPCE\Document $document) {
// Remove all hidden nodes from the document
if (($node->visisble ?? true) === false) {
$document->remove($node);
}
}, 10, 2);Related
INFO
This hook existed since WPCE v3.14, but was only used internally. Since v3.20, it's now a public hook with a slightly adjusted signature.