Changeset 3449784
- Timestamp:
- 01/29/2026 03:47:10 PM (2 months ago)
- Location:
- geoflex
- Files:
-
- 24 edited
- 1 copied
-
tags/1.10 (copied) (copied from geoflex/trunk)
-
tags/1.10/geoflex.php (modified) (2 diffs)
-
tags/1.10/readme.txt (modified) (2 diffs)
-
tags/1.10/src/Admin/Metabox.php (modified) (7 diffs)
-
tags/1.10/src/Admin/Notices.php (modified) (2 diffs)
-
tags/1.10/src/Admin/PostType.php (modified) (1 diff)
-
tags/1.10/src/Admin/Settings.php (modified) (1 diff)
-
tags/1.10/src/Admin/Support.php (modified) (1 diff)
-
tags/1.10/src/Cache/Regions.php (modified) (1 diff)
-
tags/1.10/src/Plugin.php (modified) (1 diff)
-
tags/1.10/src/Region.php (modified) (3 diffs)
-
tags/1.10/src/Utils/Helpers.php (modified) (1 diff)
-
tags/1.10/version-check.php (modified) (1 diff)
-
trunk/geoflex.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Admin/Metabox.php (modified) (7 diffs)
-
trunk/src/Admin/Notices.php (modified) (2 diffs)
-
trunk/src/Admin/PostType.php (modified) (1 diff)
-
trunk/src/Admin/Settings.php (modified) (1 diff)
-
trunk/src/Admin/Support.php (modified) (1 diff)
-
trunk/src/Cache/Regions.php (modified) (1 diff)
-
trunk/src/Plugin.php (modified) (1 diff)
-
trunk/src/Region.php (modified) (3 diffs)
-
trunk/src/Utils/Helpers.php (modified) (1 diff)
-
trunk/version-check.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
geoflex/tags/1.10/geoflex.php
r3317560 r3449784 4 4 * Plugin Name: Geoflex 5 5 * Description: Adds multiregional capability to WordPress 6 * Version: 1. 96 * Version: 1.10 7 7 * Requires at least: 6.0 8 8 * Requires PHP: 7.4 … … 44 44 require_once GEOFLEX_DIR . "vendor/autoload.php"; 45 45 46 new Plugin(); 47 48 add_action("plugins_loaded", function () { 46 add_action("init", function () { 49 47 load_plugin_textdomain("geoflex", false, dirname(plugin_basename(__FILE__)) . "/languages"); 50 }); 48 new Plugin(); 49 }, 5); 51 50 } -
geoflex/tags/1.10/readme.txt
r3317560 r3449784 3 3 Tags: seo, wordpress seo, yoast seo 4 4 Requires at least: 6.0 5 Tested up to: 6. 85 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1. 97 Stable tag: 1.10 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 65 65 == Changelog == 66 66 67 = 1.10 = 68 Support for WordPress 6.9 69 67 70 = 1.9 = 68 71 Support for WordPress 6.8 -
geoflex/tags/1.10/src/Admin/Metabox.php
r3071427 r3449784 2 2 3 3 namespace GeoFlex\Admin; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Utils\Helpers; … … 25 29 public function __construct() 26 30 { 27 add_action(" plugins_loaded", [$this, "load_fields"], 20);31 add_action("init", [$this, "load_fields"], 20); 28 32 add_action("edit_form_after_title", [$this, "metabox_callback"]); 29 33 add_action("admin_enqueue_scripts", [$this, "init_code_fields"]); … … 355 359 break; 356 360 case "code_css": 361 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 357 362 $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false; 358 363 break; 359 364 case "code_js": 365 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 360 366 $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false; 361 367 break; 362 368 case "code_html": 369 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 363 370 $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false; 364 371 break; … … 441 448 442 449 // Check unique 450 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 443 451 $check_sql = " 444 452 SELECT … … 454 462 LIMIT 1 455 463 "; 464 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 456 465 $slug_check = $wpdb->get_var($wpdb->prepare($check_sql, Helpers::get_meta_key("slug"), $value, $post_id)); 457 466 … … 461 470 do { 462 471 $alt_value = _truncate_post_slug($value, 200 - (strlen($suffix) + 1)) . "-$suffix"; 472 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 463 473 $slug_check = $wpdb->get_var($wpdb->prepare($check_sql, Helpers::get_meta_key("slug"), $alt_value, $post_id)); 464 474 ++$suffix; … … 531 541 <script> 532 542 document.addEventListener("DOMContentLoaded", () => { 533 const checkboxId = "<?php echo Helpers::get_meta_key("default", false); ?>";543 const checkboxId = "<?php echo esc_js(Helpers::get_meta_key("default", false)); ?>"; 534 544 const defaultCheckbox = document.getElementById(checkboxId); 535 545 const statusActions = document.querySelector("#misc-publishing-actions .misc-pub-post-status"); -
geoflex/tags/1.10/src/Admin/Notices.php
r3071427 r3449784 2 2 3 3 namespace GeoFlex\Admin; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 class Notices … … 61 65 } 62 66 $class = $notice["status"] ? "notice-" . esc_attr($notice["status"]) : ""; 63 printf('<div class="notice %s is-dismissible"><p>%s</p></div>', $class, esc_html($notice["text"]));67 printf('<div class="notice %s is-dismissible"><p>%s</p></div>', esc_attr($class), esc_html($notice["text"])); 64 68 } 65 69 delete_option("geoflex_notices"); -
geoflex/tags/1.10/src/Admin/PostType.php
r3071427 r3449784 2 2 3 3 namespace GeoFlex\Admin; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Utils\Helpers; -
geoflex/tags/1.10/src/Admin/Settings.php
r3049132 r3449784 2 2 3 3 namespace GeoFlex\Admin; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Utils\Helpers; -
geoflex/tags/1.10/src/Admin/Support.php
r3071427 r3449784 2 2 3 3 namespace GeoFlex\Admin; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Utils; -
geoflex/tags/1.10/src/Cache/Regions.php
r3150891 r3449784 2 2 3 3 namespace GeoFlex\Cache; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Plugin; -
geoflex/tags/1.10/src/Plugin.php
r3071427 r3449784 2 2 3 3 namespace GeoFlex; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Region; -
geoflex/tags/1.10/src/Region.php
r3150891 r3449784 2 2 3 3 namespace GeoFlex; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Cache\Regions; … … 437 441 { 438 442 if ($custom_css = get_post_meta($this->post->ID, Helpers::get_meta_key("custom_css"), true)) { 443 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 439 444 echo '<style id="geoflex-custom-css">'.$custom_css.'</style>', "\n"; 440 445 } 441 446 442 447 if ($header_js = get_post_meta($this->post->ID, Helpers::get_meta_key("header_js"), true)) { 448 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 443 449 echo '<script id="geoflex-header-js-code">'.$header_js.'</script>', "\n"; 444 450 } 445 451 446 452 if ($header_html = get_post_meta($this->post->ID, Helpers::get_meta_key("header_html"), true)) { 453 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 447 454 echo $header_html; 448 455 } … … 459 466 { 460 467 if ($footer_js = get_post_meta($this->post->ID, Helpers::get_meta_key("footer_js"), true)) { 468 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 461 469 echo '<script id="geoflex-footer-js-code">'.$footer_js.'</script>', "\n"; 462 470 } 463 471 464 472 if ($footer_html = get_post_meta($this->post->ID, Helpers::get_meta_key("footer_html"), true)) { 473 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 465 474 echo $footer_html; 466 475 } -
geoflex/tags/1.10/src/Utils/Helpers.php
r3050498 r3449784 2 2 3 3 namespace GeoFlex\Utils; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 class Helpers -
geoflex/tags/1.10/version-check.php
r3117065 r3449784 5 5 6 6 add_action('activated_plugin', 'geoflex_deactivate_other_version'); 7 add_action(' pre_current_active_plugins', 'geoflex_plugin_deactivated_notice');7 add_action('admin_notices', 'geoflex_plugin_deactivated_notice'); 8 8 9 9 /** -
geoflex/trunk/geoflex.php
r3317560 r3449784 4 4 * Plugin Name: Geoflex 5 5 * Description: Adds multiregional capability to WordPress 6 * Version: 1. 96 * Version: 1.10 7 7 * Requires at least: 6.0 8 8 * Requires PHP: 7.4 … … 44 44 require_once GEOFLEX_DIR . "vendor/autoload.php"; 45 45 46 new Plugin(); 47 48 add_action("plugins_loaded", function () { 46 add_action("init", function () { 49 47 load_plugin_textdomain("geoflex", false, dirname(plugin_basename(__FILE__)) . "/languages"); 50 }); 48 new Plugin(); 49 }, 5); 51 50 } -
geoflex/trunk/readme.txt
r3317560 r3449784 3 3 Tags: seo, wordpress seo, yoast seo 4 4 Requires at least: 6.0 5 Tested up to: 6. 85 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1. 97 Stable tag: 1.10 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 65 65 == Changelog == 66 66 67 = 1.10 = 68 Support for WordPress 6.9 69 67 70 = 1.9 = 68 71 Support for WordPress 6.8 -
geoflex/trunk/src/Admin/Metabox.php
r3071427 r3449784 2 2 3 3 namespace GeoFlex\Admin; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Utils\Helpers; … … 25 29 public function __construct() 26 30 { 27 add_action(" plugins_loaded", [$this, "load_fields"], 20);31 add_action("init", [$this, "load_fields"], 20); 28 32 add_action("edit_form_after_title", [$this, "metabox_callback"]); 29 33 add_action("admin_enqueue_scripts", [$this, "init_code_fields"]); … … 355 359 break; 356 360 case "code_css": 361 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 357 362 $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false; 358 363 break; 359 364 case "code_js": 365 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 360 366 $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false; 361 367 break; 362 368 case "code_html": 369 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 363 370 $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false; 364 371 break; … … 441 448 442 449 // Check unique 450 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 443 451 $check_sql = " 444 452 SELECT … … 454 462 LIMIT 1 455 463 "; 464 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 456 465 $slug_check = $wpdb->get_var($wpdb->prepare($check_sql, Helpers::get_meta_key("slug"), $value, $post_id)); 457 466 … … 461 470 do { 462 471 $alt_value = _truncate_post_slug($value, 200 - (strlen($suffix) + 1)) . "-$suffix"; 472 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 463 473 $slug_check = $wpdb->get_var($wpdb->prepare($check_sql, Helpers::get_meta_key("slug"), $alt_value, $post_id)); 464 474 ++$suffix; … … 531 541 <script> 532 542 document.addEventListener("DOMContentLoaded", () => { 533 const checkboxId = "<?php echo Helpers::get_meta_key("default", false); ?>";543 const checkboxId = "<?php echo esc_js(Helpers::get_meta_key("default", false)); ?>"; 534 544 const defaultCheckbox = document.getElementById(checkboxId); 535 545 const statusActions = document.querySelector("#misc-publishing-actions .misc-pub-post-status"); -
geoflex/trunk/src/Admin/Notices.php
r3071427 r3449784 2 2 3 3 namespace GeoFlex\Admin; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 class Notices … … 61 65 } 62 66 $class = $notice["status"] ? "notice-" . esc_attr($notice["status"]) : ""; 63 printf('<div class="notice %s is-dismissible"><p>%s</p></div>', $class, esc_html($notice["text"]));67 printf('<div class="notice %s is-dismissible"><p>%s</p></div>', esc_attr($class), esc_html($notice["text"])); 64 68 } 65 69 delete_option("geoflex_notices"); -
geoflex/trunk/src/Admin/PostType.php
r3071427 r3449784 2 2 3 3 namespace GeoFlex\Admin; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Utils\Helpers; -
geoflex/trunk/src/Admin/Settings.php
r3049132 r3449784 2 2 3 3 namespace GeoFlex\Admin; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Utils\Helpers; -
geoflex/trunk/src/Admin/Support.php
r3071427 r3449784 2 2 3 3 namespace GeoFlex\Admin; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Utils; -
geoflex/trunk/src/Cache/Regions.php
r3150891 r3449784 2 2 3 3 namespace GeoFlex\Cache; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Plugin; -
geoflex/trunk/src/Plugin.php
r3071427 r3449784 2 2 3 3 namespace GeoFlex; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Region; -
geoflex/trunk/src/Region.php
r3150891 r3449784 2 2 3 3 namespace GeoFlex; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 use GeoFlex\Cache\Regions; … … 437 441 { 438 442 if ($custom_css = get_post_meta($this->post->ID, Helpers::get_meta_key("custom_css"), true)) { 443 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 439 444 echo '<style id="geoflex-custom-css">'.$custom_css.'</style>', "\n"; 440 445 } 441 446 442 447 if ($header_js = get_post_meta($this->post->ID, Helpers::get_meta_key("header_js"), true)) { 448 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 443 449 echo '<script id="geoflex-header-js-code">'.$header_js.'</script>', "\n"; 444 450 } 445 451 446 452 if ($header_html = get_post_meta($this->post->ID, Helpers::get_meta_key("header_html"), true)) { 453 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 447 454 echo $header_html; 448 455 } … … 459 466 { 460 467 if ($footer_js = get_post_meta($this->post->ID, Helpers::get_meta_key("footer_js"), true)) { 468 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 461 469 echo '<script id="geoflex-footer-js-code">'.$footer_js.'</script>', "\n"; 462 470 } 463 471 464 472 if ($footer_html = get_post_meta($this->post->ID, Helpers::get_meta_key("footer_html"), true)) { 473 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 465 474 echo $footer_html; 466 475 } -
geoflex/trunk/src/Utils/Helpers.php
r3050498 r3449784 2 2 3 3 namespace GeoFlex\Utils; 4 5 if (!defined("ABSPATH")) { 6 exit(); 7 } 4 8 5 9 class Helpers -
geoflex/trunk/version-check.php
r3117065 r3449784 5 5 6 6 add_action('activated_plugin', 'geoflex_deactivate_other_version'); 7 add_action(' pre_current_active_plugins', 'geoflex_plugin_deactivated_notice');7 add_action('admin_notices', 'geoflex_plugin_deactivated_notice'); 8 8 9 9 /**
Note: See TracChangeset
for help on using the changeset viewer.