Plugin Directory

Changeset 1927525


Ignore:
Timestamp:
08/20/2018 05:51:11 PM (8 years ago)
Author:
turcuciprian
Message:

got plugin to work again

Location:
easy-countdown-timer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • easy-countdown-timer/trunk/ect.php

    r1849590 r1927525  
    77    You can add infinite shortcodes.
    88   Author: Ciprian Turcu
    9    Version: 2.2
     9   Version: 2.3
    1010   Author URI: http://www.ciprianturcu.com
    1111   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
     
    1313 */
    1414
    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';
    1818
    1919// Register style sheet.
     
    5656add_shortcode( 'ectSc', 'ectShortAll');
    5757function ectShortAll($atts){
    58     global  $ectTableName;
    59     global $wpdb;
     58    global $wpdb;
     59    $ectTableName = $wpdb->prefix.'ect_timers';
    6060    if(!isset($atts['id'])){
    6161        return;
     
    167167    }
    168168    global $wpdb;
    169     global $ectTableName;
     169    $ectTableName = $wpdb->prefix.'ect_timers';
     170
    170171    $all=$wpdb->get_results( "SELECT * FROM ".$ectTableName.";");
    171172
     
    182183// add timer CALLBACK
    183184function ect_rest_add_timers_callback($data){
    184     global $ectTableName;
    185     global $ectKs;
     185    global $ectKs;
     186    global $wpdb;
    186187    if($data['ectKs']!=$ectKs){
    187188        return ['status'=>'Key invalid'];
    188189    }
    189190    global $wpdb;
     191    $ectTableName = $wpdb->prefix.'ect_timers';
    190192
    191193    $newArr = [];
     
    210212    global $wpdb;
    211213    global $ectKs;
    212     global $ectTableName;
     214    $ectTableName = 'ect_timers';
    213215
    214216    $timerID = $data['timerID'];
     
    223225// custom database table
    224226function 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 );
    238241
    239242}
  • easy-countdown-timer/trunk/readme.txt

    r1849590 r1927525  
    44Tags: 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
    55Requires at least: 4.6
    6 Tested up to: 4.9.4
    7 Stable tag: 2.2
     6Tested up to: 4.9.8
     7Stable tag: 2.3
    88Requires PHP: 5.2
    99License: GPLv2 or later
     
    180180* Removed bold options
    181181
     182= 2.3 =
     183
     184Plugin was not working, made it work again.
     185* database is created on activation
     186* Queries work
     187
    182188
    183189
     
    258264WARNING! Database Data Has changed. Previous data will be lost!
    259265
     266= 2.3 =
     267
     268Changes do not impact previous functionality
     269
     270
Note: See TracChangeset for help on using the changeset viewer.