Plugin Directory

Changeset 3449784


Ignore:
Timestamp:
01/29/2026 03:47:10 PM (2 months ago)
Author:
solbeg
Message:

Update to version 1.10 from GitHub

Location:
geoflex
Files:
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • geoflex/tags/1.10/geoflex.php

    r3317560 r3449784  
    44 * Plugin Name:       Geoflex
    55 * Description:       Adds multiregional capability to WordPress
    6  * Version:           1.9
     6 * Version:           1.10
    77 * Requires at least: 6.0
    88 * Requires PHP:      7.4
     
    4444    require_once GEOFLEX_DIR . "vendor/autoload.php";
    4545
    46     new Plugin();
    47 
    48     add_action("plugins_loaded", function () {
     46    add_action("init", function () {
    4947        load_plugin_textdomain("geoflex", false, dirname(plugin_basename(__FILE__)) . "/languages");
    50     });
     48        new Plugin();
     49    }, 5);
    5150}
  • geoflex/tags/1.10/readme.txt

    r3317560 r3449784  
    33Tags: seo, wordpress seo, yoast seo
    44Requires at least: 6.0
    5 Tested up to: 6.8
     5Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.9
     7Stable tag: 1.10
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    6565== Changelog ==
    6666
     67= 1.10 =
     68Support for WordPress 6.9
     69
    6770= 1.9 =
    6871Support for WordPress 6.8
  • geoflex/tags/1.10/src/Admin/Metabox.php

    r3071427 r3449784  
    22
    33namespace GeoFlex\Admin;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Utils\Helpers;
     
    2529    public function __construct()
    2630    {
    27         add_action("plugins_loaded", [$this, "load_fields"], 20);
     31        add_action("init", [$this, "load_fields"], 20);
    2832        add_action("edit_form_after_title", [$this, "metabox_callback"]);
    2933        add_action("admin_enqueue_scripts", [$this, "init_code_fields"]);
     
    355359                    break;
    356360                case "code_css":
     361                    // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
    357362                    $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false;
    358363                    break;
    359364                case "code_js":
     365                    // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
    360366                    $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false;
    361367                    break;
    362368                case "code_html":
     369                    // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
    363370                    $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false;
    364371                    break;
     
    441448
    442449        // Check unique
     450        // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    443451        $check_sql = "
    444452            SELECT
     
    454462            LIMIT 1
    455463        ";
     464        // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    456465        $slug_check = $wpdb->get_var($wpdb->prepare($check_sql, Helpers::get_meta_key("slug"), $value, $post_id));
    457466
     
    461470            do {
    462471                $alt_value = _truncate_post_slug($value, 200 - (strlen($suffix) + 1)) . "-$suffix";
     472                // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    463473                $slug_check = $wpdb->get_var($wpdb->prepare($check_sql, Helpers::get_meta_key("slug"), $alt_value, $post_id));
    464474                ++$suffix;
     
    531541            <script>
    532542                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)); ?>";
    534544                    const defaultCheckbox = document.getElementById(checkboxId);
    535545                    const statusActions = document.querySelector("#misc-publishing-actions .misc-pub-post-status");
  • geoflex/tags/1.10/src/Admin/Notices.php

    r3071427 r3449784  
    22
    33namespace GeoFlex\Admin;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59class Notices
     
    6165                }
    6266                $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"]));
    6468            }
    6569            delete_option("geoflex_notices");
  • geoflex/tags/1.10/src/Admin/PostType.php

    r3071427 r3449784  
    22
    33namespace GeoFlex\Admin;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Utils\Helpers;
  • geoflex/tags/1.10/src/Admin/Settings.php

    r3049132 r3449784  
    22
    33namespace GeoFlex\Admin;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Utils\Helpers;
  • geoflex/tags/1.10/src/Admin/Support.php

    r3071427 r3449784  
    22
    33namespace GeoFlex\Admin;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Utils;
  • geoflex/tags/1.10/src/Cache/Regions.php

    r3150891 r3449784  
    22
    33namespace GeoFlex\Cache;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Plugin;
  • geoflex/tags/1.10/src/Plugin.php

    r3071427 r3449784  
    22
    33namespace GeoFlex;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Region;
  • geoflex/tags/1.10/src/Region.php

    r3150891 r3449784  
    22
    33namespace GeoFlex;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Cache\Regions;
     
    437441    {
    438442        if ($custom_css = get_post_meta($this->post->ID, Helpers::get_meta_key("custom_css"), true)) {
     443            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    439444            echo '<style id="geoflex-custom-css">'.$custom_css.'</style>', "\n";
    440445        }
    441446
    442447        if ($header_js = get_post_meta($this->post->ID, Helpers::get_meta_key("header_js"), true)) {
     448            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    443449            echo '<script id="geoflex-header-js-code">'.$header_js.'</script>', "\n";
    444450        }
    445451
    446452        if ($header_html = get_post_meta($this->post->ID, Helpers::get_meta_key("header_html"), true)) {
     453            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    447454            echo $header_html;
    448455        }
     
    459466    {
    460467        if ($footer_js = get_post_meta($this->post->ID, Helpers::get_meta_key("footer_js"), true)) {
     468            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    461469            echo '<script id="geoflex-footer-js-code">'.$footer_js.'</script>', "\n";
    462470        }
    463471
    464472        if ($footer_html = get_post_meta($this->post->ID, Helpers::get_meta_key("footer_html"), true)) {
     473            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    465474            echo $footer_html;
    466475        }
  • geoflex/tags/1.10/src/Utils/Helpers.php

    r3050498 r3449784  
    22
    33namespace GeoFlex\Utils;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59class Helpers
  • geoflex/tags/1.10/version-check.php

    r3117065 r3449784  
    55
    66add_action('activated_plugin', 'geoflex_deactivate_other_version');
    7 add_action('pre_current_active_plugins', 'geoflex_plugin_deactivated_notice');
     7add_action('admin_notices', 'geoflex_plugin_deactivated_notice');
    88
    99/**
  • geoflex/trunk/geoflex.php

    r3317560 r3449784  
    44 * Plugin Name:       Geoflex
    55 * Description:       Adds multiregional capability to WordPress
    6  * Version:           1.9
     6 * Version:           1.10
    77 * Requires at least: 6.0
    88 * Requires PHP:      7.4
     
    4444    require_once GEOFLEX_DIR . "vendor/autoload.php";
    4545
    46     new Plugin();
    47 
    48     add_action("plugins_loaded", function () {
     46    add_action("init", function () {
    4947        load_plugin_textdomain("geoflex", false, dirname(plugin_basename(__FILE__)) . "/languages");
    50     });
     48        new Plugin();
     49    }, 5);
    5150}
  • geoflex/trunk/readme.txt

    r3317560 r3449784  
    33Tags: seo, wordpress seo, yoast seo
    44Requires at least: 6.0
    5 Tested up to: 6.8
     5Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.9
     7Stable tag: 1.10
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    6565== Changelog ==
    6666
     67= 1.10 =
     68Support for WordPress 6.9
     69
    6770= 1.9 =
    6871Support for WordPress 6.8
  • geoflex/trunk/src/Admin/Metabox.php

    r3071427 r3449784  
    22
    33namespace GeoFlex\Admin;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Utils\Helpers;
     
    2529    public function __construct()
    2630    {
    27         add_action("plugins_loaded", [$this, "load_fields"], 20);
     31        add_action("init", [$this, "load_fields"], 20);
    2832        add_action("edit_form_after_title", [$this, "metabox_callback"]);
    2933        add_action("admin_enqueue_scripts", [$this, "init_code_fields"]);
     
    355359                    break;
    356360                case "code_css":
     361                    // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
    357362                    $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false;
    358363                    break;
    359364                case "code_js":
     365                    // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
    360366                    $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false;
    361367                    break;
    362368                case "code_html":
     369                    // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
    363370                    $value = array_key_exists($key, $_POST) ? wp_unslash($_POST[$key]) : false;
    364371                    break;
     
    441448
    442449        // Check unique
     450        // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    443451        $check_sql = "
    444452            SELECT
     
    454462            LIMIT 1
    455463        ";
     464        // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    456465        $slug_check = $wpdb->get_var($wpdb->prepare($check_sql, Helpers::get_meta_key("slug"), $value, $post_id));
    457466
     
    461470            do {
    462471                $alt_value = _truncate_post_slug($value, 200 - (strlen($suffix) + 1)) . "-$suffix";
     472                // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    463473                $slug_check = $wpdb->get_var($wpdb->prepare($check_sql, Helpers::get_meta_key("slug"), $alt_value, $post_id));
    464474                ++$suffix;
     
    531541            <script>
    532542                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)); ?>";
    534544                    const defaultCheckbox = document.getElementById(checkboxId);
    535545                    const statusActions = document.querySelector("#misc-publishing-actions .misc-pub-post-status");
  • geoflex/trunk/src/Admin/Notices.php

    r3071427 r3449784  
    22
    33namespace GeoFlex\Admin;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59class Notices
     
    6165                }
    6266                $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"]));
    6468            }
    6569            delete_option("geoflex_notices");
  • geoflex/trunk/src/Admin/PostType.php

    r3071427 r3449784  
    22
    33namespace GeoFlex\Admin;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Utils\Helpers;
  • geoflex/trunk/src/Admin/Settings.php

    r3049132 r3449784  
    22
    33namespace GeoFlex\Admin;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Utils\Helpers;
  • geoflex/trunk/src/Admin/Support.php

    r3071427 r3449784  
    22
    33namespace GeoFlex\Admin;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Utils;
  • geoflex/trunk/src/Cache/Regions.php

    r3150891 r3449784  
    22
    33namespace GeoFlex\Cache;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Plugin;
  • geoflex/trunk/src/Plugin.php

    r3071427 r3449784  
    22
    33namespace GeoFlex;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Region;
  • geoflex/trunk/src/Region.php

    r3150891 r3449784  
    22
    33namespace GeoFlex;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59use GeoFlex\Cache\Regions;
     
    437441    {
    438442        if ($custom_css = get_post_meta($this->post->ID, Helpers::get_meta_key("custom_css"), true)) {
     443            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    439444            echo '<style id="geoflex-custom-css">'.$custom_css.'</style>', "\n";
    440445        }
    441446
    442447        if ($header_js = get_post_meta($this->post->ID, Helpers::get_meta_key("header_js"), true)) {
     448            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    443449            echo '<script id="geoflex-header-js-code">'.$header_js.'</script>', "\n";
    444450        }
    445451
    446452        if ($header_html = get_post_meta($this->post->ID, Helpers::get_meta_key("header_html"), true)) {
     453            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    447454            echo $header_html;
    448455        }
     
    459466    {
    460467        if ($footer_js = get_post_meta($this->post->ID, Helpers::get_meta_key("footer_js"), true)) {
     468            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    461469            echo '<script id="geoflex-footer-js-code">'.$footer_js.'</script>', "\n";
    462470        }
    463471
    464472        if ($footer_html = get_post_meta($this->post->ID, Helpers::get_meta_key("footer_html"), true)) {
     473            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    465474            echo $footer_html;
    466475        }
  • geoflex/trunk/src/Utils/Helpers.php

    r3050498 r3449784  
    22
    33namespace GeoFlex\Utils;
     4
     5if (!defined("ABSPATH")) {
     6    exit();
     7}
    48
    59class Helpers
  • geoflex/trunk/version-check.php

    r3117065 r3449784  
    55
    66add_action('activated_plugin', 'geoflex_deactivate_other_version');
    7 add_action('pre_current_active_plugins', 'geoflex_plugin_deactivated_notice');
     7add_action('admin_notices', 'geoflex_plugin_deactivated_notice');
    88
    99/**
Note: See TracChangeset for help on using the changeset viewer.