Passed
Push — hotfix/fix-counts ( 4b43d1...cc9e05 )
by Paul
03:52
created
views/partials/editor/tinymce.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <div class="glsr-mce">
4 4
     <button class="button glsr-mce-button">
5 5
         <span class="wp-media-buttons-icon"></span>
6 6
     </button>
7 7
     <div class="mce-menu glsr-mce-menu">
8
-    <?php foreach ($shortcodes as $key => $values) : ?>
8
+    <?php foreach( $shortcodes as $key => $values ) : ?>
9 9
         <div class="mce-menu-item glsr-mce-menu-item" data-shortcode="<?= $key; ?>"><?= $values['label']; ?></div>
10 10
     <?php endforeach; ?>
11 11
     </div>
Please login to merge, or discard this patch.
views/partials/editor/bulk-edit-assigned-to.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <fieldset class="inline-edit-col-right">
4 4
     <div class="inline-edit-col">
5 5
         <div class="inline-edit-group wp-clearfix">
6 6
             <label class="alignleft">
7
-                <span class="title"><?= __('Assigned To', 'site-reviews'); ?></span>
7
+                <span class="title"><?= __( 'Assigned To', 'site-reviews' ); ?></span>
8 8
                 <span class="input-text-wrap">
9 9
                     <input type="number" name="assigned_to" class="inline-edit-menu-order-input">
10 10
                 </span>
Please login to merge, or discard this patch.
views/partials/editor/notice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 {{ notices }}
Please login to merge, or discard this patch.
views/partials/editor/metabox-assigned-to.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <div class="glsr-search-box" id="glsr-search-posts">
4 4
     <span class="glsr-spinner"><span class="spinner"></span></span>
5 5
     <input type="hidden" id="assigned_to" name="assigned_to" value="<?= $id; ?>">
6
-    <input type="search" class="glsr-search-input" autocomplete="off" placeholder="<?= __('Type to search...', 'site-reviews'); ?>">
7
-    <?php wp_nonce_field('search-posts', '_search_nonce', false); ?>
6
+    <input type="search" class="glsr-search-input" autocomplete="off" placeholder="<?= __( 'Type to search...', 'site-reviews' ); ?>">
7
+    <?php wp_nonce_field( 'search-posts', '_search_nonce', false ); ?>
8 8
     <span class="glsr-search-results"></span>
9
-    <p><?= __('Search here for a page or post that you would like to assign this review to. You may search by title or ID.', 'site-reviews'); ?></p>
9
+    <p><?= __( 'Search here for a page or post that you would like to assign this review to. You may search by title or ID.', 'site-reviews' ); ?></p>
10 10
     <span class="description"><?= $template; ?></span>
11 11
 </div>
12 12
 
13 13
 <script type="text/html" id="tmpl-glsr-assigned-post">
14
-<?php include glsr()->path('views/partials/editor/assigned-post.php'); ?>
14
+<?php include glsr()->path( 'views/partials/editor/assigned-post.php' ); ?>
15 15
 </script>
Please login to merge, or discard this patch.
views/partials/addons/addon.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <div class="glsr-addon-wrap">
4 4
     <div class="glsr-addon">
@@ -10,19 +10,19 @@  discard block
 block discarded – undo
10 10
             <p>{{ description }}</p>
11 11
         </div>
12 12
         <div class="glsr-addon-footer">
13
-        <?php if (!is_wp_error(validate_plugin($plugin))) : ?>
14
-            <?php if (is_plugin_active($plugin)) : ?>
13
+        <?php if( !is_wp_error( validate_plugin( $plugin ) ) ) : ?>
14
+            <?php if( is_plugin_active( $plugin ) ) : ?>
15 15
             <span class="glsr-addon-link button button-secondary" disabled>
16
-                <?= __('Installed', 'site-reviews'); ?>
16
+                <?= __( 'Installed', 'site-reviews' ); ?>
17 17
             </span>
18 18
             <?php else: ?>
19
-            <a href="<?= wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin='.$plugin), 'activate-plugin_'.$plugin); ?>" class="glsr-addon-link button button-secondary">
20
-                <?= __('Activate', 'site-reviews'); ?>
19
+            <a href="<?= wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin='.$plugin ), 'activate-plugin_'.$plugin ); ?>" class="glsr-addon-link button button-secondary">
20
+                <?= __( 'Activate', 'site-reviews' ); ?>
21 21
             </a>
22 22
             <?php endif; ?>
23 23
         <?php else: ?>
24 24
             <a href="{{ link }}" class="glsr-addon-link glsr-external button button-secondary">
25
-                <?= __('More Info', 'site-reviews'); ?>
25
+                <?= __( 'More Info', 'site-reviews' ); ?>
26 26
             </a>
27 27
         <?php endif; ?>
28 28
         </div>
Please login to merge, or discard this patch.
views/pages/documentation/functions.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <div id="functions-01" class="glsr-card postbox">
4 4
     <div class="glsr-card-header">
5 5
         <h3>Read me first!</h3>
6 6
         <button type="button" class="handlediv" aria-expanded="true">
7
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
7
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
8 8
             <span class="toggle-indicator" aria-hidden="true"></span>
9 9
         </button>
10 10
     </div>
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     <div class="glsr-card-header">
39 39
         <h3>Helper function to create a review</h3>
40 40
         <button type="button" class="handlediv" aria-expanded="true">
41
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
41
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
42 42
             <span class="toggle-indicator" aria-hidden="true"></span>
43 43
         </button>
44 44
     </div>
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 ]);
86 86
 </code></pre>
87 87
         <p><strong>Helpful Tip:</strong></p>
88
-        <p>You can use the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=documentation#!functions'); ?>" data-expand="#functions-03">glsr_debug</a></code> helper function to view the review object that is returned.</p>
88
+        <p>You can use the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=documentation#!functions' ); ?>" data-expand="#functions-03">glsr_debug</a></code> helper function to view the review object that is returned.</p>
89 89
         <pre><code class="php">glsr_debug($review);</code></pre>
90 90
     </div>
91 91
 </div>
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     <div class="glsr-card-header">
95 95
         <h3>Helper function to debug variables</h3>
96 96
         <button type="button" class="handlediv" aria-expanded="true">
97
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
97
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
98 98
             <span class="toggle-indicator" aria-hidden="true"></span>
99 99
         </button>
100 100
     </div>
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     <div class="glsr-card-header">
120 120
         <h3>Helper function to get a plugin setting</h3>
121 121
         <button type="button" class="handlediv" aria-expanded="true">
122
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
122
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
123 123
             <span class="toggle-indicator" aria-hidden="true"></span>
124 124
         </button>
125 125
     </div>
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
 $requireApproval = apply_filters('glsr_get_option', 'no', 'general.require.approval', 'no');</code></pre>
141 141
         <p><strong>Helpful Tip:</strong></p>
142
-        <p>You can use the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=documentation#!functions'); ?>" data-expand="#functions-03">glsr_debug</a></code> helper function to view the whole plugin settings array, this will help you figure out which dot-notation path to use.</p>
142
+        <p>You can use the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=documentation#!functions' ); ?>" data-expand="#functions-03">glsr_debug</a></code> helper function to view the whole plugin settings array, this will help you figure out which dot-notation path to use.</p>
143 143
         <pre><code class="php">glsr_debug(glsr_get_options());</code></pre>
144 144
     </div>
145 145
 </div>
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     <div class="glsr-card-header">
149 149
         <h3>Helper function to get all plugin settings</h3>
150 150
         <button type="button" class="handlediv" aria-expanded="true">
151
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
151
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
152 152
             <span class="toggle-indicator" aria-hidden="true"></span>
153 153
         </button>
154 154
     </div>
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
 $pluginSettings = apply_filters('glsr_get_options', []);</code></pre>
167 167
         <p><strong>Helpful Tip:</strong></p>
168
-        <p>You can use the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=documentation#!functions'); ?>" data-expand="#functions-03">glsr_debug</a></code> helper function to print the settings array to the screen:</p>
168
+        <p>You can use the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=documentation#!functions' ); ?>" data-expand="#functions-03">glsr_debug</a></code> helper function to print the settings array to the screen:</p>
169 169
         <pre><code class="php">glsr_debug($pluginSettings);</code></pre>
170 170
     </div>
171 171
 </div>
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     <div class="glsr-card-header">
175 175
         <h3>Helper function to get a single review</h3>
176 176
         <button type="button" class="handlediv" aria-expanded="true">
177
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
177
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
178 178
             <span class="toggle-indicator" aria-hidden="true"></span>
179 179
         </button>
180 180
     </div>
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
                 <pre><code class="php">echo $reviewHtml; // This is identical to: $review->render();</code></pre>
216 216
             </li>
217 217
             <li>
218
-                <p>You can also use the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=documentation#!functions'); ?>" data-expand="#functions-03">glsr_debug</a></code> helper function to print both arrayable objects to the screen:</p>
218
+                <p>You can also use the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=documentation#!functions' ); ?>" data-expand="#functions-03">glsr_debug</a></code> helper function to print both arrayable objects to the screen:</p>
219 219
                 <pre><code class="php">glsr_debug($review, $reviewHtml);</code></pre>
220 220
             </li>
221 221
         </ol>
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     <div class="glsr-card-header">
227 227
         <h3>Helper function to get multiple reviews</h3>
228 228
         <button type="button" class="handlediv" aria-expanded="true">
229
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
229
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
230 230
             <span class="toggle-indicator" aria-hidden="true"></span>
231 231
         </button>
232 232
     </div>
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                 <pre><code class="php">echo $reviews; // This is identical to: $reviews->render();</code></pre>
271 271
             </li>
272 272
             <li>
273
-                <p>Loop through all reviews and handle each review as needed. Each <code>$review</code> is identical to what the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=documentation#!functions'); ?>" data-expand="#functions-06">glsr_get_review</a></code> helper function returns, so make sure to read the "Helpful Tips" from that section above for more information.</p>
273
+                <p>Loop through all reviews and handle each review as needed. Each <code>$review</code> is identical to what the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=documentation#!functions' ); ?>" data-expand="#functions-06">glsr_get_review</a></code> helper function returns, so make sure to read the "Helpful Tips" from that section above for more information.</p>
274 274
                 <pre><code class="php">foreach ($reviews as $review) {
275 275
     echo $review;
276 276
 };</code></pre>
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 echo $reviewsHtml->navigation;</code></pre>
289 289
             </li>
290 290
             <li>
291
-                <p>You can also use the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=documentation#!functions'); ?>" data-expand="#functions-03">glsr_debug</a></code> helper function to print both arrayable objects to the screen:</p>
291
+                <p>You can also use the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=documentation#!functions' ); ?>" data-expand="#functions-03">glsr_debug</a></code> helper function to print both arrayable objects to the screen:</p>
292 292
                 <pre><code class="php">glsr_debug($reviews, $reviewsHtml);</code></pre>
293 293
             </li>
294 294
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     <div class="glsr-card-header">
301 301
         <h3>Helper function to generate HTML stars for a rating</h3>
302 302
         <button type="button" class="handlediv" aria-expanded="true">
303
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
303
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
304 304
             <span class="toggle-indicator" aria-hidden="true"></span>
305 305
         </button>
306 306
     </div>
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
     <div class="glsr-card-header">
325 325
         <h3>Helper function to log variables to the plugin console</h3>
326 326
         <button type="button" class="handlediv" aria-expanded="true">
327
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
327
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
328 328
             <span class="toggle-indicator" aria-hidden="true"></span>
329 329
         </button>
330 330
     </div>
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 // OR:
345 345
 
346 346
 apply_filters('glsr_log', null, $var1);</code></pre>
347
-    <p>Logged entries will be found in the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=tools#!console'); ?>">Tools &rarr; Console</a></code>.</p>
347
+    <p>Logged entries will be found in the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=tools#!console' ); ?>">Tools &rarr; Console</a></code>.</p>
348 348
     </div>
349 349
 </div>
350 350
 
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     <div class="glsr-card-header">
353 353
         <h3>Helper function to recalculate the rating counts</h3>
354 354
         <button type="button" class="handlediv" aria-expanded="true">
355
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
355
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
356 356
             <span class="toggle-indicator" aria-hidden="true"></span>
357 357
         </button>
358 358
     </div>
@@ -368,6 +368,6 @@  discard block
 block discarded – undo
368 368
 // OR:
369 369
 
370 370
 apply_filters('glsr_calculate_ratings', null);</code></pre>
371
-    <p>You can verify that it runs by checking the log entries in the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=tools#!console'); ?>">Tools &rarr; Console</a></code>.</p>
371
+    <p>You can verify that it runs by checking the log entries in the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=tools#!console' ); ?>">Tools &rarr; Console</a></code>.</p>
372 372
     </div>
373 373
 </div>
Please login to merge, or discard this patch.
views/pages/documentation/index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <div class="wrap">
4
-    <h1 class="page-title"><?= esc_html(get_admin_page_title()); ?></h1>
5
-    <p><?= __('Click an active tab to expand/collapse all sections.', 'site-reviews'); ?></p>
4
+    <h1 class="page-title"><?= esc_html( get_admin_page_title() ); ?></h1>
5
+    <p><?= __( 'Click an active tab to expand/collapse all sections.', 'site-reviews' ); ?></p>
6 6
     <h2 class="glsr-nav-tab-wrapper nav-tab-wrapper">
7
-        <?php foreach ($tabs as $id => $title) : ?>
7
+        <?php foreach( $tabs as $id => $title ) : ?>
8 8
         <a class="glsr-nav-tab nav-tab" href="#<?= $id; ?>"><?= $title; ?></a>
9 9
         <?php endforeach; ?>
10 10
     </h2>
11
-    <?php foreach ($tabs as $id => $title) : ?>
11
+    <?php foreach( $tabs as $id => $title ) : ?>
12 12
     <div class="glsr-nav-view ui-tabs-hide" id="<?= $id; ?>">
13
-        <?php glsr()->render('pages/documentation/'.$id, $data); ?>
13
+        <?php glsr()->render( 'pages/documentation/'.$id, $data ); ?>
14 14
     </div>
15 15
     <?php endforeach; ?>
16 16
     <input type="hidden" name="_active_tab">
Please login to merge, or discard this patch.
views/pages/documentation/shortcodes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <div id="shortcodes-01" class="glsr-card postbox">
4 4
     <div class="glsr-card-header">
5 5
         <h3>[site_reviews]</h3>
6 6
         <button type="button" class="handlediv" aria-expanded="true">
7
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
7
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
8 8
             <span class="toggle-indicator" aria-hidden="true"></span>
9 9
         </button>
10 10
     </div>
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     <div class="glsr-card-header">
79 79
         <h3>[site_reviews_form]</h3>
80 80
         <button type="button" class="handlediv" aria-expanded="true">
81
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
81
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
82 82
             <span class="toggle-indicator" aria-hidden="true"></span>
83 83
         </button>
84 84
     </div>
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     <div class="glsr-card-header">
127 127
         <h3>[site_reviews_summary]</h3>
128 128
         <button type="button" class="handlediv" aria-expanded="true">
129
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
129
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
130 130
             <span class="toggle-indicator" aria-hidden="true"></span>
131 131
         </button>
132 132
     </div>
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         <pre><code>[site_reviews_summary hide="bars,if_empty,rating,stars,summary"]</code></pre>
157 157
 
158 158
         <p class="glsr-heading">labels</p>
159
-        <p>The "labels" attribute allows you to enter custom labels for the percentage bar levels (from high to low), each level should be separated with a comma. However, rather than using this attribute to change the labels it's recommended to instead create a custom translation for them in the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=settings#!translations'); ?>">Settings &rarr; Translations</a></code> page.</p>
159
+        <p>The "labels" attribute allows you to enter custom labels for the percentage bar levels (from high to low), each level should be separated with a comma. However, rather than using this attribute to change the labels it's recommended to instead create a custom translation for them in the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=settings#!translations' ); ?>">Settings &rarr; Translations</a></code> page.</p>
160 160
         <p>The default labels value is: <code>"Excellent,Very good,Average,Poor,Terrible"</code></p>
161 161
         <pre><code>[site_reviews_summary labels="5 star,4 star,3 star,2 star,1 star"]</code></pre>
162 162
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         <pre><code>[site_reviews_summary schema="true"]</code></pre>
174 174
 
175 175
         <p class="glsr-heading">text</p>
176
-        <p>The "text" attribute allows you to change the summary text. Available template tags to use are, "{rating}" which represents the calculated average rating, "{max}" which represents the maximum star rating available, and "{num}" which represents the total number of reviews. However, rather than using this attribute to change the summary text it's recommended to instead create a custom translation for it in the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=settings#!translations'); ?>">Settings &rarr; Translations</a></code> page. That way, you will be able to customize both the singular (1 review) and plural (2 reviews) summary texts.</p>
176
+        <p>The "text" attribute allows you to change the summary text. Available template tags to use are, "{rating}" which represents the calculated average rating, "{max}" which represents the maximum star rating available, and "{num}" which represents the total number of reviews. However, rather than using this attribute to change the summary text it's recommended to instead create a custom translation for it in the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=settings#!translations' ); ?>">Settings &rarr; Translations</a></code> page. That way, you will be able to customize both the singular (1 review) and plural (2 reviews) summary texts.</p>
177 177
         <p>The default text value is: <code>"{rating} out of {max} stars (based on {num} reviews)"</code></p>
178 178
         <pre><code>[site_reviews_summary text="{num} customer reviews"]</code></pre>
179 179
 
Please login to merge, or discard this patch.
views/pages/documentation/faq.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <div id="faq-01" class="glsr-card postbox">
4 4
     <div class="glsr-card-header">
5 5
         <h3>How do I add additional values to the schema?</h3>
6 6
         <button type="button" class="handlediv" aria-expanded="true">
7
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
7
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
8 8
             <span class="toggle-indicator" aria-hidden="true"></span>
9 9
         </button>
10 10
     </div>
11 11
     <div class="inside">
12
-        <p>To add additional values to the generated schema, use the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=documentation#!hooks'); ?>" data-expand="#hooks-07">site-reviews/schema/[SCHEMA_TYPE]</a></code> hook in your theme's functions.php file.</p>
12
+        <p>To add additional values to the generated schema, use the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=documentation#!hooks' ); ?>" data-expand="#hooks-07">site-reviews/schema/[SCHEMA_TYPE]</a></code> hook in your theme's functions.php file.</p>
13 13
         <p>Make sure to use Google's <a href="https://search.google.com/structured-data/testing-tool">Structured Data Testing Tool</a> to test the schema after any custom modifications have been made.</p>
14 14
         <pre><code class="php">/**
15 15
  * Modifies the schema created by Site Reviews.
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     <div class="glsr-card-header">
35 35
         <h3>How do I change the font?</h3>
36 36
         <button type="button" class="handlediv" aria-expanded="true">
37
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
37
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
38 38
             <span class="toggle-indicator" aria-hidden="true"></span>
39 39
         </button>
40 40
     </div>
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     <div class="glsr-card-header">
51 51
         <h3>How do I change the order of the review fields?</h3>
52 52
         <button type="button" class="handlediv" aria-expanded="true">
53
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
53
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
54 54
             <span class="toggle-indicator" aria-hidden="true"></span>
55 55
         </button>
56 56
     </div>
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     <div class="glsr-card-header">
79 79
         <h3>How do I change the order of the reviews summary fields?</h3>
80 80
         <button type="button" class="handlediv" aria-expanded="true">
81
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
81
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
82 82
             <span class="toggle-indicator" aria-hidden="true"></span>
83 83
         </button>
84 84
     </div>
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
     <div class="glsr-card-header">
105 105
         <h3>How do I change the order of the submission form fields?</h3>
106 106
         <button type="button" class="handlediv" aria-expanded="true">
107
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
107
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
108 108
             <span class="toggle-indicator" aria-hidden="true"></span>
109 109
         </button>
110 110
     </div>
111 111
     <div class="inside">
112
-        <p>To customise the order of the fields in the review submission form, use the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=documentation#!hooks'); ?>" data-expand="#hooks-01">site-reviews/submission-form/order</a></code> filter hook in your theme's <code>functions.php</code> file.</p>
112
+        <p>To customise the order of the fields in the review submission form, use the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=documentation#!hooks' ); ?>" data-expand="#hooks-01">site-reviews/submission-form/order</a></code> filter hook in your theme's <code>functions.php</code> file.</p>
113 113
         <pre><code class="php">/**
114 114
  * Customises the order of the fields used in the Site Reviews submission form.
115 115
  * Paste this in your active theme's functions.php file.
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         'terms',
129 129
     ];
130 130
 });</code></pre>
131
-        <p>If you have used the example above and the submission-form fields are not working correctly, check the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=tools#!console'); ?>">Tools &rarr; Console</a></code> for errors.</p>
131
+        <p>If you have used the example above and the submission-form fields are not working correctly, check the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=tools#!console' ); ?>">Tools &rarr; Console</a></code> for errors.</p>
132 132
     </div>
133 133
 </div>
134 134
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     <div class="glsr-card-header">
137 137
         <h3>How do I change the pagination query string?</h3>
138 138
         <button type="button" class="handlediv" aria-expanded="true">
139
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
139
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
140 140
             <span class="toggle-indicator" aria-hidden="true"></span>
141 141
         </button>
142 142
     </div>
@@ -158,12 +158,12 @@  discard block
 block discarded – undo
158 158
     <div class="glsr-card-header">
159 159
         <h3>How do I change the text of...?</h3>
160 160
         <button type="button" class="handlediv" aria-expanded="true">
161
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
161
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
162 162
             <span class="toggle-indicator" aria-hidden="true"></span>
163 163
         </button>
164 164
     </div>
165 165
     <div class="inside">
166
-        <p>You can change any text in the plugin on the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=settings#!translations'); ?>">Settings &rarr; Translations</a></code> page.</p>
166
+        <p>You can change any text in the plugin on the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=settings#!translations' ); ?>">Settings &rarr; Translations</a></code> page.</p>
167 167
     </div>
168 168
 </div>
169 169
 
@@ -171,12 +171,12 @@  discard block
 block discarded – undo
171 171
     <div class="glsr-card-header">
172 172
         <h3>How do I create a review programmatically?</h3>
173 173
         <button type="button" class="handlediv" aria-expanded="true">
174
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
174
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
175 175
             <span class="toggle-indicator" aria-hidden="true"></span>
176 176
         </button>
177 177
     </div>
178 178
     <div class="inside">
179
-        <p>Site Reviews provides a <code><a href="<?= admin_url('edit.php?post_type=site-review&page=documentation#!functions'); ?>" data-expand="#functions-02">glsr_create_review()</a></code> helper function to easily create a review.</p>
179
+        <p>Site Reviews provides a <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=documentation#!functions' ); ?>" data-expand="#functions-02">glsr_create_review()</a></code> helper function to easily create a review.</p>
180 180
         <p>Here is an example:</p>
181 181
         <pre><code class="php">if (function_exists('glsr_create_review')) {
182 182
     $review = glsr_create_review([
@@ -196,12 +196,12 @@  discard block
 block discarded – undo
196 196
     <div class="glsr-card-header">
197 197
         <h3>How do I customise the stars?</h3>
198 198
         <button type="button" class="handlediv" aria-expanded="true">
199
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
199
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
200 200
             <span class="toggle-indicator" aria-hidden="true"></span>
201 201
         </button>
202 202
     </div>
203 203
     <div class="inside">
204
-        <p>To customise the star images used by the plugin, use the <code><a href="<?= admin_url('edit.php?post_type=site-review&page=documentation#!hooks'); ?>" data-expand="#hooks-02">site-reviews/config/inline-styles</a></code> filter hook in your theme's <code>functions.php</code> file.</p>
204
+        <p>To customise the star images used by the plugin, use the <code><a href="<?= admin_url( 'edit.php?post_type=site-review&page=documentation#!hooks' ); ?>" data-expand="#hooks-02">site-reviews/config/inline-styles</a></code> filter hook in your theme's <code>functions.php</code> file.</p>
205 205
         <p>Here is an example:</p>
206 206
         <pre><code class="php">/**
207 207
  * Customises the stars used by Site Reviews.
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     <div class="glsr-card-header">
225 225
         <h3>How do I limit the submitted review length?</h3>
226 226
         <button type="button" class="handlediv" aria-expanded="true">
227
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
227
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
228 228
             <span class="toggle-indicator" aria-hidden="true"></span>
229 229
         </button>
230 230
     </div>
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     <div class="glsr-card-header">
263 263
         <h3>How do I redirect to a custom URL after a form is submitted?</h3>
264 264
         <button type="button" class="handlediv" aria-expanded="true">
265
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
265
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
266 266
             <span class="toggle-indicator" aria-hidden="true"></span>
267 267
         </button>
268 268
     </div>
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     <div class="glsr-card-header">
276 276
         <h3>How do I remove the dash in front of the author's name?</h3>
277 277
         <button type="button" class="handlediv" aria-expanded="true">
278
-            <span class="screen-reader-text"><?= __('Toggle documentation panel', 'site-reviews'); ?></span>
278
+            <span class="screen-reader-text"><?= __( 'Toggle documentation panel', 'site-reviews' ); ?></span>
279 279
             <span class="toggle-indicator" aria-hidden="true"></span>
280 280
         </button>
281 281
     </div>
Please login to merge, or discard this patch.