Fontawesome Issue
-
Great plugin, thank you. I have a problem with Fontawwesome clashing on my theme, but I rewrote your star output function to solve it:
public function rating_stars( $rating ) { $int_part_of_rating = floor( $rating ); $dec_part_of_rating = $rating - $int_part_of_rating; $output = ''; if ( ! empty( $int_part_of_rating ) OR ! empty( $dec_part_of_rating ) ) { $output = '<span class="rating-stars-arbor">'; for ( $count = 1; $count <= $int_part_of_rating; $count ++ ) { $output .= "<i class='fas fa-star'></i>"; } if ( $dec_part_of_rating > 0 ) { $output .= "<i class='fas fa-star-half-alt'></i>"; } $unrated = floor ( 5 - $rating ); for ( $count = 1; $count <= $unrated; $count ++ ) { $output .= "<i class='far fa-star'></i>"; } $output .= '</span>'; } return $output; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Fontawesome Issue’ is closed to new replies.