index.php
5 years ago
model-contacts.php
5 years ago
model-forms.php
5 years ago
model-lang.php
5 years ago
model-users.php
5 years ago
model-forms.php
459 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Model class <i>SIB_Forms</i> represents forms |
| 4 | * |
| 5 | * @package SIB_Forms |
| 6 | */ |
| 7 | |
| 8 | if ( ! class_exists( 'SIB_Forms' ) ) { |
| 9 | /** |
| 10 | * Class SIB_Forms |
| 11 | * |
| 12 | * @package SIB_Forms |
| 13 | */ |
| 14 | class SIB_Forms { |
| 15 | |
| 16 | /** |
| 17 | * Tab table name |
| 18 | */ |
| 19 | const TABLE_NAME = 'sib_model_forms'; |
| 20 | |
| 21 | /** Create Table */ |
| 22 | public static function createTable() { |
| 23 | global $wpdb; |
| 24 | // create list table. |
| 25 | $creation_query = |
| 26 | 'CREATE TABLE IF NOT EXISTS ' . $wpdb->prefix . self::TABLE_NAME . ' ( |
| 27 | `id` int(20) NOT NULL AUTO_INCREMENT, |
| 28 | `title` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 29 | `html` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 30 | `css` longtext, |
| 31 | `dependTheme` int(1) NOT NULL DEFAULT 1, |
| 32 | `listID` longtext, |
| 33 | `templateID` int(20) NOT NULL DEFAULT -1, |
| 34 | `confirmID` int(20) NOT NULL DEFAULT -1, |
| 35 | `isDopt` int(1) NOT NULL DEFAULT 0, |
| 36 | `isOpt` int(1) NOT NULL DEFAULT 0, |
| 37 | `redirectInEmail` varchar(255), |
| 38 | `redirectInForm` varchar(255), |
| 39 | `successMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 40 | `errorMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 41 | `existMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 42 | `invalidMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 43 | `requiredMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 44 | `attributes` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 45 | `date` DATE NOT NULL, |
| 46 | `isDefault` int(1) NOT NULL DEFAULT 0, |
| 47 | `gCaptcha` int(1) NOT NULL DEFAULT 0, |
| 48 | `gCaptcha_secret` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 49 | `gCaptcha_site` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 50 | `termAccept` int(1) NOT NULL DEFAULT 0, |
| 51 | `termsURL` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 52 | PRIMARY KEY (`id`) |
| 53 | );'; |
| 54 | require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); |
| 55 | $wpdb->query($creation_query); |
| 56 | // create default form. |
| 57 | $rows = $wpdb->get_results('SELECT * FROM '. $wpdb->prefix . self::TABLE_NAME ); |
| 58 | if (count( $rows ) == 0 ) |
| 59 | { |
| 60 | self::createDefaultForm(); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Remove table |
| 66 | */ |
| 67 | public static function removeTable() { |
| 68 | global $wpdb; |
| 69 | $query = 'DROP TABLE IF EXISTS ' . $wpdb->prefix . self::TABLE_NAME . ';'; |
| 70 | $wpdb->query( $query ); // db call ok; no-cache ok. |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Add columns for old versions |
| 75 | */ |
| 76 | public static function alterTable() { |
| 77 | global $wpdb; |
| 78 | // add columns -gCaptcha, gCaptcha_secret. |
| 79 | $table_name = $wpdb->prefix . self::TABLE_NAME; |
| 80 | |
| 81 | // check if gCaptcha fields exist |
| 82 | $gCaptcha = 'gCaptcha'; |
| 83 | $result = $wpdb->query( $wpdb->prepare( "SHOW COLUMNS FROM `$table_name` LIKE %s ", $gCaptcha ) ); // db call ok; no-cache ok. |
| 84 | |
| 85 | if ( empty( $result ) ) { |
| 86 | $alter_query = 'ALTER TABLE ' . $table_name . ' |
| 87 | ADD COLUMN gCaptcha int(1) not NULL DEFAULT 0, |
| 88 | ADD COLUMN gCaptcha_secret varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci, |
| 89 | ADD COLUMN gCaptcha_site varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci'; |
| 90 | $ret = $wpdb->query( $alter_query ); |
| 91 | } |
| 92 | |
| 93 | // add columns -termAccept, termsURL : version 2.9.0 |
| 94 | $check_query = 'SHOW COLUMNS FROM `' . $table_name . "` LIKE 'termAccept';"; |
| 95 | $result = $wpdb->query( $check_query ); |
| 96 | if ( empty( $result ) ) { |
| 97 | $alter_query = 'ALTER TABLE ' . $table_name . ' |
| 98 | ADD COLUMN termAccept int(1) not NULL DEFAULT 1, |
| 99 | ADD COLUMN termsURL varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci'; |
| 100 | $ret = $wpdb->query( $alter_query ); |
| 101 | } |
| 102 | // add columns - confirmID : version 2.9.0 |
| 103 | $check_query = 'SHOW COLUMNS FROM `' . $table_name . "` LIKE 'confirmID';"; |
| 104 | $result = $wpdb->query( $check_query ); |
| 105 | if ( empty( $result ) ) { |
| 106 | $alter_query = 'ALTER TABLE ' . $table_name . ' |
| 107 | ADD COLUMN confirmID int(20) not NULL DEFAULT -1'; |
| 108 | $ret = $wpdb->query( $alter_query ); |
| 109 | } |
| 110 | // add columns - requiredMsg : version 2.9.3 |
| 111 | $check_query = 'SHOW COLUMNS FROM `' . $table_name . "` LIKE 'requiredMsg';"; |
| 112 | $result = $wpdb->query( $check_query ); |
| 113 | if ( empty( $result ) ) { |
| 114 | $alter_query = 'ALTER TABLE ' . $table_name . ' |
| 115 | ADD COLUMN requiredMsg varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci'; |
| 116 | $ret = $wpdb->query( $alter_query ); |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * Get form data |
| 122 | * |
| 123 | * @param string $frmID - form ID. |
| 124 | * @return array|null|object|void |
| 125 | */ |
| 126 | public static function getForm( $frmID = 'new' ) { |
| 127 | global $wpdb; |
| 128 | if ( 'new' == $frmID ) { |
| 129 | // default form. |
| 130 | $formData = self::getDefaultForm(); |
| 131 | $list = maybe_serialize( array( SIB_API_Manager::get_default_list_id() ) ); |
| 132 | $results = array( |
| 133 | 'title' => '', |
| 134 | 'html' => $formData['html'], |
| 135 | 'css' => $formData['css'], |
| 136 | 'listID' => $list, |
| 137 | 'dependTheme' => '1', |
| 138 | 'templateID' => '-1', |
| 139 | 'confirmID' => '-1', |
| 140 | 'isOpt' => '0', |
| 141 | 'isDopt' => '0', |
| 142 | 'redirectInEmail' => '', |
| 143 | 'redirectInForm' => '', |
| 144 | 'date' => date( 'Y-m-d' ), |
| 145 | 'successMsg' => $formData['successMsg'], |
| 146 | 'errorMsg' => $formData['errorMsg'], |
| 147 | 'existMsg' => $formData['existMsg'], |
| 148 | 'invalidMsg' => $formData['invalidMsg'], |
| 149 | 'requiredMsg' => $formData['requiredMsg'], |
| 150 | 'attributes' => 'email,NAME', |
| 151 | ); |
| 152 | } else { |
| 153 | $query = $wpdb->prepare('SELECT * from ' . $wpdb->prefix . self::TABLE_NAME . ' where id = %d',array(esc_sql($frmID))); |
| 154 | $results = $wpdb->get_row( $query, ARRAY_A ); // db call ok; no-cache ok. |
| 155 | } |
| 156 | |
| 157 | if ( is_array( $results ) && count( $results ) > 0 ) { |
| 158 | $listIDs = maybe_unserialize( $results['listID'] ); |
| 159 | $results['listID'] = $listIDs; |
| 160 | return $results; |
| 161 | } |
| 162 | return array(); |
| 163 | } |
| 164 | |
| 165 | /** |
| 166 | * Get all forms |
| 167 | */ |
| 168 | public static function getForms() { |
| 169 | global $wpdb; |
| 170 | |
| 171 | $query = 'select * from ' . $wpdb->prefix . self::TABLE_NAME . ';'; |
| 172 | $results = $wpdb->get_results( $query, ARRAY_A ); // db call ok; no-cache ok. |
| 173 | |
| 174 | if ( is_array( $results ) && count( $results ) > 0 ) { |
| 175 | // add list names field to display form table. |
| 176 | foreach ( $results as $key => $form ) { |
| 177 | if ( SIB_Forms_Lang::check_form_trans( $form['id'] ) == true ) { |
| 178 | unset( $results[ $key ] ); |
| 179 | continue; |
| 180 | } |
| 181 | $listIDs = maybe_unserialize( $form['listID'] ); |
| 182 | $listIDs = !empty($listIDs) ? $listIDs : array(); |
| 183 | // get names form id array. |
| 184 | $lists = SIB_API_Manager::get_lists(); // pair of id and name. |
| 185 | |
| 186 | $listNames = array(); |
| 187 | foreach ( $lists as $list ) { |
| 188 | if ( in_array( $list['id'], $listIDs ) ) { |
| 189 | $listNames[] = $list['name']; |
| 190 | } |
| 191 | } |
| 192 | $results[ $key ]['listName'] = implode( ',', $listNames ); |
| 193 | $results[ $key ]['listID'] = $listIDs; |
| 194 | } |
| 195 | return $results; |
| 196 | } |
| 197 | return array(); |
| 198 | |
| 199 | } |
| 200 | |
| 201 | /** |
| 202 | * Add new form |
| 203 | * |
| 204 | * @param array $formData - form data. |
| 205 | * @return null|string |
| 206 | */ |
| 207 | public static function addForm( $formData ) { |
| 208 | global $wpdb; |
| 209 | |
| 210 | $current_date = date( 'Y-m-d' ); |
| 211 | |
| 212 | global $wpdb; |
| 213 | $query = 'INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME.' (title,html,css,dependTheme,listID,templateID,confirmID,isOpt,isDopt,redirectInEmail,redirectInForm,successMsg,errorMsg,existMsg,invalidMsg,requiredMsg,attributes,date,gCaptcha,gCaptcha_secret,gCaptcha_site,termAccept,termsURL) VALUES '; |
| 214 | $query .= ' (%s, %s, %s, %d, %s, %d, %d, %d, %d, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, %s, %s, %d, %s)'; |
| 215 | |
| 216 | $query = $wpdb->prepare($query,array($formData['title'],$formData['html'],$formData['css'],$formData['dependTheme'],$formData['listID'], |
| 217 | $formData['templateID'],$formData['confirmID'],$formData['isOpt'],$formData['isDopt'],$formData['redirectInEmail'],$formData['redirectInForm'], |
| 218 | $formData['successMsg'],$formData['errorMsg'],$formData['existMsg'],$formData['invalidMsg'],$formData['requiredMsg'],$formData['attributes'],$current_date,$formData['gcaptcha'],$formData['gcaptcha_secret'] ,$formData['gcaptcha_site'],$formData['termAccept'],$formData['termsURL'])); |
| 219 | |
| 220 | $wpdb->query( $query ); // db call ok; no-cache ok. |
| 221 | $index = $wpdb->get_var( 'SELECT LAST_INSERT_ID();' ); // db call ok; no-cache ok. |
| 222 | return $index; |
| 223 | } |
| 224 | |
| 225 | /** |
| 226 | * Update form |
| 227 | * |
| 228 | * @param int $formID - form ID. |
| 229 | * @param array $formData - form data. |
| 230 | * @return bool |
| 231 | */ |
| 232 | public static function updateForm( $formID, $formData ) { |
| 233 | global $wpdb; |
| 234 | |
| 235 | $current_date = date( 'Y-m-d' ); |
| 236 | |
| 237 | global $wpdb; |
| 238 | |
| 239 | $query = 'UPDATE ' . $wpdb->prefix . self::TABLE_NAME ; |
| 240 | $query .= " set title = %s, html = %s, css = %s, dependTheme = %d, listID = %s, templateID = %d, confirmID = %d, isOpt = %d, isDopt = %d, redirectInEmail = %s, redirectInForm = %s, successMsg = %s, errorMsg = %s, existMsg = %s, invalidMsg = %s, requiredMsg = %s, attributes = %s, date = %s, gCaptcha = %d, gCaptcha_secret = %s, gCaptcha_site = %s, termAccept = %d, termsURL = %s"; |
| 241 | $query .= ' where id= %d'; |
| 242 | |
| 243 | $query = $wpdb->prepare( $query ,array($formData['title'],$formData['html'],$formData['css'],$formData['dependTheme'],$formData['listID'], |
| 244 | $formData['templateID'],$formData['confirmID'],$formData['isOpt'],$formData['isDopt'],$formData['redirectInEmail'],$formData['redirectInForm'], |
| 245 | $formData['successMsg'],$formData['errorMsg'],$formData['existMsg'],$formData['invalidMsg'],$formData['requiredMsg'],$formData['attributes'],$current_date,$formData['gcaptcha'],$formData['gcaptcha_secret'] ,$formData['gcaptcha_site'],$formData['termAccept'],$formData['termsURL'], esc_sql($formID))); |
| 246 | |
| 247 | |
| 248 | $wpdb->query( $query ); // db call ok; no-cache ok. |
| 249 | |
| 250 | return true; |
| 251 | } |
| 252 | |
| 253 | /** |
| 254 | * Remove form |
| 255 | * |
| 256 | * @param int $id - target form id. |
| 257 | */ |
| 258 | public static function deleteForm( $id ) { |
| 259 | global $wpdb; |
| 260 | |
| 261 | $wpdb->delete( |
| 262 | $wpdb->prefix . self::TABLE_NAME, |
| 263 | array( |
| 264 | 'id' => $id, |
| 265 | ) |
| 266 | ); // db call ok; no-cache ok. |
| 267 | } |
| 268 | |
| 269 | /** Clear forms data */ |
| 270 | public static function removeAllForms() { |
| 271 | global $wpdb; |
| 272 | $wpdb->query( 'TRUNCATE TABLE ' . $wpdb->prefix . self::TABLE_NAME ); // db call ok; no-cache ok. |
| 273 | return true; |
| 274 | } |
| 275 | |
| 276 | /** Create default form */ |
| 277 | public static function createDefaultForm() { |
| 278 | $formData = self::getDefaultForm(); |
| 279 | $html = $formData['html']; |
| 280 | $css = $formData['css']; |
| 281 | $list = maybe_serialize( array( SIB_API_Manager::get_default_list_id() ) ); |
| 282 | $current_date = date( 'Y-m-d' ); |
| 283 | $attributes = 'email,NAME'; |
| 284 | global $wpdb; |
| 285 | $query = 'INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME . ' '; |
| 286 | $deafult_form_name = esc_attr( __( 'Default Form', 'sib_lang' ) ); |
| 287 | $query .= '(title,html,css,listID,dependTheme,successMsg,errorMsg,existMsg,invalidMsg,requiredMsg,attributes,date,isDefault) '; |
| 288 | $query .= "VALUES ('{$deafult_form_name}','{$html}','{$css}','{$list}','1','{$formData['successMsg']}','{$formData['errorMsg']}','{$formData['existMsg']}','{$formData['invalidMsg']}','{$formData['requiredMsg']}','{$attributes}','{$current_date}','1')"; |
| 289 | $wpdb->query( $query ); // db call ok; no-cache ok. |
| 290 | } |
| 291 | |
| 292 | /** Get default form data */ |
| 293 | public static function getDefaultForm() { |
| 294 | $html = <<<EOD |
| 295 | <p class="sib-email-area"> |
| 296 | <label class="sib-email-area">Email Address*</label> |
| 297 | <input type="email" class="sib-email-area" name="email" required="required"> |
| 298 | </p> |
| 299 | <p class="sib-NAME-area"> |
| 300 | <label class="sib-NAME-area">Name</label> |
| 301 | <input type="text" class="sib-NAME-area" name="NAME" > |
| 302 | </p> |
| 303 | <p> |
| 304 | <input type="submit" class="sib-default-btn" value="Subscribe"> |
| 305 | </p> |
| 306 | EOD; |
| 307 | $css = <<<EOD |
| 308 | [form] { |
| 309 | padding: 5px; |
| 310 | -moz-box-sizing:border-box; |
| 311 | -webkit-box-sizing: border-box; |
| 312 | box-sizing: border-box; |
| 313 | } |
| 314 | [form] input[type=text],[form] input[type=email], [form] select { |
| 315 | width: 100%; |
| 316 | border: 1px solid #bbb; |
| 317 | height: auto; |
| 318 | margin: 5px 0 0 0; |
| 319 | } |
| 320 | [form] .sib-default-btn { |
| 321 | margin: 5px 0; |
| 322 | padding: 6px 12px; |
| 323 | color:#fff; |
| 324 | background-color: #333; |
| 325 | border-color: #2E2E2E; |
| 326 | font-size: 14px; |
| 327 | font-weight:400; |
| 328 | line-height: 1.4285; |
| 329 | text-align: center; |
| 330 | cursor: pointer; |
| 331 | vertical-align: middle; |
| 332 | -webkit-user-select:none; |
| 333 | -moz-user-select:none; |
| 334 | -ms-user-select:none; |
| 335 | user-select:none; |
| 336 | white-space: normal; |
| 337 | border:1px solid transparent; |
| 338 | border-radius: 3px; |
| 339 | } |
| 340 | [form] .sib-default-btn:hover { |
| 341 | background-color: #444; |
| 342 | } |
| 343 | [form] p{ |
| 344 | margin: 10px 0 0 0; |
| 345 | } |
| 346 | EOD; |
| 347 | |
| 348 | $result = array( |
| 349 | 'html' => $html, |
| 350 | 'css' => $css, |
| 351 | 'successMsg' => esc_attr( __( 'Thank you, you have successfully registered !', 'sib_lang' ) ), |
| 352 | 'errorMsg' => esc_attr( __( 'Something wrong occured', 'sib_lang' ) ), |
| 353 | 'existMsg' => esc_attr( __( 'You have already registered', 'sib_lang' ) ), |
| 354 | 'invalidMsg' => esc_attr( __( 'Your email address is invalid', 'sib_lang' ) ), |
| 355 | 'requiredMsg' => esc_attr(__('Please fill out this field', 'sib_lang')) |
| 356 | ); |
| 357 | return $result; |
| 358 | } |
| 359 | |
| 360 | /** Get Default css */ |
| 361 | public static function getDefaultMessageCss() { |
| 362 | $css = <<<EOD |
| 363 | [form] p.sib-alert-message { |
| 364 | padding: 6px 12px; |
| 365 | margin-bottom: 20px; |
| 366 | border: 1px solid transparent; |
| 367 | border-radius: 4px; |
| 368 | -webkit-box-sizing: border-box; |
| 369 | -moz-box-sizing: border-box; |
| 370 | box-sizing: border-box; |
| 371 | } |
| 372 | [form] p.sib-alert-message-error { |
| 373 | background-color: #f2dede; |
| 374 | border-color: #ebccd1; |
| 375 | color: #a94442; |
| 376 | } |
| 377 | [form] p.sib-alert-message-success { |
| 378 | background-color: #dff0d8; |
| 379 | border-color: #d6e9c6; |
| 380 | color: #3c763d; |
| 381 | } |
| 382 | [form] p.sib-alert-message-warning { |
| 383 | background-color: #fcf8e3; |
| 384 | border-color: #faebcc; |
| 385 | color: #8a6d3b; |
| 386 | } |
| 387 | EOD; |
| 388 | return $css; |
| 389 | |
| 390 | } |
| 391 | |
| 392 | /** |
| 393 | * Get form data of old version |
| 394 | * We suppose that the clients have got own setting values for form. |
| 395 | * If the client have default setting only then it will be return error. |
| 396 | * This function will be removed after next version |
| 397 | */ |
| 398 | public static function get_old_form() { |
| 399 | // create form from old version. |
| 400 | $form_settings = get_option( 'sib_subscription_option' ); |
| 401 | $html = $form_settings['sib_form_html']; |
| 402 | $avail_atts = $form_settings['available_attributes']; |
| 403 | |
| 404 | $signup_settings = get_option( 'sib_signup_option' ); |
| 405 | $is_confirm_email = 'yes' == $signup_settings['is_confirm_email'] ? 1 : 0; |
| 406 | $is_double_optin = 'yes' == $signup_settings['is_double_optin'] ? 1 : 0; |
| 407 | $redirect_url = $signup_settings['redirect_url']; |
| 408 | $redirect_url_click = $signup_settings['redirect_url_click']; |
| 409 | $template_id = 1 == $is_confirm_email ? $signup_settings['template_id'] : $signup_settings['doubleoptin_template_id']; |
| 410 | |
| 411 | $confirmMsg = get_option( 'sib_confirm_option' ); |
| 412 | |
| 413 | $homeSetting = get_option( 'sib_home_option' ); |
| 414 | $sib_list = maybe_serialize( array( (string) $homeSetting['list_id'] ) ); |
| 415 | |
| 416 | $formData = array( |
| 417 | 'title' => 'Old Form', |
| 418 | 'html' => $html, |
| 419 | 'css' => '', |
| 420 | 'dependTheme' => '1', |
| 421 | 'listID' => $sib_list, |
| 422 | 'templateID' => $template_id, |
| 423 | 'isOpt' => $is_confirm_email, |
| 424 | 'isDopt' => $is_double_optin, |
| 425 | 'redirectInEmail' => $redirect_url, |
| 426 | 'redirectInForm' => $redirect_url_click, |
| 427 | 'successMsg' => $confirmMsg['alert_success_message'], |
| 428 | 'errorMsg' => $confirmMsg['alert_error_message'], |
| 429 | 'existMsg' => $confirmMsg['alert_exist_subscriber'], |
| 430 | 'invalidMsg' => $confirmMsg['alert_invalid_email'], |
| 431 | 'attributes' => 'email,' . implode( ',', $avail_atts ), |
| 432 | ); |
| 433 | |
| 434 | return $formData; |
| 435 | } |
| 436 | |
| 437 | /** Add prefix to the table */ |
| 438 | public static function add_prefix() { |
| 439 | global $wpdb; |
| 440 | if ( $wpdb->get_var( "SHOW TABLES LIKE '" . self::TABLE_NAME . "'" ) == self::TABLE_NAME ) { |
| 441 | $query = 'ALTER TABLE ' . self::TABLE_NAME . ' RENAME TO ' . $wpdb->prefix . self::TABLE_NAME . ';'; |
| 442 | $wpdb->query( $query ); // db call ok; no-cache ok. |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | /** Change datatype of attribute column*/ |
| 447 | public static function modify_datatype() { |
| 448 | global $wpdb; |
| 449 | $tableStructure = $wpdb->get_results( "DESC " . $wpdb->prefix . self::TABLE_NAME ); |
| 450 | foreach ($tableStructure as $key => $value) |
| 451 | { |
| 452 | if($value->Field == "attributes" && $value->Type == "varchar(255)") |
| 453 | $wpdb->query("ALTER TABLE ". $wpdb->prefix . self::TABLE_NAME." MODIFY ".$value->Field." TEXT DEFAULT NULL"); |
| 454 | } |
| 455 | } |
| 456 | |
| 457 | } |
| 458 | } |
| 459 |