Version Description
- May 18, 2018 =
- Fix bug in average rating half-star.
Download this release
Release Info
| Developer | cdillon27 |
| Plugin | |
| Version | 2.31.2 |
| Comparing to | |
| See all releases | |
Code changes from version 2.31.1 to 2.31.2
- admin/class-strong-testimonials-page-shortcodes.php +177 -126
- admin/css/admin.css +22 -2
- admin/settings/class-strong-testimonials-settings-compat.php +4 -2
- includes/class-strong-testimonials-shortcode-average.php +16 -32
- public/css/rating-display.css +1 -1
- readme.txt +5 -2
- strong-testimonials.php +2 -2
admin/class-strong-testimonials-page-shortcodes.php
CHANGED
|
@@ -18,6 +18,8 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
| 18 |
*/
|
| 19 |
public static function render_page() {
|
| 20 |
|
|
|
|
|
|
|
| 21 |
$tags = array(
|
| 22 |
'a' => array(
|
| 23 |
'href' => array(),
|
|
@@ -42,7 +44,7 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
| 42 |
|
| 43 |
<p><?php printf( __( 'Use %s to display the number of testimonials.', 'strong-testimonials' ), '<code>[testimonial_count]</code>' ); ?></p>
|
| 44 |
|
| 45 |
-
<table class="form-table shortcodes">
|
| 46 |
<tr>
|
| 47 |
<td>
|
| 48 |
<p><?php _e( 'Default', 'strong-testimonials' ); ?></p>
|
|
@@ -75,208 +77,257 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
| 75 |
<?php printf( __( 'If using a <strong>single</strong> rating field, use %s to display the average rating.', 'strong-testimonials' ), '<code>[testimonial_average_rating]</code>' ); ?>
|
| 76 |
</p>
|
| 77 |
|
| 78 |
-
<table class="form-table shortcodes
|
| 79 |
<tr>
|
| 80 |
-
<td
|
| 81 |
<p><?php _e( 'Default', 'strong-testimonials' ); ?></p>
|
| 82 |
<p class="description"><?php _e( 'You must use the closing slash <code>/</code> if using the shortcode with content elsewhere on your page.', 'strong-testimonials' ); ?></p>
|
| 83 |
</td>
|
| 84 |
-
<td class="
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
<
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
</td>
|
| 96 |
</tr>
|
| 97 |
</table>
|
| 98 |
|
| 99 |
-
<table class="form-table shortcodes
|
| 100 |
<tr>
|
| 101 |
-
<td
|
| 102 |
<p><?php _e( 'Customize using content tags.', 'strong-testimonials' ); ?></p>
|
| 103 |
<p><?php _e( 'Default:', 'strong-testimonials' ); ?></p>
|
| 104 |
<p><code>{title}</code><br><code>{stars}</code><br><code>{summary}</code></p>
|
| 105 |
</td>
|
| 106 |
-
<td class="
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
<
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
</td>
|
| 118 |
</tr>
|
| 119 |
</table>
|
| 120 |
|
| 121 |
-
<table class="form-table shortcodes
|
| 122 |
<tr>
|
| 123 |
-
<td
|
| 124 |
<p><?php _e( 'Alternate content tags.', 'strong-testimonials' ); ?></p>
|
| 125 |
<p><code>{title2}</code><br><code>{summary2}</code></p>
|
| 126 |
</td>
|
| 127 |
-
<td class="
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
<
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
</tr>
|
| 140 |
</table>
|
| 141 |
|
| 142 |
-
<table class="form-table shortcodes
|
| 143 |
<tr>
|
| 144 |
-
<td
|
| 145 |
<p><?php _e( 'Insert tags into your custom content.', 'strong-testimonials' ); ?></p>
|
| 146 |
<p class="description"><?php _e( '', 'strong-testimonials' ); ?></p>
|
| 147 |
</td>
|
| 148 |
-
<td class="
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
<
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
|
|
|
|
|
|
| 160 |
</td>
|
| 161 |
</tr>
|
| 162 |
</table>
|
| 163 |
|
| 164 |
-
<table class="form-table shortcodes
|
| 165 |
<tr>
|
| 166 |
-
<td
|
| 167 |
<p><code>{stars}</code></p>
|
| 168 |
</td>
|
| 169 |
-
<td class="
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
<
|
| 175 |
-
|
| 176 |
-
class="
|
| 177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
</td>
|
| 179 |
</tr>
|
| 180 |
</table>
|
| 181 |
|
| 182 |
-
<table class="form-table shortcodes
|
| 183 |
<tr>
|
| 184 |
-
<td
|
| 185 |
<p><code>{average}</code></p>
|
| 186 |
</td>
|
| 187 |
-
<td class="
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
</td>
|
| 193 |
</tr>
|
| 194 |
</table>
|
| 195 |
|
| 196 |
-
<table class="form-table shortcodes
|
| 197 |
<tr>
|
| 198 |
-
<td
|
| 199 |
<p><code>{count}</code></p>
|
| 200 |
</td>
|
| 201 |
-
<td class="
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
</td>
|
| 207 |
</tr>
|
| 208 |
</table>
|
| 209 |
|
| 210 |
-
<table class="form-table shortcodes
|
| 211 |
<tr>
|
| 212 |
-
<td
|
| 213 |
<p><code>block</code></p>
|
| 214 |
</td>
|
| 215 |
-
<td class="
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
<
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
</td>
|
| 226 |
</tr>
|
| 227 |
</table>
|
| 228 |
|
| 229 |
-
<table class="form-table shortcodes
|
| 230 |
<tr>
|
| 231 |
-
<td
|
| 232 |
<p><code>centered</code></p>
|
| 233 |
</td>
|
| 234 |
-
<td class="
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
<
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
</td>
|
| 245 |
</tr>
|
| 246 |
</table>
|
| 247 |
|
| 248 |
-
<table class="form-table shortcodes
|
| 249 |
<tr>
|
| 250 |
-
<td
|
| 251 |
<p><code>block</code> and <code>centered</code></p>
|
| 252 |
</td>
|
| 253 |
-
<td class="
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
<
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 262 |
</td>
|
| 263 |
</tr>
|
| 264 |
</table>
|
| 265 |
|
| 266 |
-
<table class="form-table shortcodes
|
| 267 |
<tr>
|
| 268 |
-
<td
|
| 269 |
<p><?php _e( 'The default container element is <code>div</code>. Select another element using <code>element</code>.', 'strong-testimonials' ); ?></p>
|
| 270 |
</td>
|
| 271 |
-
<td class="
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
</td>
|
| 281 |
</tr>
|
| 282 |
</table>
|
| 18 |
*/
|
| 19 |
public static function render_page() {
|
| 20 |
|
| 21 |
+
$stars = '<span class="strong-rating"><span class="star0 star"></span><span class="star"></span><span class="star"></span><span class="star"></span><span class="star"></span><span class="star current half"></span></span>';
|
| 22 |
+
|
| 23 |
$tags = array(
|
| 24 |
'a' => array(
|
| 25 |
'href' => array(),
|
| 44 |
|
| 45 |
<p><?php printf( __( 'Use %s to display the number of testimonials.', 'strong-testimonials' ), '<code>[testimonial_count]</code>' ); ?></p>
|
| 46 |
|
| 47 |
+
<table class="form-table shortcodes" cellpadding="0" cellspacing="0">
|
| 48 |
<tr>
|
| 49 |
<td>
|
| 50 |
<p><?php _e( 'Default', 'strong-testimonials' ); ?></p>
|
| 77 |
<?php printf( __( 'If using a <strong>single</strong> rating field, use %s to display the average rating.', 'strong-testimonials' ), '<code>[testimonial_average_rating]</code>' ); ?>
|
| 78 |
</p>
|
| 79 |
|
| 80 |
+
<table class="form-table shortcodes average" cellpadding="0" cellspacing="0">
|
| 81 |
<tr>
|
| 82 |
+
<td>
|
| 83 |
<p><?php _e( 'Default', 'strong-testimonials' ); ?></p>
|
| 84 |
<p class="description"><?php _e( 'You must use the closing slash <code>/</code> if using the shortcode with content elsewhere on your page.', 'strong-testimonials' ); ?></p>
|
| 85 |
</td>
|
| 86 |
+
<td class="has-inner">
|
| 87 |
+
<table class="inner" cellpadding="0" cellspacing="0">
|
| 88 |
+
<tr>
|
| 89 |
+
<td class="shortcode">[testimonial_average_rating /]</td>
|
| 90 |
+
</tr>
|
| 91 |
+
<tr>
|
| 92 |
+
<td>
|
| 93 |
+
<div class="strong-rating-wrapper average">
|
| 94 |
+
<span class="strong-rating-title">Average Rating:</span>
|
| 95 |
+
<?php echo $stars; ?>
|
| 96 |
+
<span class="strong-rating-summary">4.3 stars (based on 9 ratings)</span>
|
| 97 |
+
</div>
|
| 98 |
+
</td>
|
| 99 |
+
</tr>
|
| 100 |
+
</table>
|
| 101 |
</td>
|
| 102 |
</tr>
|
| 103 |
</table>
|
| 104 |
|
| 105 |
+
<table class="form-table shortcodes average" cellpadding="0" cellspacing="0">
|
| 106 |
<tr>
|
| 107 |
+
<td>
|
| 108 |
<p><?php _e( 'Customize using content tags.', 'strong-testimonials' ); ?></p>
|
| 109 |
<p><?php _e( 'Default:', 'strong-testimonials' ); ?></p>
|
| 110 |
<p><code>{title}</code><br><code>{stars}</code><br><code>{summary}</code></p>
|
| 111 |
</td>
|
| 112 |
+
<td class="has-inner">
|
| 113 |
+
<table class="inner" cellpadding="0" cellspacing="0">
|
| 114 |
+
<tr>
|
| 115 |
+
<td class="shortcode">[testimonial_average_rating]{title} {stars} {summary}[/testimonial_average_rating]</td>
|
| 116 |
+
</tr>
|
| 117 |
+
<tr>
|
| 118 |
+
<td>
|
| 119 |
+
<div class="strong-rating-wrapper average">
|
| 120 |
+
<span class="strong-rating-title">Average Rating:</span>
|
| 121 |
+
<?php echo $stars; ?>
|
| 122 |
+
<span class="strong-rating-summary">4.3 stars (based on 9 ratings)</span>
|
| 123 |
+
</div>
|
| 124 |
+
</td>
|
| 125 |
+
</tr>
|
| 126 |
+
</table>
|
| 127 |
</td>
|
| 128 |
</tr>
|
| 129 |
</table>
|
| 130 |
|
| 131 |
+
<table class="form-table shortcodes average" cellpadding="0" cellspacing="0">
|
| 132 |
<tr>
|
| 133 |
+
<td>
|
| 134 |
<p><?php _e( 'Alternate content tags.', 'strong-testimonials' ); ?></p>
|
| 135 |
<p><code>{title2}</code><br><code>{summary2}</code></p>
|
| 136 |
</td>
|
| 137 |
+
<td class="has-inner">
|
| 138 |
+
<table class="inner" cellpadding="0" cellspacing="0">
|
| 139 |
+
<tr>
|
| 140 |
+
<td class="shortcode">[testimonial_average_rating]{title2} {stars} {summary2}[/testimonial_average_rating]</td>
|
| 141 |
+
</tr>
|
| 142 |
+
<tr>
|
| 143 |
+
<td>
|
| 144 |
+
<div class="strong-rating-wrapper average">
|
| 145 |
+
<span class="strong-rating-title">Average of 9 Ratings:</span>
|
| 146 |
+
<?php echo $stars; ?>
|
| 147 |
+
<span class="strong-rating-summary">4.3 stars</span>
|
| 148 |
+
</div>
|
| 149 |
+
</td>
|
| 150 |
+
<tr>
|
| 151 |
+
</tr>
|
| 152 |
+
</table>
|
| 153 |
</tr>
|
| 154 |
</table>
|
| 155 |
|
| 156 |
+
<table class="form-table shortcodes average">
|
| 157 |
<tr>
|
| 158 |
+
<td>
|
| 159 |
<p><?php _e( 'Insert tags into your custom content.', 'strong-testimonials' ); ?></p>
|
| 160 |
<p class="description"><?php _e( '', 'strong-testimonials' ); ?></p>
|
| 161 |
</td>
|
| 162 |
+
<td class="has-inner">
|
| 163 |
+
<table class="inner" cellpadding="0" cellspacing="0">
|
| 164 |
+
<tr>
|
| 165 |
+
<td class="shortcode">[testimonial_average_rating]{stars} Our average rating is <b>{summary2}</b>[/testimonial_average_rating]</td>
|
| 166 |
+
</tr>
|
| 167 |
+
<tr>
|
| 168 |
+
<td>
|
| 169 |
+
<div class="strong-rating-wrapper average">
|
| 170 |
+
<?php echo $stars; ?>
|
| 171 |
+
Our average rating is <b><span class="strong-rating-summary">4.3 stars</span></b>
|
| 172 |
+
</div>
|
| 173 |
+
</td>
|
| 174 |
+
</tr>
|
| 175 |
+
</table>
|
| 176 |
</td>
|
| 177 |
</tr>
|
| 178 |
</table>
|
| 179 |
|
| 180 |
+
<table class="form-table shortcodes average">
|
| 181 |
<tr>
|
| 182 |
+
<td>
|
| 183 |
<p><code>{stars}</code></p>
|
| 184 |
</td>
|
| 185 |
+
<td class="has-inner">
|
| 186 |
+
<table class="inner" cellpadding="0" cellspacing="0">
|
| 187 |
+
<tr>
|
| 188 |
+
<td class="shortcode">[testimonial_average_rating]{stars}[/testimonial_average_rating]</td>
|
| 189 |
+
</tr>
|
| 190 |
+
<tr>
|
| 191 |
+
<td>
|
| 192 |
+
<div class="strong-rating-wrapper average">
|
| 193 |
+
<?php echo $stars; ?>
|
| 194 |
+
</div>
|
| 195 |
+
</td>
|
| 196 |
+
</tr>
|
| 197 |
+
</table>
|
| 198 |
</td>
|
| 199 |
</tr>
|
| 200 |
</table>
|
| 201 |
|
| 202 |
+
<table class="form-table shortcodes average">
|
| 203 |
<tr>
|
| 204 |
+
<td>
|
| 205 |
<p><code>{average}</code></p>
|
| 206 |
</td>
|
| 207 |
+
<td class="has-inner">
|
| 208 |
+
<table class="inner" cellpadding="0" cellspacing="0">
|
| 209 |
+
<tr>
|
| 210 |
+
<td class="shortcode">[testimonial_average_rating]{average}[/testimonial_average_rating]</td>
|
| 211 |
+
</tr>
|
| 212 |
+
<tr>
|
| 213 |
+
<td>
|
| 214 |
+
<div class="strong-rating-wrapper average"><span class="strong-rating-average">4.3</span></div>
|
| 215 |
+
</td>
|
| 216 |
+
</tr>
|
| 217 |
+
</table>
|
| 218 |
</td>
|
| 219 |
</tr>
|
| 220 |
</table>
|
| 221 |
|
| 222 |
+
<table class="form-table shortcodes average">
|
| 223 |
<tr>
|
| 224 |
+
<td>
|
| 225 |
<p><code>{count}</code></p>
|
| 226 |
</td>
|
| 227 |
+
<td class="has-inner">
|
| 228 |
+
<table class="inner" cellpadding="0" cellspacing="0">
|
| 229 |
+
<tr>
|
| 230 |
+
<td class="shortcode">[testimonial_average_rating]{count}[/testimonial_average_rating]</td>
|
| 231 |
+
</tr>
|
| 232 |
+
<tr>
|
| 233 |
+
<td>
|
| 234 |
+
<div class="strong-rating-wrapper average"><span class="strong-rating-count">9</span></div>
|
| 235 |
+
</td>
|
| 236 |
+
</tr>
|
| 237 |
+
</table>
|
| 238 |
</td>
|
| 239 |
</tr>
|
| 240 |
</table>
|
| 241 |
|
| 242 |
+
<table class="form-table shortcodes average">
|
| 243 |
<tr>
|
| 244 |
+
<td>
|
| 245 |
<p><code>block</code></p>
|
| 246 |
</td>
|
| 247 |
+
<td class="has-inner">
|
| 248 |
+
<table class="inner" cellpadding="0" cellspacing="0">
|
| 249 |
+
<tr>
|
| 250 |
+
<td class="shortcode">[testimonial_average_rating block /]</td>
|
| 251 |
+
</tr>
|
| 252 |
+
<tr>
|
| 253 |
+
<td>
|
| 254 |
+
<div class="strong-rating-wrapper average block"><span class="strong-rating-title">Average Rating:</span>
|
| 255 |
+
<?php echo $stars; ?>
|
| 256 |
+
<span class="strong-rating-summary">4.3 stars (based on 9 ratings)</span>
|
| 257 |
+
</div>
|
| 258 |
+
</td>
|
| 259 |
+
</tr>
|
| 260 |
+
</table>
|
| 261 |
</td>
|
| 262 |
</tr>
|
| 263 |
</table>
|
| 264 |
|
| 265 |
+
<table class="form-table shortcodes average">
|
| 266 |
<tr>
|
| 267 |
+
<td>
|
| 268 |
<p><code>centered</code></p>
|
| 269 |
</td>
|
| 270 |
+
<td class="has-inner">
|
| 271 |
+
<table class="inner" cellpadding="0" cellspacing="0">
|
| 272 |
+
<tr>
|
| 273 |
+
<td class="shortcode">[testimonial_average_rating centered /]</td>
|
| 274 |
+
</tr>
|
| 275 |
+
<tr>
|
| 276 |
+
<td>
|
| 277 |
+
<div class="strong-rating-wrapper average centered"><span class="strong-rating-title">Average Rating:</span>
|
| 278 |
+
<?php echo $stars; ?>
|
| 279 |
+
<span class="strong-rating-summary">4.3 stars (based on 9 ratings)</span>
|
| 280 |
+
</div>
|
| 281 |
+
</td>
|
| 282 |
+
</tr>
|
| 283 |
+
</table>
|
| 284 |
</td>
|
| 285 |
</tr>
|
| 286 |
</table>
|
| 287 |
|
| 288 |
+
<table class="form-table shortcodes average">
|
| 289 |
<tr>
|
| 290 |
+
<td>
|
| 291 |
<p><code>block</code> and <code>centered</code></p>
|
| 292 |
</td>
|
| 293 |
+
<td class="has-inner">
|
| 294 |
+
<table class="inner" cellpadding="0" cellspacing="0">
|
| 295 |
+
<tr>
|
| 296 |
+
<td class="shortcode">[testimonial_average_rating block centered /]</td>
|
| 297 |
+
</tr>
|
| 298 |
+
<tr>
|
| 299 |
+
<td>
|
| 300 |
+
<div class="strong-rating-wrapper average block centered"><span class="strong-rating-title">Average Rating:</span>
|
| 301 |
+
<?php echo $stars; ?>
|
| 302 |
+
<span class="strong-rating-summary">4.3 stars (based on 9 ratings)</span>
|
| 303 |
+
</div>
|
| 304 |
+
</td>
|
| 305 |
+
</tr>
|
| 306 |
+
</table>
|
| 307 |
</td>
|
| 308 |
</tr>
|
| 309 |
</table>
|
| 310 |
|
| 311 |
+
<table class="form-table shortcodes average">
|
| 312 |
<tr>
|
| 313 |
+
<td>
|
| 314 |
<p><?php _e( 'The default container element is <code>div</code>. Select another element using <code>element</code>.', 'strong-testimonials' ); ?></p>
|
| 315 |
</td>
|
| 316 |
+
<td class="has-inner">
|
| 317 |
+
<table class="inner" cellpadding="0" cellspacing="0">
|
| 318 |
+
<tr>
|
| 319 |
+
<td class="shortcode">[testimonial_average_rating element="span" /]</td>
|
| 320 |
+
</tr>
|
| 321 |
+
<tr>
|
| 322 |
+
<td>
|
| 323 |
+
<span class="strong-rating-wrapper average">
|
| 324 |
+
<span class="strong-rating-title">Average Rating:</span>
|
| 325 |
+
<?php echo $stars; ?>
|
| 326 |
+
<span class="strong-rating-summary">4.3 stars (based on 9 ratings)</span>
|
| 327 |
+
</span>
|
| 328 |
+
</td>
|
| 329 |
+
</tr>
|
| 330 |
+
</table>
|
| 331 |
</td>
|
| 332 |
</tr>
|
| 333 |
</table>
|
admin/css/admin.css
CHANGED
|
@@ -780,6 +780,9 @@ ul.standard {
|
|
| 780 |
}
|
| 781 |
|
| 782 |
/* shortcodes page */
|
|
|
|
|
|
|
|
|
|
| 783 |
.wpmtst.shortcodes.has-stars table {
|
| 784 |
margin-bottom: 1em;
|
| 785 |
}
|
|
@@ -793,7 +796,24 @@ ul.standard {
|
|
| 793 |
.wpmtst.shortcodes tr.important td {
|
| 794 |
border: 1px solid #DDD;
|
| 795 |
}
|
| 796 |
-
.wpmtst.shortcodes tr:hover
|
| 797 |
-
.wpmtst.shortcodes tr:hover + tr {
|
| 798 |
background: #FFF;
|
| 799 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 780 |
}
|
| 781 |
|
| 782 |
/* shortcodes page */
|
| 783 |
+
.wpmtst.shortcode {
|
| 784 |
+
vertical-align: middle;
|
| 785 |
+
}
|
| 786 |
.wpmtst.shortcodes.has-stars table {
|
| 787 |
margin-bottom: 1em;
|
| 788 |
}
|
| 796 |
.wpmtst.shortcodes tr.important td {
|
| 797 |
border: 1px solid #DDD;
|
| 798 |
}
|
| 799 |
+
.wpmtst.shortcodes tr:hover {
|
|
|
|
| 800 |
background: #FFF;
|
| 801 |
}
|
| 802 |
+
|
| 803 |
+
/* inner table */
|
| 804 |
+
.wpmtst.shortcodes td.has-inner {
|
| 805 |
+
padding: 0;
|
| 806 |
+
}
|
| 807 |
+
.wpmtst.shortcodes table.inner {
|
| 808 |
+
margin: 0;
|
| 809 |
+
vertical-align: middle;
|
| 810 |
+
width: 100%;
|
| 811 |
+
}
|
| 812 |
+
.wpmtst.shortcodes table.inner,
|
| 813 |
+
.wpmtst.shortcodes table.inner tr,
|
| 814 |
+
.wpmtst.shortcodes table.inner td {
|
| 815 |
+
border: 0;
|
| 816 |
+
}
|
| 817 |
+
.wpmtst.shortcodes table.inner tr:first-child td {
|
| 818 |
+
border-bottom: 1px solid #DDD;
|
| 819 |
+
}
|
admin/settings/class-strong-testimonials-settings-compat.php
CHANGED
|
@@ -208,6 +208,9 @@ class Strong_Testimonials_Settings_Compat {
|
|
| 208 |
</table>
|
| 209 |
|
| 210 |
<h2><?php _e( 'Compatibility Settings', 'strong-testimonials' ); ?></h2>
|
|
|
|
|
|
|
|
|
|
| 211 |
<?php
|
| 212 |
}
|
| 213 |
|
|
@@ -823,8 +826,7 @@ class Strong_Testimonials_Settings_Compat {
|
|
| 823 |
</div>
|
| 824 |
<div data-sub="lazyload">
|
| 825 |
<p class="about"><?php _e( 'Most lazy loading techniques use one or two CSS class names to indicate which images to lazy load and when the lazy loading is finished.', 'strong-testimonials' ); ?></p>
|
| 826 |
-
<p class="about"><?php _e( 'Contact support for your theme or plugin to
|
| 827 |
-
<p class="about"><?php printf( __( 'Or <a href="%s" target="_blank">open a support ticket here</a> and provide your system information.', 'strong-testimonials' ), esc_url( 'https://support.strongplugins.com/new-ticket/' ) ); ?></p>
|
| 828 |
</div>
|
| 829 |
</div>
|
| 830 |
<?php
|
| 208 |
</table>
|
| 209 |
|
| 210 |
<h2><?php _e( 'Compatibility Settings', 'strong-testimonials' ); ?></h2>
|
| 211 |
+
|
| 212 |
+
<p class="about"><?php printf( __( '<a href="%s" target="_blank">Start a support ticket</a> if you need help with these options.', 'strong-testimonials' ), esc_url( 'https://support.strongplugins.com/new-ticket/' ) ); ?></p>
|
| 213 |
+
|
| 214 |
<?php
|
| 215 |
}
|
| 216 |
|
| 826 |
</div>
|
| 827 |
<div data-sub="lazyload">
|
| 828 |
<p class="about"><?php _e( 'Most lazy loading techniques use one or two CSS class names to indicate which images to lazy load and when the lazy loading is finished.', 'strong-testimonials' ); ?></p>
|
| 829 |
+
<p class="about"><?php _e( 'Contact support for your theme or plugin to ask if it uses CSS class names.', 'strong-testimonials' ); ?></p>
|
|
|
|
| 830 |
</div>
|
| 831 |
</div>
|
| 832 |
<?php
|
includes/class-strong-testimonials-shortcode-average.php
CHANGED
|
@@ -93,29 +93,13 @@ class Strong_Testimonials_Average_Shortcode {
|
|
| 93 |
|
| 94 |
// category
|
| 95 |
if ( $atts['category'] ) {
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
'terms' => $args['category'],
|
| 104 |
-
),
|
| 105 |
-
);
|
| 106 |
-
|
| 107 |
-
} else {
|
| 108 |
-
|
| 109 |
-
$args['tax_query'] = array(
|
| 110 |
-
array(
|
| 111 |
-
'taxonomy' => 'wpm-testimonial-category',
|
| 112 |
-
'field' => 'slug',
|
| 113 |
-
'terms' => $args['category'],
|
| 114 |
-
),
|
| 115 |
-
);
|
| 116 |
-
|
| 117 |
-
}
|
| 118 |
-
|
| 119 |
}
|
| 120 |
|
| 121 |
$args = apply_filters( 'wpmtst_query_args', $args, $atts );
|
|
@@ -300,8 +284,8 @@ class Strong_Testimonials_Average_Shortcode {
|
|
| 300 |
/**
|
| 301 |
* Print the stars.
|
| 302 |
*
|
| 303 |
-
* @param double $rating
|
| 304 |
-
* @param string $class
|
| 305 |
* @since 2.31.0
|
| 306 |
* @return string
|
| 307 |
*/
|
|
@@ -317,14 +301,14 @@ class Strong_Testimonials_Average_Shortcode {
|
|
| 317 |
echo str_repeat( '<span class="star"></span>', 5 );
|
| 318 |
} else {
|
| 319 |
for ( $i = 1; $i <= 5; $i++ ) {
|
| 320 |
-
$star_class = '';
|
| 321 |
-
if (
|
| 322 |
-
$star_class
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
}
|
| 327 |
-
|
| 328 |
}
|
| 329 |
}
|
| 330 |
?>
|
| 93 |
|
| 94 |
// category
|
| 95 |
if ( $atts['category'] ) {
|
| 96 |
+
$args['tax_query'] = array(
|
| 97 |
+
array(
|
| 98 |
+
'taxonomy' => 'wpm-testimonial-category',
|
| 99 |
+
'field' => is_numeric( $atts['category'] ) ? 'id' : 'slug',
|
| 100 |
+
'terms' => $atts['category'],
|
| 101 |
+
),
|
| 102 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
}
|
| 104 |
|
| 105 |
$args = apply_filters( 'wpmtst_query_args', $args, $atts );
|
| 284 |
/**
|
| 285 |
* Print the stars.
|
| 286 |
*
|
| 287 |
+
* @param double $rating Rounded to half.
|
| 288 |
+
* @param string $class The container CSS class.
|
| 289 |
* @since 2.31.0
|
| 290 |
* @return string
|
| 291 |
*/
|
| 301 |
echo str_repeat( '<span class="star"></span>', 5 );
|
| 302 |
} else {
|
| 303 |
for ( $i = 1; $i <= 5; $i++ ) {
|
| 304 |
+
$star_class = 'star';
|
| 305 |
+
if ( $i == round( $rating ) ) {
|
| 306 |
+
$star_class .= ' current';
|
| 307 |
+
}
|
| 308 |
+
if ( 0.5 == $i - $rating ) {
|
| 309 |
+
$star_class .= ' half';
|
| 310 |
}
|
| 311 |
+
printf( '<span class="%s"></span>', $star_class );
|
| 312 |
}
|
| 313 |
}
|
| 314 |
?>
|
public/css/rating-display.css
CHANGED
|
@@ -125,7 +125,7 @@
|
|
| 125 |
}
|
| 126 |
|
| 127 |
/* which may be a half star */
|
| 128 |
-
.strong-rating-wrapper.average span.
|
| 129 |
content: "\f123";
|
| 130 |
}
|
| 131 |
|
| 125 |
}
|
| 126 |
|
| 127 |
/* which may be a half star */
|
| 128 |
+
.strong-rating-wrapper.average .strong-rating span.star.half:before {
|
| 129 |
content: "\f123";
|
| 130 |
}
|
| 131 |
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: cdillon27
|
| 3 |
Tags: testimonials, testimonial slider, testimonial form, reviews, star ratings
|
| 4 |
Requires at least: 3.7
|
| 5 |
-
Tested up to: 4.9.
|
| 6 |
-
Stable tag: 2.31.
|
| 7 |
License: GPLv2 or later
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 9 |
|
|
@@ -197,6 +197,9 @@ If you prefer, start a private support ticket at [support.strongplugins.com](htt
|
|
| 197 |
|
| 198 |
== Changelog ==
|
| 199 |
|
|
|
|
|
|
|
|
|
|
| 200 |
= 2.31.1 - May 15, 2018 =
|
| 201 |
* Fix conflict with Review Markup add-on.
|
| 202 |
|
| 2 |
Contributors: cdillon27
|
| 3 |
Tags: testimonials, testimonial slider, testimonial form, reviews, star ratings
|
| 4 |
Requires at least: 3.7
|
| 5 |
+
Tested up to: 4.9.6
|
| 6 |
+
Stable tag: 2.31.2
|
| 7 |
License: GPLv2 or later
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 9 |
|
| 197 |
|
| 198 |
== Changelog ==
|
| 199 |
|
| 200 |
+
= 2.31.2 - May 18, 2018 =
|
| 201 |
+
* Fix bug in average rating half-star.
|
| 202 |
+
|
| 203 |
= 2.31.1 - May 15, 2018 =
|
| 204 |
* Fix conflict with Review Markup add-on.
|
| 205 |
|
strong-testimonials.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
* Plugin URI: https://strongplugins.com/plugins/strong-testimonials/
|
| 5 |
* Description: Collect and display your testimonials or reviews.
|
| 6 |
* Author: Chris Dillon
|
| 7 |
-
* Version: 2.31.
|
| 8 |
*
|
| 9 |
* Author URI: https://strongplugins.com/
|
| 10 |
* Text Domain: strong-testimonials
|
|
@@ -34,7 +34,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
| 34 |
exit;
|
| 35 |
}
|
| 36 |
|
| 37 |
-
define( 'WPMTST_VERSION', '2.31.
|
| 38 |
define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
|
| 39 |
define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
|
| 40 |
define( 'STRONGPLUGINS_STORE_URL', 'https://strongplugins.com' );
|
| 4 |
* Plugin URI: https://strongplugins.com/plugins/strong-testimonials/
|
| 5 |
* Description: Collect and display your testimonials or reviews.
|
| 6 |
* Author: Chris Dillon
|
| 7 |
+
* Version: 2.31.2
|
| 8 |
*
|
| 9 |
* Author URI: https://strongplugins.com/
|
| 10 |
* Text Domain: strong-testimonials
|
| 34 |
exit;
|
| 35 |
}
|
| 36 |
|
| 37 |
+
define( 'WPMTST_VERSION', '2.31.2' );
|
| 38 |
define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
|
| 39 |
define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
|
| 40 |
define( 'STRONGPLUGINS_STORE_URL', 'https://strongplugins.com' );
|
