LLMS_MailHawk::get_connect_setting()

Retrieve the settings area HTML for the connect button


Return Return

(string)


Top ↑

Source Source

File: includes/admin/class-llms-mailhawk.php

	protected function get_connect_setting() {

		if ( $this->is_connected() ) {

			$ret = array(
				__( 'Your site is connected to MailHawk.', 'lifterlms' ),
			);

			$settings_url = esc_url( admin_url( '/tools.php?page=mailhawk' ) );

			if ( function_exists( '\MailHawk\mailhawk_is_suspended' ) && ! \MailHawk\mailhawk_is_suspended() ) {
				$ret[] = sprintf(
					// Translators: %1$s = Opening anchor tag to WP MailHawk Settings; Opening anchor tag to MailHawk.io account page; %2$s = Closing anchor tag.
					__( '%1$sView settings%3$s or %2$smanage your account%3$s.', 'lifterlms' ),
					'<a href="' . $settings_url . '">',
					'<a href="https://mailhawk.io/account/" target="_blank" rel="noopener noreferrer">',
					'</a>'
				);
			} else {
				$ret[] = sprintf(
					// Translators: %1$s = Opening anchor tag; %2$s = Closing anchor tag.
					'<em>' . __( 'Email sending is currently disabled. %1$sVisit MailHawk Settings%2$s to enable sending.', 'lifterlms' ) . '</em>',
					'<a href="' . $settings_url . '">',
					'</a>'
				);
			}

			return '<p>' . implode( ' ', $ret ) . '</p>';

		}

		return sprintf( '<button type="button" class="llms-button-outline" id="llms-mailhawk-connect"><span class="dashicons dashicons-email-alt"></span> %s</button>', __( 'Connect MailHawk', 'lifterlms' ) );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.40.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.