Skip to content

Instantly share code, notes, and snippets.

@bnecreative
Last active July 9, 2018 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnecreative/1e6fc13d542fea051ebfa45351e86a22 to your computer and use it in GitHub Desktop.
Save bnecreative/1e6fc13d542fea051ebfa45351e86a22 to your computer and use it in GitHub Desktop.
BNE Testimonials - Show Published Date
<?php // Don't copy this line...
/*
* BNE Testimonials Date Display
*
* Hooks into the author template filter, bne_testimonials_author(),
* to include the date template for each review display.
*
* Requires BNE Testimonials v2.6+
*
*/
add_filter( 'bne_testimonials_author', function( $author_meta, $atts ) {
$author_meta .= bne_testimonials_get_template( 'date', $atts );
return $author_meta;
}, 10, 2 );
<?php // Don't copy this line...
/*
* BNE Testimonials Date Format
*
* Format the display date using the PHP date formatting.
* @url http://php.net/manual/en/function.date.php
*
* Requires BNE Testimonials v2.6+
*/
add_filter( 'bne_testimonials_date_format', function() {
return 'M j, Y'; // Ex: Jan 25, 2018
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment