Zoom_Webinar_Helpers::add_zoom_api_settings( $tabs )


Parameters Parameters

$tabs

(Required)


Top ↑

Return Return

(mixed)


Source Source

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

	public function add_zoom_api_settings( $tabs ) {

		if ( ! $this->display_settings_tab() ) {
			return $tabs;
		}

		$tab_url = admin_url( 'edit.php' ) . '?post_type=uo-recipe&page=uncanny-automator-settings&tab=' . $this->setting_tab;

		$tabs[ $this->setting_tab ] = array(
			'name'           => __( 'Zoom Webinar', 'uncanny-automator' ),
			'title'          => __( 'Zoom Webinar API settings', 'uncanny-automator' ),
			'description'    => sprintf(
				'<p>%1$s</p>',
				sprintf(
					__( "Connecting to Zoom requires setting up a JWT application and getting 2 values from inside your account. It's really easy, we promise! Visit %1\$s for simple instructions.", 'uncanny-automator' ),
					'<a href="' . automator_utm_parameters( 'https://automatorplugin.com/knowledge-base/zoom/', 'settings', 'zoom_webinar-kb_article' ) . '" target="_blank">https://automatorplugin.com/knowledge-base/zoom/</a>'
				)
			) . $this->get_user_info(),
			'is_pro'         => false,
			'settings_field' => 'uap_automator_zoom_webinar_api_settings',
			'wp_nonce_field' => 'uap_automator_zoom_webinar_api_nonce',
			'save_btn_name'  => 'uap_automator_zoom_webinar_api_save',
			'save_btn_title' => __( 'Save API details', 'uncanny-automator' ),
			'fields'         => array(
				'uap_automator_zoom_webinar_api_consumer_key'    => array(
					'title'       => __( 'API key:', 'uncanny-automator' ),
					'type'        => 'text',
					'css_classes' => '',
					'placeholder' => '',
					'default'     => '',
					'required'    => true,
					'custom_atts' => array( 'autocomplete' => 'off' ),
				),
				'uap_automator_zoom_webinar_api_consumer_secret' => array(
					'title'       => __( 'API secret:', 'uncanny-automator' ),
					'type'        => 'password',
					'css_classes' => '',
					'placeholder' => '',
					'default'     => '',
					'required'    => true,
					'custom_atts' => array( 'autocomplete' => 'off' ),
				),
			),
		);

		return $tabs;
	}