Skip to content

Instantly share code, notes, and snippets.

@subharanjanm
Created January 7, 2018 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save subharanjanm/ca3b525ce56ff582859ad04be1b308ad to your computer and use it in GitHub Desktop.
Save subharanjanm/ca3b525ce56ff582859ad04be1b308ad to your computer and use it in GitHub Desktop.
Changing the star image path to something you'd like to use - Testimonials Widget Premium
<?php
/**
* Changing the star image path to something you'd like to use.
*/
function axl_replace_raty_icons( $scripts, $testimonials, $atts, $widget_number ) {
if ( ! empty( $scripts ) ) {
$find = "path: '//localhost/twp/wp-content/plugins/testimonials-widget-premium/assets/images/'";
$replace = "path: '//localhost/twp/wp-content/uploads/raty-icons/'";
foreach ( $scripts as $key => $script ) {
$scripts[ $key ] = str_replace( $find, $replace, $scripts[ $key ] );
}
}
return $scripts;
}
add_filter( 'tw_testimonials_js', 'axl_replace_raty_icons', 99, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment