LLMS_Helper_Admin_Add_Ons::output_license_manager()

Output the HTML for the license manager area


Return Return

(void)


Top ↑

Source Source

File: libraries/lifterlms-helper/includes/class-llms-helper-admin-add-ons.php

	 */
	public function output_license_manager() {

		$my_keys = llms_helper_options()->get_license_keys();
		if ( $my_keys ) {
			wp_enqueue_style( 'plugin-install' );
			wp_enqueue_script( 'plugin-install' );
			add_thickbox();
		}

		?>
		<section class="llms-licenses">
			<button class="llms-button-primary" id="llms-active-keys-toggle">
				<?php _e( 'My License Keys', 'lifterlms' ); ?>
				<i class="fa fa-chevron-down" aria-hidden="true"></i>
			</button>

			<form action="" class="llms-key-field" id="llms-key-field-form" method="POST">

				<?php if ( $my_keys ) : ?>
					<h3 class="llms-license-header"><?php _e( 'Manage Saved License Keys', 'lifterlms' ); ?></h3>
					<ul class="llms-active-keys">
					<?php foreach ( $my_keys as $key ) : ?>
						<li>
							<label for="llms_key_<?php echo esc_attr( $key['license_key'] ); ?>">
								<input id="llms_key_<?php echo esc_attr( $key['license_key'] ); ?>" name="llms_remove_keys[]" type="checkbox" value="<?php echo esc_attr( $key['license_key'] ); ?>">
								<span><?php echo $key['license_key']; ?></span>
							</label>
						</li>

					<?php endforeach; ?>
					</ul>
					<button class="llms-button-danger small" name="llms_deactivate_keys" type="submit"><?php _e( 'Remove Selected', 'lifterlms' ); ?></button>
				<?php endif; ?>

				<label for="llms_keys_field">
					<h3 class="llms-license-header"><?php _e( 'Add New License Keys', 'lifterlms' ); ?></h3>
					<textarea name="llms_add_keys" id="llms_keys_field" placeholder="<?php esc_attr_e( 'Enter each license on a new line', 'lifterlms' ); ?>"></textarea>
				</label>
				<button class="llms-button-primary small" name="llms_activate_keys" type="submit"><?php _e( 'Add New', 'lifterlms' ); ?></button>
				<?php wp_nonce_field( 'llms_manage_keys', '_llms_manage_keys_nonce' ); ?>
			</form>
		</section>

		<?php


Top ↑

Changelog Changelog

Changelog
Version Description
3.4.0 Use core textdomain.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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