LLMS_Question_Choice::get_image()
Retrieve an image for picture choices
Return Return
([type])
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 '';
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.16.0 | Introduced. |