Plugin Directory

Changeset 3488240


Ignore:
Timestamp:
03/22/2026 02:15:32 PM (13 days ago)
Author:
list2play
Message:

List2Play Servers 1.0.4: auto-migrate API URL from list2play.com for existing installs

Location:
list2play-servers
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • list2play-servers/tags/1.0.4/README.txt

    r3488239 r3488240  
    44Requires at least: 5.8
    55Tested up to: 6.9
    6 Stable tag: 1.0.3
     6Stable tag: 1.0.4
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    309309== Changelog ==
    310310
     311= 1.0.4 =
     312* **Upgrade migration**: If the API Base URL was saved as the old domain, it is automatically rewritten to **list2play.net** on load (fixes charts/API for existing sites without manual settings change).
     313
    311314= 1.0.3 =
    312315* **API URL defaults**: All remaining default URLs, admin links, and JS fallbacks now use **https://list2play.net** (fixes charts and API calls when the stored option still pointed at the old domain).
  • list2play-servers/tags/1.0.4/list2play-servers.php

    r3488239 r3488240  
    44 * Plugin URI: https://list2play.net
    55 * Description: Display List2Play game servers on your WordPress site with beautiful, customizable layouts. Select which servers to display via admin panel, use shortcode, widget, or Gutenberg block.
    6  * Version: 1.0.3
     6 * Version: 1.0.4
    77 * Author: List2Play
    88 * License: GPL v2 or later
     
    1919
    2020// Define plugin constants
    21 define('LIST2PLAY_SERVERS_VERSION', '1.0.3');
     21define('LIST2PLAY_SERVERS_VERSION', '1.0.4');
    2222define('LIST2PLAY_SERVERS_PLUGIN_DIR', plugin_dir_path(__FILE__));
    2323define('LIST2PLAY_SERVERS_PLUGIN_URL', plugin_dir_url(__FILE__));
     
    3838register_activation_hook(__FILE__, ['List2Play_Servers_Activator', 'activate']);
    3939register_deactivation_hook(__FILE__, ['List2Play_Servers_Deactivator', 'deactivate']);
     40
     41/**
     42 * Migrate stored API base URL from list2play.com to list2play.net (existing installs).
     43 */
     44add_action('plugins_loaded', static function (): void {
     45    $url = (string) get_option('list2play_api_base_url', '');
     46    if ($url !== '' && strpos($url, 'list2play.com') !== false) {
     47        update_option('list2play_api_base_url', str_replace('list2play.com', 'list2play.net', $url));
     48    }
     49}, 0);
    4050
    4151/**
  • list2play-servers/trunk/README.txt

    r3488239 r3488240  
    44Requires at least: 5.8
    55Tested up to: 6.9
    6 Stable tag: 1.0.3
     6Stable tag: 1.0.4
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    309309== Changelog ==
    310310
     311= 1.0.4 =
     312* **Upgrade migration**: If the API Base URL was saved as the old domain, it is automatically rewritten to **list2play.net** on load (fixes charts/API for existing sites without manual settings change).
     313
    311314= 1.0.3 =
    312315* **API URL defaults**: All remaining default URLs, admin links, and JS fallbacks now use **https://list2play.net** (fixes charts and API calls when the stored option still pointed at the old domain).
  • list2play-servers/trunk/list2play-servers.php

    r3488239 r3488240  
    44 * Plugin URI: https://list2play.net
    55 * Description: Display List2Play game servers on your WordPress site with beautiful, customizable layouts. Select which servers to display via admin panel, use shortcode, widget, or Gutenberg block.
    6  * Version: 1.0.3
     6 * Version: 1.0.4
    77 * Author: List2Play
    88 * License: GPL v2 or later
     
    1919
    2020// Define plugin constants
    21 define('LIST2PLAY_SERVERS_VERSION', '1.0.3');
     21define('LIST2PLAY_SERVERS_VERSION', '1.0.4');
    2222define('LIST2PLAY_SERVERS_PLUGIN_DIR', plugin_dir_path(__FILE__));
    2323define('LIST2PLAY_SERVERS_PLUGIN_URL', plugin_dir_url(__FILE__));
     
    3838register_activation_hook(__FILE__, ['List2Play_Servers_Activator', 'activate']);
    3939register_deactivation_hook(__FILE__, ['List2Play_Servers_Deactivator', 'deactivate']);
     40
     41/**
     42 * Migrate stored API base URL from list2play.com to list2play.net (existing installs).
     43 */
     44add_action('plugins_loaded', static function (): void {
     45    $url = (string) get_option('list2play_api_base_url', '');
     46    if ($url !== '' && strpos($url, 'list2play.com') !== false) {
     47        update_option('list2play_api_base_url', str_replace('list2play.com', 'list2play.net', $url));
     48    }
     49}, 0);
    4050
    4151/**
Note: See TracChangeset for help on using the changeset viewer.