Skip to:
Content

  • Home
  • About
  • Integrations
  • Help
  • Blog
  • Download
Automator Developer Resources

Code Reference

  • Home
  • Reference
Filter by type:
Search
Browse: Home / Reference / Classes / WP_LOGIN / WP_LOGIN::define_trigger()

WP_LOGIN::define_trigger()

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

Contents

  • Source
  • Related
    • Uses
    • Used By

  • Source #Source

    File: src/integrations/wp/triggers/wp-login.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,
    			/* translators: Logged-in trigger - WordPress */
    			'sentence'            => sprintf( esc_attr__( 'A user logs in to the site {{a number of:%1$s}} time(s)', 'uncanny-automator' ), 'NUMTIMES' ),
    			/* translators: Logged-in trigger - WordPress */
    			'select_option_name'  => esc_attr__( 'A user logs in to the site', 'uncanny-automator' ),
    			'action'              => 'wp_login',
    			'priority'            => 99,
    			'accepted_args'       => 2,
    			'validation_function' => array( $this, 'wp_login' ),
    			// very last call in WP, we need to make sure they viewed the page and didn't skip before is was fully viewable
    			'options'             => [
    				Automator()->helpers->recipe->options->number_of_times(),
    			],
    		);
    
    		Automator()->register->trigger( $trigger );
    
    		return;
    	}
    

    Expand full source code Collapse full source code View on Github


    Related #Related

    Top ↑

    Uses #Uses

    Uses
    Uses Description
    uncanny-automator.php: Automator()

    Top ↑

    Used By #Used By

    Used By
    Used By Description
    src/integrations/wp/triggers/wp-login.php: WP_LOGIN::__construct()

    Set up Automator trigger constructor.


    Twitter • Facebook • YouTube • Contact Us • Privacy • Terms of Service