WPChill / strong-testimonials

A WordPress plugin for client testimonials.
GNU General Public License v3.0
21 stars 11 forks source link

Make rating stars svg a global_variable #365

Closed TeoAlex closed 1 year ago

TeoAlex commented 1 year ago

Maybe make the rating stars SVGs values into global variables. Improves code readability and makes the stars SVG code easyer to change.

razvanaldea89 commented 1 year ago

@TeoAlex please propose a solution before starting this issue.

TeoAlex commented 1 year ago

My initial thought was to add the stars in a global variable and use that wherever needed. define( 'WPMTST_STAR_SOLID', '<svg class="star_solid" aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" vie....' )

Other solution proposed by @razvanaldea89 is to add a static method to Strong_Testimonials_Helper class to retreive the stars.

giucu91 commented 1 year ago

@razvanaldea89 solution