Recipe_Post_Utilities::delete_triggers_actions( $post_ID )
Delete all children triggers and actions of recipe
Contents
Parameters Parameters
- $post_ID
-
(Required)
Source Source
File: src/core/automator-post-types/uo-recipe/class-recipe-post-utilities.php
public function delete_triggers_actions( $post_ID ) { $post = get_post( $post_ID ); if ( ! $post instanceof \WP_Post ) { return; } if ( 'uo-recipe' === $post->post_type ) { // delete recipe logs self::delete_recipe_logs( $post_ID ); } if ( $post && 'uo-action' === (string) $post->post_type ) { Automator()->db->action->delete( $post_ID ); } if ( $post && 'uo-trigger' === (string) $post->post_type ) { Automator()->db->trigger->delete( $post_ID ); } if ( $post && 'uo-closure' === (string) $post->post_type ) { Automator()->db->closure->delete( $post_ID ); } }
Expand full source code Collapse full source code View on Github