@@ -118,6 +118,10 @@ |
||
| 118 | 118 | * |
| 119 | 119 | * @since 1.0 |
| 120 | 120 | */ |
| 121 | + |
|
| 122 | + /** |
|
| 123 | + * @param string $button_classes |
|
| 124 | + */ |
|
| 121 | 125 | public static function render_template($plugin, $api, $button_text, $button_classes){ |
| 122 | 126 | ?> |
| 123 | 127 | <div class="plugin"> |
@@ -9,7 +9,9 @@ discard block |
||
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | |
| 12 | -if (!defined('ABSPATH')) exit; |
|
| 12 | +if (!defined('ABSPATH')) { |
|
| 13 | + exit; |
|
| 14 | +} |
|
| 13 | 15 | |
| 14 | 16 | |
| 15 | 17 | |
@@ -160,15 +162,17 @@ discard block |
||
| 160 | 162 | */ |
| 161 | 163 | public function cnkt_plugin_installer(){ |
| 162 | 164 | |
| 163 | - if ( ! current_user_can('install_plugins') ) |
|
| 164 | - wp_die( __( 'Sorry, you are not allowed to install plugins on this site.', 'framework' ) ); |
|
| 165 | + if ( ! current_user_can('install_plugins') ) { |
|
| 166 | + wp_die( __( 'Sorry, you are not allowed to install plugins on this site.', 'framework' ) ); |
|
| 167 | + } |
|
| 165 | 168 | |
| 166 | 169 | $nonce = $_POST["nonce"]; |
| 167 | 170 | $plugin = $_POST["plugin"]; |
| 168 | 171 | |
| 169 | 172 | // Check our nonce, if they don't match then bounce! |
| 170 | - if (! wp_verify_nonce( $nonce, 'cnkt_installer_nonce' )) |
|
| 171 | - wp_die( __( 'Error - unable to verify nonce, please try again.', 'framework') ); |
|
| 173 | + if (! wp_verify_nonce( $nonce, 'cnkt_installer_nonce' )) { |
|
| 174 | + wp_die( __( 'Error - unable to verify nonce, please try again.', 'framework') ); |
|
| 175 | + } |
|
| 172 | 176 | |
| 173 | 177 | |
| 174 | 178 | // Include required libs for installation |
@@ -231,15 +235,17 @@ discard block |
||
| 231 | 235 | * @since 1.0 |
| 232 | 236 | */ |
| 233 | 237 | public function cnkt_plugin_activation(){ |
| 234 | - if ( ! current_user_can('install_plugins') ) |
|
| 235 | - wp_die( __( 'Sorry, you are not allowed to activate plugins on this site.', 'framework' ) ); |
|
| 238 | + if ( ! current_user_can('install_plugins') ) { |
|
| 239 | + wp_die( __( 'Sorry, you are not allowed to activate plugins on this site.', 'framework' ) ); |
|
| 240 | + } |
|
| 236 | 241 | |
| 237 | 242 | $nonce = $_POST["nonce"]; |
| 238 | 243 | $plugin = $_POST["plugin"]; |
| 239 | 244 | |
| 240 | 245 | // Check our nonce, if they don't match then bounce! |
| 241 | - if (! wp_verify_nonce( $nonce, 'cnkt_installer_nonce' )) |
|
| 242 | - die( __( 'Error - unable to verify nonce, please try again.', 'framework' ) ); |
|
| 246 | + if (! wp_verify_nonce( $nonce, 'cnkt_installer_nonce' )) { |
|
| 247 | + die( __( 'Error - unable to verify nonce, please try again.', 'framework' ) ); |
|
| 248 | + } |
|
| 243 | 249 | |
| 244 | 250 | |
| 245 | 251 | // Include required libs for activation |