Add_Slack_Integration::add_integration_func()

Register the integration by pushing it into the global automator object


Source Source

File: src/integrations/slack/add-slack-integration.php

	public function add_integration_func() {

		global $uncanny_automator;

		$slack_client = get_option( '_uncannyowl_slack_settings', array() );

		if ( isset( $slack_client->access_token ) && ! empty( $slack_client->access_token ) ) {
			$this->connected = true;
		}

		$uncanny_automator->register->integration(
			self::$integration,
			array(
				'name'     => 'Slack',
				'icon_svg' => Utilities::automator_get_integration_icon( __DIR__ . '/img/slack-icon.svg' ),
				'connected' => $this->connected,
				'settings_url' => admin_url( 'edit.php' ) . '?post_type=uo-recipe&page=uncanny-automator-settings&tab=slack_api'
			)
		);

	}