Changeset 1785778
- Timestamp:
- 12/12/2017 09:26:21 PM (8 years ago)
- Location:
- displetreader-wordpress-plugin/trunk/instance
- Files:
-
- 2 edited
-
api/class-displet-rets-idx-residentials-api.php (modified) (1 diff)
-
class-displet-rets-idx-templates.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
displetreader-wordpress-plugin/trunk/instance/api/class-displet-rets-idx-residentials-api.php
r1484175 r1785778 93 93 } 94 94 $residentials = array( 95 'disclaimers' => $this->_response->disclaimers, 95 96 'listings' => $listings, 96 97 'meta' => $this->_response->meta, -
displetreader-wordpress-plugin/trunk/instance/class-displet-rets-idx-templates.php
r1484175 r1785778 104 104 'is_search_results_page' => false, 105 105 'is_shortcode' => false, 106 'last_updated' => apply_filters( 'displetretsidx_disclaimer_date_last_updated', date( 'Y-m-d', strtotime( '-12 hours' ) )),106 'last_updated' => self::_get_last_updated( $args ), 107 107 'layout' => !empty( self::$_options['listings_layout'] ) ? self::$_options['listings_layout'] : 'default', 108 108 'num_listings' => !empty( self::$_options['listings_per_page'] ) ? intval( self::$_options['listings_per_page'] ) : 10, … … 119 119 ) ); 120 120 } 121 122 private static function _get_last_updated( $args ) { 123 $last_updated = 'Unknown'; 124 125 if ( is_array( $args ) && is_array( $args['disclaimers'] ) && ! empty( $args['disclaimers'] ) ) { 126 foreach ( $args['disclaimers'] as $disclaimer ) { 127 $last_updated = strtotime( $disclaimer->board_updated_at ) > strtotime( $last_updated ) 128 ? $disclaimer->board_updated_at 129 : $last_updated; 130 } 131 } 132 133 if ( strtotime( $last_updated ) ) { 134 $last_updated = date( 'm/d/Y \a\t H:i:s T', strtotime( $last_updated ) ); 135 } 136 137 return apply_filters( 'displetretsidx_disclaimer_date_last_updated', $last_updated ); 138 } 121 139 } 122 140
Note: See TracChangeset
for help on using the changeset viewer.