Changeset 3823932
- Timestamp:
- 11/25/2026 08:23:54 PM (less than one hour ago)
- Location:
- amin-chat-button
- Files:
-
- 2 edited
- 5 copied
-
tags/1.5.12 (copied) (copied from amin-chat-button/trunk )
-
tags/1.5.12/admin.css (copied) (copied from amin-chat-button/trunk/admin.css )
-
tags/1.5.12/chat-button.php (copied) (copied from amin-chat-button/trunk/chat-button.php ) (4 diffs)
-
tags/1.5.12/readme.txt (copied) (copied from amin-chat-button/trunk/readme.txt ) (3 diffs)
-
tags/1.5.12/uninstall.php (copied) (copied from amin-chat-button/trunk/uninstall.php )
-
trunk/chat-button.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
amin-chat-button/tags/1.5.12/chat-button.php
r3823846 r3823932 4 4 * Plugin URI: https://wordpress.org/plugins/amin-chat-button/ 5 5 * Description: WhatsApp Chat🔥. Adds a pulsating WhatsApp or Telegram button 🍀 to your website. Fast and easy installation. Setting up target id GTM and YandexMetrics. Setting pre-filled Message. 6 * Version: 1.5.1 16 * Version: 1.5.12 7 7 * Requires at least: 5.6 8 8 * Requires PHP: 7.0 … … 18 18 } 19 19 20 define('AMIN_CHAT_BUTTON_VERSION', '1.5.1 1');20 define('AMIN_CHAT_BUTTON_VERSION', '1.5.12'); 21 21 22 22 /** … … 434 434 } 435 435 436 /** 437 * URL of the page being viewed. 438 * 439 * Scheme and host come from the site settings rather than the Host header; 440 * the path and query come from the request. The home path is not prepended, 441 * because the request path already contains it (a subdirectory install or a 442 * language prefix in the home URL would otherwise be doubled). 443 * 444 * @return string Current URL, or an empty string when it cannot be determined. 445 */ 446 function amin_chat_button_current_url() { 447 if (!isset($_SERVER['REQUEST_URI'])) { 448 return ''; 449 } 450 451 $request_uri = esc_url_raw(wp_unslash($_SERVER['REQUEST_URI'])); 452 $home = wp_parse_url(home_url()); 453 454 if (empty($home['host'])) { 455 return $request_uri; 456 } 457 458 $origin = (isset($home['scheme']) ? $home['scheme'] : 'https') . '://' . $home['host']; 459 if (isset($home['port'])) { 460 $origin .= ':' . $home['port']; 461 } 462 463 return $origin . $request_uri; 464 } 465 436 466 function amin_chat_button_plugin_add_button() { 437 467 if (get_option('amin_chat_button_plugin_enabled', '0') !== '1') return; … … 461 491 ); 462 492 463 // Current URL, built by core instead of raw $_SERVER input 464 $current_url = home_url(add_query_arg(array(), null)); 493 $current_url = amin_chat_button_current_url(); 465 494 466 495 // Do not display the button on prohibited URLs -
amin-chat-button/tags/1.5.12/readme.txt
r3823846 r3823932 4 4 Requires at least: 5.6 5 5 Tested up to: 7.2 6 Stable tag: 1.5.1 16 Stable tag: 1.5.12 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 71 71 == Upgrade Notice == 72 72 73 = 1.5.12 = 74 Important fix: since 1.5.9 the plugin did not see the address of the current page, so "Prohibited URLs" and the per-language phone number and message had no effect. Please update. 75 73 76 = 1.5.11 = 74 77 Compatibility with WordPress 7.2. Security hardening of the button click handler and fixes for the prohibited URLs list, the direct link mode, the localization codes and the default button position. … … 81 84 82 85 == Changelog == 86 87 = 1.5.12 = 88 * Fixed a regression introduced in 1.5.9: the address of the current page was not detected, so the button was shown on pages listed in "Prohibited URLs", and the phone number, message and link for other localizations were not applied. 89 * The current address no longer repeats the home path on sites installed in a subdirectory or with a language prefix in the site address. 83 90 84 91 = 1.5.11 = -
amin-chat-button/trunk/chat-button.php
r3823846 r3823932 4 4 * Plugin URI: https://wordpress.org/plugins/amin-chat-button/ 5 5 * Description: WhatsApp Chat🔥. Adds a pulsating WhatsApp or Telegram button 🍀 to your website. Fast and easy installation. Setting up target id GTM and YandexMetrics. Setting pre-filled Message. 6 * Version: 1.5.1 16 * Version: 1.5.12 7 7 * Requires at least: 5.6 8 8 * Requires PHP: 7.0 … … 18 18 } 19 19 20 define('AMIN_CHAT_BUTTON_VERSION', '1.5.1 1');20 define('AMIN_CHAT_BUTTON_VERSION', '1.5.12'); 21 21 22 22 /** … … 434 434 } 435 435 436 /** 437 * URL of the page being viewed. 438 * 439 * Scheme and host come from the site settings rather than the Host header; 440 * the path and query come from the request. The home path is not prepended, 441 * because the request path already contains it (a subdirectory install or a 442 * language prefix in the home URL would otherwise be doubled). 443 * 444 * @return string Current URL, or an empty string when it cannot be determined. 445 */ 446 function amin_chat_button_current_url() { 447 if (!isset($_SERVER['REQUEST_URI'])) { 448 return ''; 449 } 450 451 $request_uri = esc_url_raw(wp_unslash($_SERVER['REQUEST_URI'])); 452 $home = wp_parse_url(home_url()); 453 454 if (empty($home['host'])) { 455 return $request_uri; 456 } 457 458 $origin = (isset($home['scheme']) ? $home['scheme'] : 'https') . '://' . $home['host']; 459 if (isset($home['port'])) { 460 $origin .= ':' . $home['port']; 461 } 462 463 return $origin . $request_uri; 464 } 465 436 466 function amin_chat_button_plugin_add_button() { 437 467 if (get_option('amin_chat_button_plugin_enabled', '0') !== '1') return; … … 461 491 ); 462 492 463 // Current URL, built by core instead of raw $_SERVER input 464 $current_url = home_url(add_query_arg(array(), null)); 493 $current_url = amin_chat_button_current_url(); 465 494 466 495 // Do not display the button on prohibited URLs -
amin-chat-button/trunk/readme.txt
r3823846 r3823932 4 4 Requires at least: 5.6 5 5 Tested up to: 7.2 6 Stable tag: 1.5.1 16 Stable tag: 1.5.12 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 71 71 == Upgrade Notice == 72 72 73 = 1.5.12 = 74 Important fix: since 1.5.9 the plugin did not see the address of the current page, so "Prohibited URLs" and the per-language phone number and message had no effect. Please update. 75 73 76 = 1.5.11 = 74 77 Compatibility with WordPress 7.2. Security hardening of the button click handler and fixes for the prohibited URLs list, the direct link mode, the localization codes and the default button position. … … 81 84 82 85 == Changelog == 86 87 = 1.5.12 = 88 * Fixed a regression introduced in 1.5.9: the address of the current page was not detected, so the button was shown on pages listed in "Prohibited URLs", and the phone number, message and link for other localizations were not applied. 89 * The current address no longer repeats the home path on sites installed in a subdirectory or with a language prefix in the site address. 83 90 84 91 = 1.5.11 =
Note:
See TracChangeset
for help on using the changeset viewer.