Changeset 3059614
- Timestamp:
- 03/27/2024 09:22:42 AM (22 months ago)
- Location:
- xtoool-ads-box/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
xtoool-ads-box.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
xtoool-ads-box/trunk/readme.txt
r3059560 r3059614 6 6 Requires at least: 5.3 7 7 Tested up to: 6.4.3 8 Stable tag: 1.0. 28 Stable tag: 1.0.3 9 9 Requires PHP: 5.4 10 10 License: GPLv3 -
xtoool-ads-box/trunk/xtoool-ads-box.php
r3059560 r3059614 4 4 Plugin URI: https://www.xtoool.com/wordpress/ 5 5 Description: Xtoool Ads Box helps you create High-converting product bars to engage customers and grow sales. 6 Version: 1.0. 26 Version: 1.0.3 7 7 Author: xtoool.com 8 8 Author URI: https://www.xtoool.com … … 35 35 define('XTPLB_URL', plugins_url('', __FILE__)); 36 36 define('XTPLB_BASE', plugin_basename(XTPLB_PATH)); 37 38 37 define('ADSBX_PLUGIN_NAME', basename(XTPLB_DIR) . '/xtoool-ads-box.php'); 39 38 40 39 class plbProductListForBlog{ 41 40 private static $instance = null; 42 41 public $db; 43 const XTPLB_VERSION = '1.0. 2';42 const XTPLB_VERSION = '1.0.3'; 44 43 public $AdsbxAdmin_obj = null; 45 44 … … 59 58 60 59 register_activation_hook(XTPLB_PATH, [$this, 'activate']); 60 add_action( 'upgrader_process_complete', [$this, 'my_upgrate_function'], 10, 2); 61 61 62 $this->_initScript(); 62 63 … … 65 66 $this->AdsbxAdmin_obj = new AdsbxAdmin($this); 66 67 new Shortcode($this); 68 } 69 70 public function my_upgrate_function( $upgrader_object, $options ) { 71 72 if ($options['action'] !== 'update' || $options['type'] !== 'plugin') { 73 return; 74 } 75 76 if (! in_array(ADSBX_PLUGIN_NAME, $options['plugins'] ?? [])) { 77 return; 78 } 79 80 if(self::XTPLB_VERSION == '1.0.3'){ 81 $this->_update_1_0_3(); 82 } 83 84 } 85 86 private function _update_1_0_3(){ 87 global $wpdb; 88 $sql4 = 'CREATE TABLE if not exists `' . $wpdb->prefix . 'products_banner_blog` ( 89 `id` int(11) NOT NULL AUTO_INCREMENT, 90 `name` varchar(255) NOT NULL default "", 91 `image_url` varchar(255) NOT NULL default "", 92 `regular_price` varchar(25) NOT NULL default "", 93 `price` varchar(25) NOT NULL default "", 94 `title` varchar(255) NOT NULL default "", 95 `desc` text default null, 96 `shop_btn_text` varchar(255) NOT NULL default "", 97 `shop_btn_link` varchar(1000) NOT NULL default "", 98 `sub_btn_text` varchar(255) NOT NULL default "", 99 `sub_btn_link` varchar(1000) NOT NULL default "", 100 `added_by` int(11) not null default 0, 101 `added_date` datetime default null, 102 `updated_by` int(11) not null default 0, 103 `updated_date` datetime default null, 104 105 PRIMARY KEY (`id`) 106 ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;'; 107 $wpdb->query($sql4); 67 108 } 68 109
Note: See TracChangeset
for help on using the changeset viewer.