Skip to content

Instantly share code, notes, and snippets.

@danielpowney
Last active November 2, 2015 10:52
Show Gist options
  • Save danielpowney/209fa045413a2bfba6f2 to your computer and use it in GitHub Desktop.
Save danielpowney/209fa045413a2bfba6f2 to your computer and use it in GitHub Desktop.
Modify count of entries e.g. "(5 ratings)" instead of "(5)"
<?php
/**
* after count e.g. " ratings)"
* @param string $after_count
*/
function mrp_rating_result_after_count( $after_count ) {
return __( ' ratings)' );
}
add_filter( 'mrp_rating_result_after_count', 'mrp_rating_result_after_count' );
/**
* before count e.g. "("
* @param string $after_count
*/
function mrp_rating_result_before_count( $before_count ) {
// default is "("
return $before_count;
}
add_filter( 'mrp_rating_result_before_count', 'mrp_rating_result_before_count' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment