Changeset 11350 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
- Timestamp:
- 12/01/2021 05:40:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r11335 r11350 1262 1262 $last_active = get_post_meta( $topic_id, '_bbp_last_active_time', true ); 1263 1263 if ( empty( $last_active ) ) { 1264 if ( ! empty( $reply_id ) ) { 1265 $last_active = get_post_field( 'post_date', $reply_id ); 1266 } else { 1267 $last_active = get_post_field( 'post_date', $topic_id ); 1268 } 1264 $last_active = get_post_field( 'post_date', $topic_id ); 1269 1265 } 1270 1266 1271 1267 // This is for translating the date components. 1272 1268 $datetime = date_create_immutable_from_format( 'Y-m-d H:i:s', $last_active ); 1273 $date = wp_date( get_option( 'date_format' ), $datetime->getTimestamp() ); 1274 $time = wp_date( get_option( 'time_format' ), $datetime->getTimestamp() ); 1269 if ( ! $datetime ) { 1270 return $anchor; 1271 } 1272 1273 $date = wp_date( get_option( 'date_format' ), $datetime->getTimestamp() ); 1274 $time = wp_date( get_option( 'time_format' ), $datetime->getTimestamp() ); 1275 1275 1276 1276 return str_replace(
Note: See TracChangeset
for help on using the changeset viewer.