Last active
November 2, 2015 10:52
-
-
Save danielpowney/209fa045413a2bfba6f2 to your computer and use it in GitHub Desktop.
Modify count of entries e.g. "(5 ratings)" instead of "(5)"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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