Changeset 3304399
- Timestamp:
- 06/01/2025 05:41:51 PM (9 months ago)
- Location:
- wp24-domain-check/trunk
- Files:
-
- 1 added
- 5 edited
-
assets/inc/class-whoisservers.php (modified) (1 diff)
-
includes/class-wp24-options.php (modified) (1 diff)
-
includes/class-wp24-settings.php (modified) (3 diffs)
-
includes/class-wp24-setup.php (added)
-
readme.txt (modified) (2 diffs)
-
wp24-domain-check.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp24-domain-check/trunk/assets/inc/class-whoisservers.php
r3237418 r3304399 1121 1121 'reise' => array('host' => 'whois.nic.reise', 'free' => 'not found'), 1122 1122 'reisen' => array('host' => 'whois.donuts.co', 'free' => 'domain not found.'), 1123 'ren' => array('host' => 'whois.nic.ren', 'free' => 'object does not exist'), 1123 1124 'rentals' => array('host' => 'whois.donuts.co', 'free' => 'domain not found.'), 1124 1125 'repair' => array('host' => 'whois.donuts.co', 'free' => 'domain not found'), -
wp24-domain-check/trunk/includes/class-wp24-options.php
r2878635 r3304399 154 154 155 155 // backward compatibility with v1.8.1 156 if ( ! isset( $options['woocommerce']['addToCartBehaviour'] ) && $options['woocommerce']['redirectToCart'] )156 if ( isset( $options['woocommerce'] ) && ! isset( $options['woocommerce']['addToCartBehaviour'] ) && $options['woocommerce']['redirectToCart'] ) 157 157 $options['woocommerce']['addToCartBehaviour'] = 0; 158 158 -
wp24-domain-check/trunk/includes/class-wp24-settings.php
r3237418 r3304399 99 99 */ 100 100 public function init() { 101 add_action( 'plugins_loaded', array( $this, 'update_database' ) );102 101 add_action( 'upgrader_process_complete', array( $this, 'update_plugin' ), 10, 2 ); 103 102 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); … … 105 104 add_action( 'admin_init', array( $this, 'init_settings' ) ); 106 105 add_action( 'admin_menu', array( $this, 'init_menu' ) ); 107 }108 109 /**110 * Check database version and update if necessary.111 *112 * @return void113 */114 public function update_database() {115 if ( ! isset( $this->options['database_version'] ) ||116 version_compare( $this->options['database_version'], WP24_DOMAIN_CHECK_DATABASE_VERSION ) == -1 ) {117 global $wpdb;118 119 $charset_collate = $wpdb->get_charset_collate();120 121 $table_name = $wpdb->prefix . 'wp24_whois_queries';122 $sql[] = "CREATE TABLE $table_name (123 id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,124 limit_group varchar(25) NOT NULL,125 query_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,126 query_count smallint(5) DEFAULT 1 NOT NULL,127 PRIMARY KEY (id)128 ) $charset_collate;";129 130 $table_name = $wpdb->prefix . 'wp24_tld_prices_links';131 $sql[] = "CREATE TABLE $table_name (132 tld varchar(25) NOT NULL,133 price varchar(25),134 link text,135 price_transfer varchar(25),136 link_transfer text,137 PRIMARY KEY (tld)138 ) $charset_collate;";139 140 $table_name = $wpdb->prefix . 'wp24_tld_woocommerce';141 $sql[] = "CREATE TABLE $table_name (142 tld varchar(25) NOT NULL,143 product_id_purchase bigint(20),144 product_id_transfer bigint(20),145 PRIMARY KEY (tld)146 ) $charset_collate;";147 148 $table_name = $wpdb->prefix . 'wp24_whois_servers';149 $sql[] = "CREATE TABLE $table_name (150 tld varchar(25) NOT NULL,151 host varchar(100),152 status_free varchar(200),153 PRIMARY KEY (tld)154 ) $charset_collate;";155 156 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );157 dbDelta( $sql );158 159 $this->options['database_version'] = WP24_DOMAIN_CHECK_DATABASE_VERSION;160 update_option( 'wp24_domaincheck', $this->options );161 }162 106 } 163 107 … … 2242 2186 } 2243 2187 2244 /**2245 * Uninstall plugin.2246 *2247 * @return void2248 */2249 public static function uninstall() {2250 global $wpdb;2251 2252 // drop tables2253 $table_name = $wpdb->prefix . 'wp24_whois_queries';2254 $sql = "DROP TABLE IF EXISTS $table_name";2255 $wpdb->query( $sql );2256 $table_name = $wpdb->prefix . 'wp24_tld_prices_links';2257 $sql = "DROP TABLE IF EXISTS $table_name";2258 $wpdb->query( $sql );2259 $table_name = $wpdb->prefix . 'wp24_tld_woocommerce';2260 $sql = "DROP TABLE IF EXISTS $table_name";2261 $wpdb->query( $sql );2262 $table_name = $wpdb->prefix . 'wp24_whois_servers';2263 $sql = "DROP TABLE IF EXISTS $table_name";2264 $wpdb->query( $sql );2265 2266 // delete all settings2267 delete_option( 'wp24_domaincheck' );2268 }2269 2270 2188 } -
wp24-domain-check/trunk/readme.txt
r3237418 r3304399 2 2 Contributors: wp24dotorg 3 3 Donate link: https://wp24.org/donate 4 Tags: domain check, domain checker, domain, whois4 Tags: domaincheck, domain check, domain checker, domain, whois 5 5 Requires at least: 5.0 6 Tested up to: 6. 77 Stable tag: 1.11. 06 Tested up to: 6.8 7 Stable tag: 1.11.1 8 8 Requires PHP: 7.0.0 9 9 License: GPLv2 … … 53 53 == Changelog == 54 54 55 = 1.11.1 = 56 * Minor bug fixes 57 55 58 = 1.11.0 = 56 59 * WooCommerce variable and grouped products -
wp24-domain-check/trunk/wp24-domain-check.php
r3237418 r3304399 4 4 * Plugin URI: https://wp24.org/plugins/domain-check 5 5 * Description: Check (whois) domain names for availability. Easy integration via shortcode or widget. 6 * Version: 1.11. 06 * Version: 1.11.1 7 7 * Author: WP24 8 8 * Author URI: https://wp24.org … … 18 18 19 19 if ( ! defined( 'WP24_DOMAIN_CHECK_VERSION' ) ) 20 define( 'WP24_DOMAIN_CHECK_VERSION', '1.11. 0' );20 define( 'WP24_DOMAIN_CHECK_VERSION', '1.11.1' ); 21 21 22 22 if ( ! defined( 'WP24_DOMAIN_CHECK_DATABASE_VERSION' ) ) … … 30 30 require_once( plugin_dir_path( __FILE__ ) . '/includes/class-wp24-widget.php' ); 31 31 32 if ( is_admin() ) { 33 if ( ! class_exists( 'WP24_Domain_Check_Setup' ) ) 34 require_once( plugin_dir_path( __FILE__ ) . '/includes/class-wp24-setup.php' ); 35 36 add_action( 'plugins_loaded', function() { 37 WP24_Domain_Check_Setup::update_database(); 38 } ); 39 40 register_uninstall_hook( __FILE__, array( 'WP24_Domain_Check_Setup', 'uninstall' ) ); 41 } 42 32 43 add_action( 'init', function() { 33 load_plugin_textdomain( 'wp24-domain-check', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );34 35 44 // create and init domain check 36 45 $wp24_domain_check = new WP24_Domain_Check(); … … 46 55 } 47 56 } ); 48 49 register_uninstall_hook( __FILE__, array( 'WP24_Domain_Check_Settings', 'uninstall' ) );
Note: See TracChangeset
for help on using the changeset viewer.