Passed
Push — master ( b42765...64f340 )
by Paul
04:14
created
views/pages/tools/general.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,42 +1,42 @@  discard block
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3
-<?php if (glsr()->hasPermission('settings')) : ?>
3
+<?php if( glsr()->hasPermission( 'settings' ) ) : ?>
4 4
 <div class="glsr-card card">
5 5
     <h3>Export Settings</h3>
6 6
     <p>Export the Site Reviews settings for this site to a <code>*.json</code> file. This allows you to easily import the plugin settings into another site.</p>
7
-    <p>To export your Site Reviews' reviews and categories, please use the WordPress <a href="<?= admin_url('export.php'); ?>">Export</a> tool.</p>
7
+    <p>To export your Site Reviews' reviews and categories, please use the WordPress <a href="<?= admin_url( 'export.php' ); ?>">Export</a> tool.</p>
8 8
     <form method="post">
9 9
         <input type="hidden" name="{{ id }}[_action]" value="export-settings">
10
-        <?php wp_nonce_field('export-settings'); ?>
11
-        <?php submit_button(__('Export Settings', 'site-reviews'), 'secondary'); ?>
10
+        <?php wp_nonce_field( 'export-settings' ); ?>
11
+        <?php submit_button( __( 'Export Settings', 'site-reviews' ), 'secondary' ); ?>
12 12
     </form>
13 13
 </div>
14 14
 <?php endif; ?>
15 15
 
16
-<?php if (glsr()->hasPermission('settings')) : ?>
16
+<?php if( glsr()->hasPermission( 'settings' ) ) : ?>
17 17
 <div class="glsr-card card">
18 18
     <h3>Import Settings</h3>
19 19
     <p>Import the Site Reviews settings from a <code>*.json</code> file. This file can be obtained by exporting the settings on another site using the export tool below.</p>
20
-    <p>To import your Site Reviews' reviews and categories from another website, please use the WordPress <a href="<?= admin_url('import.php'); ?>">Import</a> tool.</p>
20
+    <p>To import your Site Reviews' reviews and categories from another website, please use the WordPress <a href="<?= admin_url( 'import.php' ); ?>">Import</a> tool.</p>
21 21
     <form method="post" enctype="multipart/form-data">
22 22
         <input type="file" name="import-file">
23 23
         <input type="hidden" name="{{ id }}[_action]" value="import-settings">
24
-        <?php wp_nonce_field('import-settings'); ?>
25
-        <?php submit_button(__('Import Settings', 'site-reviews'), 'secondary'); ?>
24
+        <?php wp_nonce_field( 'import-settings' ); ?>
25
+        <?php submit_button( __( 'Import Settings', 'site-reviews' ), 'secondary' ); ?>
26 26
     </form>
27 27
 </div>
28 28
 <?php endif; ?>
29 29
 
30
-<?php if (glsr()->hasPermission('settings')) : ?>
30
+<?php if( glsr()->hasPermission( 'settings' ) ) : ?>
31 31
 <div class="glsr-card card">
32 32
     <h3>Migrate Plugin</h3>
33 33
     <p>Run this tool if your reviews stopped working correctly after upgrading the plugin to the latest version (i.e. read-only reviews, zero-star ratings, missing role capabilities, etc.).</p>
34 34
     <form method="post">
35 35
         <input type="hidden" name="{{ id }}[_action]" value="migrate-reviews">
36
-        <?php wp_nonce_field('migrate-reviews'); ?>
36
+        <?php wp_nonce_field( 'migrate-reviews' ); ?>
37 37
         <p class="submit">
38 38
             <button type="submit" class="glsr-button button" name="migrate-reviews" id="migrate-reviews">
39
-                <span data-loading="<?= __('Migrating Reviews...', 'site-reviews'); ?>"><?= __('Run Migration', 'site-reviews'); ?></span>
39
+                <span data-loading="<?= __( 'Migrating Reviews...', 'site-reviews' ); ?>"><?= __( 'Run Migration', 'site-reviews' ); ?></span>
40 40
             </button>
41 41
         </p>
42 42
     </form>
@@ -49,26 +49,26 @@  discard block
 block discarded – undo
49 49
     <p>If you suspect that the rating counts are incorrect (perhaps you have edited/deleted reviews directly from your database), you can recalculate them here.</p>
50 50
     <form method="post">
51 51
         <input type="hidden" name="{{ id }}[_action]" value="count-reviews">
52
-        <?php wp_nonce_field('count-reviews'); ?>
52
+        <?php wp_nonce_field( 'count-reviews' ); ?>
53 53
         <p class="submit">
54 54
             <button type="submit" class="glsr-button button" name="count-reviews" id="count-reviews">
55
-                <span data-loading="<?= __('Recalculating Counts...', 'site-reviews'); ?>"><?= __('Recalculate Counts', 'site-reviews'); ?></span>
55
+                <span data-loading="<?= __( 'Recalculating Counts...', 'site-reviews' ); ?>"><?= __( 'Recalculate Counts', 'site-reviews' ); ?></span>
56 56
             </button>
57 57
         </p>
58 58
     </form>
59 59
 </div>
60 60
 
61
-<?php if (glsr()->hasPermission('settings')) : ?>
61
+<?php if( glsr()->hasPermission( 'settings' ) ) : ?>
62 62
 <div class="glsr-card card">
63 63
     <h3>Reset Permissions</h3>
64 64
     <p>Site Reviews provides custom post_type capabilities that mirror the capabilities of your posts by default. For example, if a user role has permission to edit others posts, then that role will also have permission to edit other users reviews.</p>
65 65
     <p>If you have changed the capabilities of your user roles and you suspect that Site Reviews is not working correctly due to your changes, you may use this tool to reset the Site Reviews capabilities for your user roles.</p>
66 66
     <form method="post">
67 67
         <input type="hidden" name="{{ id }}[_action]" value="reset-permissions">
68
-        <?php wp_nonce_field('reset-permissions'); ?>
68
+        <?php wp_nonce_field( 'reset-permissions' ); ?>
69 69
         <p class="submit">
70 70
             <button type="submit" class="glsr-button button" name="reset-permissions" id="reset-permissions">
71
-                <span data-loading="<?= __('Resetting Permissions...', 'site-reviews'); ?>"><?= __('Reset Permissions', 'site-reviews'); ?></span>
71
+                <span data-loading="<?= __( 'Resetting Permissions...', 'site-reviews' ); ?>"><?= __( 'Reset Permissions', 'site-reviews' ); ?></span>
72 72
             </button>
73 73
         </p>
74 74
     </form>
Please login to merge, or discard this patch.