Changeset 2597157
- Timestamp:
- 09/11/2021 05:31:43 AM (5 years ago)
- Location:
- listar-directory-listing/trunk/models
- Files:
-
- 2 edited
-
class-listar-category-model.php (modified) (1 diff)
-
class-listar-location-model.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
listar-directory-listing/trunk/models/class-listar-category-model.php
r2389195 r2597157 46 46 47 47 // Image sizes 48 if($key == 'featured_image' && $term->featured_image) { 49 $term->image = [ 50 'full' => ['url' => wp_get_attachment_url($term->featured_image)], 51 'thumb' => ['url' => wp_get_attachment_thumb_url($term->featured_image)], 52 ]; 48 if($key == 'featured_image') { 49 if($term->featured_image) { 50 $term->image = [ 51 'full' => ['url' => wp_get_attachment_url($term->featured_image)], 52 'thumb' => ['url' => wp_get_attachment_thumb_url($term->featured_image)], 53 ]; 54 } else { 55 $term->image = [ 56 'full' => ['url' => Listar_Setting_Model::default_image()], 57 'thumb' => ['url' => Listar_Setting_Model::default_image()], 58 ]; 59 } 53 60 } 54 61 } else { -
listar-directory-listing/trunk/models/class-listar-location-model.php
r2571251 r2597157 40 40 41 41 // Image sizes 42 if($key == 'featured_image' && $term->featured_image) { 43 $term->image = [ 44 'full' => ['url' => wp_get_attachment_url($term->featured_image)], 45 'thumb' => ['url' => wp_get_attachment_thumb_url($term->featured_image)], 46 ]; 42 if($key == 'featured_image') { 43 if($term->featured_image) { 44 $term->image = [ 45 'full' => ['url' => wp_get_attachment_url($term->featured_image)], 46 'thumb' => ['url' => wp_get_attachment_thumb_url($term->featured_image)], 47 ]; 48 } else { 49 $term->image = [ 50 'full' => ['url' => Listar_Setting_Model::default_image()], 51 'thumb' => ['url' => Listar_Setting_Model::default_image()], 52 ]; 53 } 47 54 } 48 55 } else {
Note: See TracChangeset
for help on using the changeset viewer.