Zoom_Webinar_Settings::set_properties()

Sets up the properties of the settings page


Source

File: src/integrations/zoom-webinar/settings/settings-zoom-webinar.php

	protected function set_properties() {

		$this->set_id( 'zoom-webinar-api' );

		$this->set_icon( 'zoom' );

		$this->set_name( 'Zoom Webinars' );

        $this->register_option( 'uap_automator_zoom_webinar_api_consumer_key' );
		$this->register_option( 'uap_automator_zoom_webinar_api_consumer_secret' );
		$this->register_option( 'uap_automator_zoom_webinar_api_settings_timestamp' );

		$this->api_key    = trim( get_option( 'uap_automator_zoom_webinar_api_consumer_key', '' ) );
		$this->api_secret = trim( get_option( 'uap_automator_zoom_webinar_api_consumer_secret', '' ) );

		$this->user = false;

		if ( ! empty( $this->api_key ) && ! empty( $this->api_secret ) ) {
			$this->user = $this->helpers->get_user();
		}

		$this->is_connected = false;

		if ( ! empty( $this->user['email'] ) ) {
			$this->is_connected = true;
		}
		
		$this->set_status( $this->is_connected ? 'success' : '' );

	}