Home / Admin / Post_Created_Sample_Trigger
Duplicate Snippet

Embed Snippet on Your Site

Post_Created_Sample_Trigger

Code Preview
php
<?php
class Post_Created_Sample_Trigger extends \Uncanny_Automator\Recipe\Trigger {
	protected function setup_trigger() {
		// Define the Trigger's info
		$this->set_integration( 'SAMPLE_INTEGRATION' );
		$this->set_trigger_code( 'POST_CREATED_SAMPLE' );
		$this->set_trigger_meta( 'POST_TYPE' );
		// Trigger sentence
		$this->set_sentence( sprintf( esc_attr__( '{{A post type:%1$s}} is created sample trigger', 'automator-sample' ), 'POST_TYPE' ) );
		$this->set_readable_sentence( esc_attr__( '{{A post type}} is created sample trigger', 'automator-sample' ) );
		// Trigger wp hook
		$this->add_action( 'wp_after_insert_post', 90, 4 );
	}
}

Comments

Add a Comment