WP_USERROLEADDED::define_trigger()
Define and register the trigger by pushing it into the Automator object
Source Source
File: src/integrations/wp/triggers/wp-userroleadded.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/wordpress-core/' ), 'integration' => self::$integration, 'code' => $this->trigger_code, 'meta' => $this->trigger_meta, /* translators: Logged-in trigger - WordPress Core */ 'sentence' => sprintf( __( '{{A specific:%1$s}} role is added to the user', 'uncanny-automator' ), $this->trigger_meta ), /* translators: Logged-in trigger - WordPress Core */ 'select_option_name' => __( '{{A specific}} role is added to the user', 'uncanny-automator' ), 'action' => 'add_user_role', 'priority' => 90, 'accepted_args' => 2, 'validation_function' => array( $this, 'add_user_role' ), 'options_group' => array(), 'options' => array( Automator()->helpers->recipe->wp->options->wp_user_roles(), ), ); Automator()->register->trigger( $trigger ); }
Expand full source code Collapse full source code View on Github