Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
add_action( 'bbp_theme_after_topic_started_by', function() {
$topic = bbp_get_topic( bbp_get_topic_id() );
if ( ! $topic || ! is_a( $topic, 'WP_Post' ) ) {
return;
}
try {
$date_created = date_create( $topic->post_date )->format( get_option( 'date_format' ) );
print ' on ' . esc_html( $date_created );
}
catch ( Exception $e ) {}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.