WP_ERASE_PERSONAL_USER_DATA::define_action()

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


Source Source

File: src/integrations/wp/actions/wp-erase-personal-user-data.php

	public function define_action() {
		$action = array(
			'author'             => Automator()->get_author_name( $this->action_code ),
			'support_link'       => Automator()->get_author_support_link( $this->action_code, 'integration/wordpress/' ),
			'integration'        => self::$integration,
			'code'               => $this->action_code,
			'requires_user'      => false,
			/* translators: Action - WordPress Core */
			'sentence'           => sprintf( esc_attr__( 'Add a WordPress data erasure request for {{a user:%1$s}}', 'uncanny-automator' ), $this->action_code ),
			/* translators: Action - WordPress Core */
			'select_option_name' => esc_attr__( 'Add a WordPress data erasure request for {{a user}}', 'uncanny-automator' ),
			'priority'           => 11,
			'accepted_args'      => 1,
			'execution_function' => array( $this, 'erase_user_personal_data' ),
			'options_callback'   => array( $this, 'load_options' ),
		);

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