Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Helper_Upgrader::__construct()

Constructor


Return Return

(void)


Top ↑

Source Source

File: libraries/lifterlms-helper/includes/class-llms-helper-upgrader.php

	private function __construct() {

		// Setup a llms add-on plugin info.
		add_filter( 'plugins_api', array( $this, 'plugins_api' ), 10, 3 );

		// Authenticate and get a real download link during add-on upgrade attempts.
		add_filter( 'upgrader_package_options', array( $this, 'upgrader_package_options' ) );

		// Add llms add-on info to list of available updates.
		add_filter( 'pre_set_site_transient_update_themes', array( $this, 'pre_set_site_transient_update_things' ) );
		add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'pre_set_site_transient_update_things' ) );

		$products = llms_get_add_ons();
		if ( ! is_wp_error( $products ) && isset( $products['items'] ) ) {
			foreach ( (array) $products['items'] as $product ) {

				if ( 'plugin' === $product['type'] && $product['update_file'] ) {
					add_action( "in_plugin_update_message-{$product['update_file']}", array( $this, 'in_plugin_update_message' ), 10, 2 );
				}
			}
		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.2 Unknown.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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