Google_Sheet_Helpers::get_google_api_settings_description()

Method get_google_api_settings_description


Return Return

(void)


Source Source

File: src/integrations/google-sheet/helpers/google-sheet-helpers.php

	protected function get_google_api_settings_description() {

		$description = __(
			'Connecting to Google requires signing into your account to link it to Automator.
			To get started, click the "Connect an account" button below or the "Change account" button if you need to connect a new account.
			Uncanny Automator can only connect to a single Google account at one time. (It is not possible to set some recipes up under one
			account and then switch accounts, all recipes are mapped to the account selected on this page and existing recipes may break if
			they were set up under another account.)',
			'uncanny-automator'
		);
		ob_start();
		?>
		<p>
			<?php echo esc_html( $description ); ?>
		</p>

		<?php $user = $this->get_user_info(); ?>
		<?php if ( ! empty( $user['name'] ) ) : ?>
			<div class="uo-google-user-info">
				<?php if ( ! empty( $user['avatar_uri'] ) ) : ?>
					<div class="uo-google-user-info__avatar">
						<img width="32" src="<?php echo esc_url( $user['avatar_uri'] ); ?>"
							 alt="<?php esc_attr_e( $user['name'] ); ?>"/>
					</div>
				<?php endif; ?>

				<?php if ( ! empty( $user['email'] ) ) : ?>
					<div class="uo-google-user-info__email">
						<?php echo esc_html( $user['email'] ); ?>
					</div>
				<?php endif; ?>

				<?php if ( ! empty( $user['name'] ) ) : ?>
					<div class="uo-google-user-info__name">
						(<?php echo esc_html( $user['name'] ); ?>)
					</div>
				<?php endif; ?>
			</div>
		<?php endif; ?>
		<?php
		return ob_get_clean();
	}