WP_VIEWPOST::view_post()
Validation function when the trigger action is hit
Source
File: src/integrations/wp/triggers/wp-viewpost.php
public function view_post() { global $post; $user_id = get_current_user_id(); if ( ! is_single() ) { return; } $args = [ 'code' => $this->trigger_code, 'meta' => $this->trigger_meta, 'post_id' => $post->ID, 'user_id' => $user_id, ]; Automator()->maybe_add_trigger_entry( $args ); }
Expand full source code Collapse full source code View on Github