Astra_Theme_Extension::addon_licence_form()

Addon Activation / Deactivation markup


Description


Return

(void)


Source

File: classes/class-astra-theme-extension.php

		public function addon_licence_form() {

			if ( is_multisite() ) {
				$white_label = get_site_option( '_astra_ext_white_label' );
			} else {
				$white_label = get_option( '_astra_ext_white_label' );
			}

			$pro_name = __( 'Astra Pro License', 'astra-addon' );

			if ( ! empty( $white_label['astra-pro']['name'] ) ) {
				/* translators: %s: Astra Pro name */
				$pro_name = sprintf( __( '%s License', 'astra-addon' ), $white_label['astra-pro']['name'] );
			}

			$pro_whitelabelled_name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-pro', 'name', false );

			if ( false !== $pro_whitelabelled_name ) {
				/* translators: %s: Astra Pro name */
				$pro_name = sprintf( __( '%s License', 'astra-addon' ), $pro_whitelabelled_name );
			}

			/* translators: %s: Astra Pro name */
			$not_active_status = sprintf( __( 'Please enter your valid %s license key to receive updates and support.', 'astra-addon' ), $pro_name );

			?>
			<div class="postbox">
				<h2 class="hndle ast-normal-cusror"><span><?php echo esc_html( $pro_name ); ?></span></h2>
				<div class="inside">
				<?php
					$bsf_product_id = bsf_extract_product_id( ASTRA_EXT_DIR );
					$args           = array(
						'product_id'                       => $bsf_product_id,
						'button_text_activate'             => esc_html__( 'Activate License', 'astra-addon' ),
						'button_text_deactivate'           => esc_html__( 'Deactivate License', 'astra-addon' ),
						'license_form_title'               => '',
						'license_deactivate_status'        => esc_html__( 'Your license is not active!', 'astra-addon' ),
						'license_activate_status'          => esc_html__( 'Your license is activated!', 'astra-addon' ),
						'submit_button_class'              => 'astra-product-license button-default',
						'form_class'                       => 'form-wrap bsf-license-register-' . esc_attr( $bsf_product_id ),
						'bsf_license_form_heading_class'   => 'astra-license-heading',
						'bsf_license_active_class'         => 'success-message',
						'bsf_license_not_activate_message' => 'license-error',
						'size'                             => 'regular',
						'bsf_license_allow_email'          => false,
						'bsf_license_active_status'        => __( 'Active!', 'astra-addon' ),
						'bsf_license_not_active_status'    => $not_active_status,
					);
					echo bsf_license_activation_form( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
					?>
				</div>
			</div>
			<?php
		}

Changelog

Changelog
Version Description
1.2.1 Introduced.

User Contributed Notes

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