@@ -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 @@ |
||
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 |
@@ -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. |
@@ -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 |
@@ -144,7 +146,10 @@ discard block |
||
144 | 146 | //Set screen option |
145 | 147 | public function set_screen($status, $option, $value) { |
146 | 148 | |
147 | - if ( 'post_per_page' == $option ) return $value; // Related to PLUGIN_TABLE() |
|
149 | + if ( 'post_per_page' == $option ) { |
|
150 | + return $value; |
|
151 | + } |
|
152 | + // Related to PLUGIN_TABLE() |
|
148 | 153 | //return $status; |
149 | 154 | } |
150 | 155 | |
@@ -210,11 +215,13 @@ discard block |
||
210 | 215 | <?php do_action( 'cgss_scan' ); ?> |
211 | 216 | <?php elseif (isset($_GET['compete'])) : ?> |
212 | 217 | <?php do_action( 'cgss_compete' ); ?> |
213 | - <?php else : ?> |
|
218 | + <?php else { |
|
219 | + : ?> |
|
214 | 220 | <form method="post" action=""> |
215 | 221 | <?php |
216 | 222 | // Source: /lib/table.php |
217 | 223 | $this->table = new CGSS_TABLE(); |
224 | +} |
|
218 | 225 | $this->table->prepare_items(); |
219 | 226 | $this->table->display(); |
220 | 227 | ?> |
@@ -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(); ?> |
|
38 | +if ( class_exists( 'CGSS_BUILD' ) ) { |
|
39 | + new CGSS_BUILD(); |
|
40 | +} |
|
41 | +?> |