wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Filters
  5. wpdiscuz_half_star_svg
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors


This filter can be used for changing the half star SVG.

IMPORTANT: the wpd-star and wpd-active classes should be existed on the paths to allow the icons to be colored.


Since 7.0.0 version


1. $svg (type: string) – the SVG of the half star
2. $type (type: string) – is it the post rating or custum field
3. $icon (type: string) – the icon that is used for the rating field. The fas fa-star is used for post rating.


add_filter('wpdiscuz_half_star_svg', function ($svg, $type, $icon) {
    if ($type === "post") {
        $svg = '';
    return $svg;
}, 10, 3);

Was this article helpful to you? Yes No