gdrts_render_custom_star_badge

gdrts_render_custom_star_badge($atts = array())

Description

Render star block with the rating value on top of the star element, in form of rating badge.

Parameters

  • $aatts: array with display settings

$atts array

  • rating: rating that needs to be displayed, default: 0.
  • style_type: render style: font, fontawesome or image, default: font.
  • style_name: name of the style element, default: star.
  • style_size: size in pixels for individual star elements
  • style_class: additional CSS class to add to the block.
  • style_color: color for empty stars to use with font style.
  • title: custom text to add to the wrapper DIV title attribute.
  • font_size: size of the rating text value, in pixels.
  • font_color: color for the rating text value.

Examples

Display rating 4.2 rating badge:

<?php echo gdrts_render_custom_star_badge(
        array('rating' => 4.2, 
        'style_size' => 255, 'font_size' => 80)); ?>
Rating Badge Example
Rating Badge Example
0
0
158
Rate this reference

You are not allowed to rate this post.

Comments

Leave a Reply