LLMS_Add_On::get_image( string $type = 'addon' )

Get the addon or author image URL for the add-on.


Parameters Parameters

$type

(string) (Optional) Type of image to retrieve. Defaults to 'addon'. Accepts 'addon' or 'author'.

Default value: 'addon'


Top ↑

Return Return

(string)


Top ↑

Source Source

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

	public function get_image( $type = 'addon' ) {

		$img = 'author' === $type ? $this->get( 'author' )['image'] : $this->get( 'image' );

		if ( ! $img ) {
			return '';
		}

		if ( is_readable( llms()->plugin_path() . '/assets/images/addons/' . basename( $img ) ) ) {
			return llms()->plugin_url() . '/assets/images/addons/' . basename( $img );
		}

		return $img;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
7.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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