Generates an error
-
Hi there,
I have tested your plugin and this notice pops out:
Notice: Undefined offset: 0 in …/wp-content/plugins/fs-testimonials/fs-testimonial.php on line 163Also the plugin renders only 3 testimonials even if there are more.
I have replaced the code from line 159 to 169 with this and it fixes both issues:
<?php
foreach ( $testimonials as $r ) {
echo ‘<div>’ . $this->testimonial_html( $r ) . ‘</div>’;
}
?>Also the plugin uses FontAwesome for the stars but if the website doesn’t use that font no stars will appear.
I have fixed that using the HTML entity ★(& #9733;) instead and used a simple div for that:<div class=”rate”>
<?php
for ( $i = 1; $i < $r->rate + 1; $i += 20 ) {
echo ‘& #9733;’; //remove the extra space after &. Added to display the code correctly in this comment!
}
?>
</div>Thanks
The topic ‘Generates an error’ is closed to new replies.