@@ -3,7 +3,9 @@ |
||
3 | 3 | * Doing AJAX the WordPress way. |
4 | 4 | * Use this class in admin or user side |
5 | 5 | */ |
6 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
6 | +if ( ! defined( 'ABSPATH' ) ) { |
|
7 | + exit; |
|
8 | +} |
|
7 | 9 | |
8 | 10 | //AJAX helper class |
9 | 11 | if ( ! class_exists( 'PLUGIN_AJAX' ) ) { |
@@ -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 | * Plugin upload for WordPress front end or backend |
@@ -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( 'PLUGIN_SCRIPT' ) ) { |
8 | 10 |
@@ -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 | * |
@@ -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 | * Implimentation of WordPress inbuilt functions for plugin activation. |
@@ -24,8 +26,10 @@ discard block |
||
24 | 26 | |
25 | 27 | |
26 | 28 | |
27 | - public function do() { |
|
29 | + public function do { |
|
30 | + () { |
|
28 | 31 | add_action( 'plugins_loaded', array( $this, 'text_domain_cb' ) ); |
32 | + } |
|
29 | 33 | add_action( 'admin_notices', array( $this, 'php_ver_incompatible' ) ); |
30 | 34 | add_filter( 'plugin_action_links', array( $this, 'menu_page_link' ), 10, 2 ); |
31 | 35 | } |
@@ -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 | * Shortcode class for rendering in front end |
@@ -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 |
@@ -103,7 +105,10 @@ discard block |
||
103 | 105 | //Set screen option |
104 | 106 | public function set_screen($status, $option, $value) { |
105 | 107 | |
106 | - if ( 'option_name_per_page' == $option ) return $value; // Related to PLUGIN_TABLE() |
|
108 | + if ( 'option_name_per_page' == $option ) { |
|
109 | + return $value; |
|
110 | + } |
|
111 | + // Related to PLUGIN_TABLE() |
|
107 | 112 | //return $status; |
108 | 113 | } |
109 | 114 |
@@ -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 | * Widget class |