LLMS_Question::has_image()

Determine if a featured image is enabled and not empty


Return Return

(bool)


Top ↑

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'] );


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.