LLMS_Helper_Admin_Add_Ons::output_single_update_action( obj $addon, string $curr_tab )

Output html for update action


Description Description

Does not output for "featured" items on general settings.


Top ↑

Parameters Parameters

$addon

(obj) (Required) LLMS_Add_On instance.

$curr_tab

(string) (Required) Slug of the current tab being viewed.


Top ↑

Return Return

(void)


Top ↑

Source Source

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

	 */
	public function output_single_update_action( $addon, $curr_tab ) {

		if ( 'featured' === $curr_tab ) {
			return;
		}

		if ( $addon->is_installable() && $addon->is_installed() && ( ! $addon->requires_license() || $addon->is_licensed() ) && $addon->has_available_update() ) {
			?>
			<label class="llms-status-icon status--update-available" for="<?php echo esc_attr( sprintf( '%s-update', $addon->get( 'id' ) ) ); ?>">
				<input class="llms-bulk-check" data-action="update" name="llms_update[]" id="<?php echo esc_attr( sprintf( '%s-update', $addon->get( 'id' ) ) ); ?>" type="checkbox" value="<?php echo esc_attr( $addon->get( 'id' ) ); ?>">
				<i class="fa fa-check-square-o" aria-hidden="true"></i>
				<i class="fa fa-arrow-circle-up" aria-hidden="true"></i>
				<span class="llms-status-text"><?php _e( 'Update', 'lifterlms' ); ?></span>
			</label>
			<a href="<?php echo admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $addon->get( 'id' ) . '&section=changelog&TB_iframe=true&width=600&height=800' ); ?>" class="thickbox open-plugin-details-modal tip--bottom-left" data-tip="<?php esc_attr_e( 'View update details', 'lifterlms' ); ?>">
				<i class="fa fa-info-circle" aria-hidden="true"></i>
			</a>
			<?php
		}


Top ↑

Changelog Changelog

Changelog
Version Description
3.4.0 Use core textdomain.
3.2.1 Output single update action if the addon doesn't require license (e.g. free product).
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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