Changeset 1927525
- Timestamp:
- 08/20/2018 05:51:11 PM (8 years ago)
- Location:
- easy-countdown-timer/trunk
- Files:
-
- 2 edited
-
ect.php (modified) (7 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-countdown-timer/trunk/ect.php
r1849590 r1927525 7 7 You can add infinite shortcodes. 8 8 Author: Ciprian Turcu 9 Version: 2. 29 Version: 2.3 10 10 Author URI: http://www.ciprianturcu.com 11 11 tags: countdown, ticker,timer,live, clock, second, minute, hour, day, week, month, year, color, size, pixel, animated, custom, easy, help, minus react plugin, shortcode, widget,countdown system, countdown generator, generator, no jQuery, event … … 13 13 */ 14 14 15 error_reporting(E_ALL); ini_set('display_errors', '1');16 $ectKs = md5(NONCE_KEY.'ect');17 $ectTableName = $wpdb->prefix .'ect_timers';15 // error_reporting(E_ALL); ini_set('display_errors', '1'); 16 $ectKs = md5(NONCE_KEY.'ect'); 17 $ectTableName = 'ect_timers'; 18 18 19 19 // Register style sheet. … … 56 56 add_shortcode( 'ectSc', 'ectShortAll'); 57 57 function ectShortAll($atts){ 58 global $ectTableName;59 global $wpdb;58 global $wpdb; 59 $ectTableName = $wpdb->prefix.'ect_timers'; 60 60 if(!isset($atts['id'])){ 61 61 return; … … 167 167 } 168 168 global $wpdb; 169 global $ectTableName; 169 $ectTableName = $wpdb->prefix.'ect_timers'; 170 170 171 $all=$wpdb->get_results( "SELECT * FROM ".$ectTableName.";"); 171 172 … … 182 183 // add timer CALLBACK 183 184 function ect_rest_add_timers_callback($data){ 184 global $ect TableName;185 global $ ectKs;185 global $ectKs; 186 global $wpdb; 186 187 if($data['ectKs']!=$ectKs){ 187 188 return ['status'=>'Key invalid']; 188 189 } 189 190 global $wpdb; 191 $ectTableName = $wpdb->prefix.'ect_timers'; 190 192 191 193 $newArr = []; … … 210 212 global $wpdb; 211 213 global $ectKs; 212 global $ectTableName;214 $ectTableName = 'ect_timers'; 213 215 214 216 $timerID = $data['timerID']; … … 223 225 // custom database table 224 226 function ect_db_install() { 225 global $wpdb; 226 global $ectTableName; 227 $charset_collate = $wpdb->get_charset_collate(); 228 229 $sql = "CREATE TABLE $ectTableName 230 ( `ID` INT(9) NOT NULL AUTO_INCREMENT , 231 `allData` TEXT NOT NULL, 232 PRIMARY KEY (`ID`)) 233 ENGINE = InnoDB; 234 ) $charset_collate;"; 235 236 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 237 dbDelta( $sql ); 227 global $table_prefix, $wpdb; 228 global $wpdb; 229 $ectTableName = 'ect_timers'; 230 $table_name = $wpdb->prefix . $ectTableName; 231 $wpdb_collate = $wpdb->collate; 232 $sql = 233 "CREATE TABLE {$table_name} ( 234 `ID` INT(9) NOT NULL AUTO_INCREMENT , 235 `allData` TEXT NOT NULL, 236 PRIMARY KEY (`ID`)) 237 COLLATE {$wpdb_collate}"; 238 239 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 240 dbDelta( $sql ); 238 241 239 242 } -
easy-countdown-timer/trunk/readme.txt
r1849590 r1927525 4 4 Tags: countdown, ticker,timer,live, clock, second, minute, hour, day, week, month, year, color, size, pixel, animated, custom, easy, help, minus react plugin, shortcode, widget,countdown system, countdown generator, generator, no jQuery, event 5 5 Requires at least: 4.6 6 Tested up to: 4.9. 47 Stable tag: 2. 26 Tested up to: 4.9.8 7 Stable tag: 2.3 8 8 Requires PHP: 5.2 9 9 License: GPLv2 or later … … 180 180 * Removed bold options 181 181 182 = 2.3 = 183 184 Plugin was not working, made it work again. 185 * database is created on activation 186 * Queries work 187 182 188 183 189 … … 258 264 WARNING! Database Data Has changed. Previous data will be lost! 259 265 266 = 2.3 = 267 268 Changes do not impact previous functionality 269 270
Note: See TracChangeset
for help on using the changeset viewer.