LLMS_Question_Choice::get_image()

Retrieve an image for picture choices


Return Return

([type])


Top ↑

Source Source

File: includes/models/model.llms.question.choice.php

	public function get_image() {
		if ( 'image' !== $this->get( 'choice_type' ) ) {
			return '';
		}
		$img = $this->get( 'choice' );
		if ( is_array( $img ) && isset( $img['id'] ) ) {
			return wp_get_attachment_image( $img['id'], 'full' );
		}
		return '';
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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