Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TeocomiRatingFieldPlugin {
- function TeocomiRatingFieldPlugin() {
- // some stuff ...
- add_action('comment_text', array(&$this, 'DisplayRating'));
- // some stuff ...
- }
- function DisplayAverageRating() {
- // some stuff ...
- echo ( '...');
- }
- function DisplayRating($comment) {
- // some stuff ...
- return $comment;
- }
- }
- function teocomi_rating_start() {
- $crfp = new TeocomiRatingFieldPlugin();
- }
- add_action( 'plugins_loaded', 'teocomi_rating_start' );
- function display_avg_rating() {
- $trfp = new TeocomiRatingFieldPlugin();
- $trfp->DisplayAverageRating();
- }
Advertisement
Add Comment
Please, Sign In to add comment