@@ -10,8 +10,8 @@ |
||
| 10 | 10 | if ( ! class_exists( 'PLUGIN_TABLE' ) ) { |
| 11 | 11 | |
| 12 | 12 | if ( ! class_exists( 'WP_List_Table' ) ) { |
| 13 | - require_once( ABSPATH . 'wp-admin/includes/screen.php' ); |
|
| 14 | - require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); |
|
| 13 | + require_once( ABSPATH . 'wp-admin/includes/screen.php' ); |
|
| 14 | + require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | final class PLUGIN_TABLE extends WP_List_Table { |
@@ -44,13 +44,13 @@ |
||
| 44 | 44 | global $wpdb; |
| 45 | 45 | $wpdb->hide_errors(); |
| 46 | 46 | $collate = ""; |
| 47 | - if ( $wpdb->has_cap( 'collation' ) ) { |
|
| 47 | + if ( $wpdb->has_cap( 'collation' ) ) { |
|
| 48 | 48 | if( ! empty($wpdb->charset ) ) |
| 49 | 49 | $collate .= "DEFAULT CHARACTER SET $wpdb->charset"; |
| 50 | 50 | if( ! empty($wpdb->collate ) ) |
| 51 | 51 | $collate .= " COLLATE $wpdb->collate"; |
| 52 | - } |
|
| 53 | - require_once( $this->up_path ); |
|
| 52 | + } |
|
| 53 | + require_once( $this->up_path ); |
|
| 54 | 54 | return $collate; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | 'label' => '' |
| 20 | 20 | ), |
| 21 | 21 | ); |
| 22 | - */ |
|
| 22 | + */ |
|
| 23 | 23 | public $pluginPageLinks; |
| 24 | 24 | |
| 25 | 25 | |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | add_action( 'admin_menu', array( $this, 'menu_page' ) ); |
| 54 | 54 | add_action( 'admin_menu', array( $this, 'sub_menu_page' ) ); |
| 55 | 55 | add_filter( 'set-screen-option', array( $this, 'set_screen' ), 10, 3 ); |
| 56 | - * |
|
| 57 | - */ |
|
| 56 | + * |
|
| 57 | + */ |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | //Set screen option |
| 104 | 104 | public function set_screen($status, $option, $value) { |
| 105 | 105 | |
| 106 | - if ( 'option_name_per_page' == $option ) return $value; // Related to PLUGIN_TABLE() |
|
| 107 | - //return $status; |
|
| 106 | + if ( 'option_name_per_page' == $option ) return $value; // Related to PLUGIN_TABLE() |
|
| 107 | + //return $status; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | |
@@ -11,9 +11,9 @@ discard block |
||
| 11 | 11 | public function installation() { |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | - * |
|
| 15 | - * Plugin installation |
|
| 16 | - * |
|
| 14 | + * |
|
| 15 | + * Plugin installation |
|
| 16 | + * |
|
| 17 | 17 | if (class_exists('PLUGIN_INSTALL')) { |
| 18 | 18 | |
| 19 | 19 | $install = new PLUGIN_INSTALL(); |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | $this->corn(); |
| 32 | - * |
|
| 33 | - */ |
|
| 32 | + * |
|
| 33 | + */ |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | |
@@ -56,9 +56,9 @@ discard block |
||
| 56 | 56 | public function db_install() { |
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | - * |
|
| 60 | - * Install database by defining your SQL |
|
| 61 | - * |
|
| 59 | + * |
|
| 60 | + * Install database by defining your SQL |
|
| 61 | + * |
|
| 62 | 62 | if ( class_exists( 'PLUGIN_DB' ) ) { |
| 63 | 63 | $db = new PLUGIN_DB(); |
| 64 | 64 | $db->table = 'plugin_db_table_name'; |
@@ -67,28 +67,28 @@ discard block |
||
| 67 | 67 | UNIQUE KEY ID (ID)"; |
| 68 | 68 | $db->build(); |
| 69 | 69 | } |
| 70 | - * |
|
| 71 | - * |
|
| 72 | - * Optionally check if the DB table is installed correctly |
|
| 73 | - * |
|
| 70 | + * |
|
| 71 | + * |
|
| 72 | + * Optionally check if the DB table is installed correctly |
|
| 73 | + * |
|
| 74 | 74 | if (get_option('_plugin_db_exist') == '0') { |
| 75 | 75 | add_action( 'admin_notices', 'db_error_msg' ); |
| 76 | 76 | } |
| 77 | - * |
|
| 78 | - */ |
|
| 77 | + * |
|
| 78 | + */ |
|
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | - * |
|
| 82 | - * Install DB options |
|
| 83 | - * |
|
| 81 | + * |
|
| 82 | + * Install DB options |
|
| 83 | + * |
|
| 84 | 84 | $options = array( |
| 85 | 85 | array( 'option_name', '__value__' ), |
| 86 | 86 | ); |
| 87 | 87 | foreach ($options as $value) { |
| 88 | 88 | update_option( $value[0], $value[1] ); |
| 89 | 89 | } |
| 90 | - * |
|
| 91 | - */ |
|
| 90 | + * |
|
| 91 | + */ |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | |
@@ -107,9 +107,9 @@ discard block |
||
| 107 | 107 | public function db_uninstall() { |
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | - * |
|
| 111 | - * Important table name declarition |
|
| 112 | - * |
|
| 110 | + * |
|
| 111 | + * Important table name declarition |
|
| 112 | + * |
|
| 113 | 113 | $tableName = 'plugin_db_table'; |
| 114 | 114 | |
| 115 | 115 | global $wpdb; |
@@ -120,8 +120,8 @@ discard block |
||
| 120 | 120 | foreach ($options as $value) { |
| 121 | 121 | delete_option($value); |
| 122 | 122 | } |
| 123 | - * |
|
| 124 | - */ |
|
| 123 | + * |
|
| 124 | + */ |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | |