WPUM_UPDATESCOVERPHOTO::define_trigger()

Define and register the trigger by pushing it into the Automator object


Source Source

File: src/integrations/wp-user-manager/triggers/wpum-updatescoverphoto.php

	public function define_trigger() {


		$trigger = array(
			'author'              => Automator()->get_author_name( $this->trigger_code ),
			'support_link'        => Automator()->get_author_support_link( $this->trigger_code, 'integration/wp-user-manager/' ),
			'integration'         => self::$integration,
			'code'                => $this->trigger_code,
			/* translators: Logged-in trigger - WP User Manager */
			'sentence'            => __( 'A user updates their cover photo', 'uncanny-automator' ),
			/* translators: Logged-in trigger - WP User Manager */
			'select_option_name'  => __( 'A user updates their cover photo', 'uncanny-automator' ),
			'action'              => 'wpum_user_update_change_cover',
			'priority'            => 99,
			'accepted_args'       => 2,
			'validation_function' => array( $this, 'wpum_cover_photo_updated' ),
			'options'             => array(),
		);

		Automator()->register->trigger( $trigger );
	}