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_Admin_AddOns::get_data()

Retrieve remote json data.


Return Return

(array|WP_Error)


Top ↑

Source Source

File: includes/admin/class.llms.admin.addons.php

	private function get_data() {

		$this->data = llms_get_add_ons();

		if ( ! is_wp_error( $this->data ) ) {
			foreach ( $this->data['items'] as $key => $addon ) {
				// Exclude the core plugin and helper plugin.
				if ( in_array( $addon['id'], array( 'lifterlms-com-lifterlms', 'lifterlms-com-lifterlms-helper' ), true ) ) {
					unset( $this->data['items'][ $key ] );
				}

				// Exclude uncategorized Add-ons.
				if ( array_key_exists( 'uncategorized', $addon['categories'] ) ) {
					unset( $this->data['items'][ $key ] );
				}
			}
		}

		return $this->data;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
7.1.0 Use strict comparisons for in_array().
3.5.0
3.22.2 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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