AP_License::ap_plugin_updater()

Description #

Initiate product updater.

Source #

File: admin/license.php

	 * Initiate product updater.
	 */
	public function ap_plugin_updater() {
		$fields = ap_product_license_fields();
		$licenses = get_option( 'anspress_license', array() );

		if ( ! empty( $fields ) ) {
			foreach ( $fields as $slug => $prod ) {
				if ( isset( $licenses[ $slug ] ) && ! empty( $licenses[ $slug ]['key'] ) ) {
					new AnsPress_Prod_Updater( $prod['file'], array(
							'version' 	=> ! empty( $prod['version'] ) ? $prod['version']: '',
							'license' 	=> $licenses[ $slug ]['key'],
							'item_name' => ! empty( $prod['name'] ) ? $prod['name']:       '',
							'author' 	  => ! empty( $prod['author'] ) ? $prod['author']:   '',
							'slug' 	    => $slug,
						),
						isset( $prod['is_plugin'] ) ? $prod['is_plugin'] : true
					);
				}
			}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment