Update class-opalestate-property.php
This commit is contained in:
parent
758df32f28
commit
89b2eeb2d1
@ -571,11 +571,15 @@ class Opalestate_Property {
|
||||
return $this->get_metabox_value( 'gallery', true );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Count gallery images.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function get_gallery_count() {
|
||||
$count = $this->get_gallery();
|
||||
|
||||
return count( $count );
|
||||
return is_array( $count ) && $count ? count( $count ) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user