LLMS_Add_On::get_type()

Get the type of addon


Return Return

(string)


Top ↑

Source Source

File: includes/models/model.llms.add-on.php

	public function get_type() {

		$type = $this->get( 'type' );

		if ( $type ) {
			return $type;
		}

		$cats = array_keys( $this->get( 'categories' ) );

		if ( in_array( 'bundles', $cats, true ) ) {
			$type = 'bundle';
		} elseif ( in_array( 'third-party', $cats, true ) ) {
			$type = 'external';
		} else {
			$type = 'support';
		}

		return $type;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.21.3 Use strict comparison for in_array().
3.22.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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