LLMS_Question::has_image()
Determine if a featured image is enabled and not empty
Return Return
(bool)
Source Source
File: includes/models/model.llms.question.php
* @since 3.16.0
*
* @return bool
*/
public function has_image() {
$img = $this->get( 'image' );
if ( is_array( $img ) ) {
if ( ! empty( $img['enabled'] ) && ( ! empty( $img['id'] ) || ! empty( $img['src'] ) ) ) {
return ( 'yes' === $img['enabled'] );
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.16.0 | Introduced. |