Created
January 7, 2018 13:50
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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