LLMS_User_Achievement::get_image( array $size = array(),  $key = 'achievement_image' )

Retrieve the image source for the achievement


Parameters Parameters

$size

(array) (Optional) dimensions of the image to return (width x height)

Default value: array()


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/models/model.llms.user.achievement.php

	public function get_image( $size = array(), $key = 'achievement_image' ) {

		if ( ! $size ) {
			$size = apply_filters( 'llms_achievement_image_default_size', array( 300, 300 ) );
		}

		if ( ! $this->get( 'achievement_image' ) ) {
			$src = LLMS()->plugin_url() . '/assets/images/optional_achievement.png';
		} else {
			$src = parent::get_image( $size, $key );
		}

		return apply_filters( 'llms_achievement_get_image', $src, $this );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.14.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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