wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Filters
  5. wpdiscuz_full_star_svg
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

wpdiscuz_full_star_svg

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

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

Changelog

Since 7.0.0 version

Parameters

1. $svg (type: string) – the SVG of the full 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.

Usage

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

Was this article helpful to you? Yes No