@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
3 | 5 | |
4 | 6 | /** |
5 | 7 | * DB installation class |
@@ -45,10 +47,12 @@ discard block |
||
45 | 47 | $wpdb->hide_errors(); |
46 | 48 | $collate = ""; |
47 | 49 | if ( $wpdb->has_cap( 'collation' ) ) { |
48 | - if( ! empty($wpdb->charset ) ) |
|
49 | - $collate .= "DEFAULT CHARACTER SET $wpdb->charset"; |
|
50 | - if( ! empty($wpdb->collate ) ) |
|
51 | - $collate .= " COLLATE $wpdb->collate"; |
|
50 | + if( ! empty($wpdb->charset ) ) { |
|
51 | + $collate .= "DEFAULT CHARACTER SET $wpdb->charset"; |
|
52 | + } |
|
53 | + if( ! empty($wpdb->collate ) ) { |
|
54 | + $collate .= " COLLATE $wpdb->collate"; |
|
55 | + } |
|
52 | 56 | } |
53 | 57 | require_once( $this->up_path ); |
54 | 58 | return $collate; |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
3 | 5 | |
4 | 6 | /** |
5 | 7 | * Backend settings page class, can have settings fields or data table |
@@ -158,7 +160,10 @@ discard block |
||
158 | 160 | //Set screen option |
159 | 161 | public function set_screen($status, $option, $value) { |
160 | 162 | |
161 | - if ( 'post_per_page' == $option ) return $value; // Related to PLUGIN_TABLE() |
|
163 | + if ( 'post_per_page' == $option ) { |
|
164 | + return $value; |
|
165 | + } |
|
166 | + // Related to PLUGIN_TABLE() |
|
162 | 167 | //return $status; |
163 | 168 | } |
164 | 169 | |
@@ -229,11 +234,13 @@ discard block |
||
229 | 234 | <?php do_action( 'cgss_scan' ); ?> |
230 | 235 | <?php elseif (isset($_GET['compete'])) : ?> |
231 | 236 | <?php do_action( 'cgss_compete' ); ?> |
232 | - <?php else : ?> |
|
237 | + <?php else { |
|
238 | + : ?> |
|
233 | 239 | <form method="post" action=""> |
234 | 240 | <?php |
235 | 241 | // Source: /lib/table.php |
236 | 242 | $this->table = new CGSS_TABLE(); |
243 | +} |
|
237 | 244 | $this->table->prepare_items(); |
238 | 245 | $this->table->display(); |
239 | 246 | ?> |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
3 | 5 | |
4 | 6 | /** |
5 | 7 | * Perform scan action |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
3 | 5 | |
4 | 6 | /** |
5 | 7 | * Perform fetch insight action |
@@ -2,7 +2,9 @@ |
||
2 | 2 | /** |
3 | 3 | * Add scripts to the plugin. CSS and JS. |
4 | 4 | */ |
5 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
5 | +if ( ! defined( 'ABSPATH' ) ) { |
|
6 | + exit; |
|
7 | +} |
|
6 | 8 | |
7 | 9 | if ( ! class_exists( 'CGSS_SCRIPT' ) ) { |
8 | 10 |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
3 | 5 | |
4 | 6 | //Main plugin object to define the plugin |
5 | 7 | if ( ! class_exists( 'CGSS_BUILD' ) ) { |
@@ -83,7 +85,9 @@ discard block |
||
83 | 85 | //Include scripts |
84 | 86 | public function scripts() { |
85 | 87 | |
86 | - if ( class_exists( 'CGSS_SCRIPT' ) ) new CGSS_SCRIPT(); |
|
88 | + if ( class_exists( 'CGSS_SCRIPT' ) ) { |
|
89 | + new CGSS_SCRIPT(); |
|
90 | + } |
|
87 | 91 | } |
88 | 92 | |
89 | 93 | |
@@ -91,7 +95,9 @@ discard block |
||
91 | 95 | //Include settings pages |
92 | 96 | public function settings() { |
93 | 97 | |
94 | - if ( class_exists( 'CGSS_SETTINGS' ) ) new CGSS_SETTINGS(); |
|
98 | + if ( class_exists( 'CGSS_SETTINGS' ) ) { |
|
99 | + new CGSS_SETTINGS(); |
|
100 | + } |
|
95 | 101 | } |
96 | 102 | |
97 | 103 | |
@@ -99,7 +105,9 @@ discard block |
||
99 | 105 | // Add custom insight action |
100 | 106 | public function insight() { |
101 | 107 | |
102 | - if ( class_exists( 'CGSS_INSIGHT' ) ) new CGSS_INSIGHT(); |
|
108 | + if ( class_exists( 'CGSS_INSIGHT' ) ) { |
|
109 | + new CGSS_INSIGHT(); |
|
110 | + } |
|
103 | 111 | } |
104 | 112 | |
105 | 113 | |
@@ -107,7 +115,9 @@ discard block |
||
107 | 115 | // Add custom insight action |
108 | 116 | public function scan() { |
109 | 117 | |
110 | - if ( class_exists( 'CGSS_SCAN' ) ) new CGSS_SCAN(); |
|
118 | + if ( class_exists( 'CGSS_SCAN' ) ) { |
|
119 | + new CGSS_SCAN(); |
|
120 | + } |
|
111 | 121 | } |
112 | 122 | |
113 | 123 |
@@ -11,7 +11,9 @@ discard block |
||
11 | 11 | License: GPLv3 |
12 | 12 | License URI: http://www.gnu.org/licenses/gpl-3.0.html |
13 | 13 | */ |
14 | -if (!defined('ABSPATH')) exit; |
|
14 | +if (!defined('ABSPATH')) { |
|
15 | + exit; |
|
16 | +} |
|
15 | 17 | |
16 | 18 | |
17 | 19 | //Define basic names |
@@ -33,4 +35,7 @@ discard block |
||
33 | 35 | |
34 | 36 | //The Plugin |
35 | 37 | require_once('autoload.php'); |
36 | -if ( class_exists( 'CGSS_BUILD' ) ) new CGSS_BUILD(); ?> |
|
37 | 38 | \ No newline at end of file |
39 | +if ( class_exists( 'CGSS_BUILD' ) ) { |
|
40 | + new CGSS_BUILD(); |
|
41 | +} |
|
42 | +?> |
|
38 | 43 | \ No newline at end of file |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
3 | 5 | |
4 | 6 | /** |
5 | 7 | * Implimentation of WordPress inbuilt functions for plugin activation. |