Plugin Directory

Changeset 3235362


Ignore:
Timestamp:
02/05/2025 11:58:35 AM (13 months ago)
Author:
anshumanja
Message:

fatal error 2.4 fix

Location:
accessibe/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • accessibe/trunk/accessibe.php

    r3231917 r3235362  
    44  * Plugin URI: https://accessibe.com/
    55  * Description: accessiBe is the #1 fully automated web accessibility solution. Protect your website from lawsuits and increase your potential audience.
    6   * Version: 2.4
     6  * Version: 2.5
    77  * Author: accessiBe
    88  * Author URI: https://accessibe.com/
  • accessibe/trunk/class.accessibeforwp.php

    r3231917 r3235362  
    2828        'mobileTriggerOffsetY' => '10',
    2929        'statementLink' => '',
     30        'footerHtml' => '',
    3031    ];
    3132
     
    5152        'mobileTriggerOffsetY' => 10,
    5253        'statementLink' => '',
     54        'footerHtml' => '',
    5355    ];
    5456
     
    8385
    8486        /* Register settings */
    85         // add_action('admin_init', array('AccessibeWp', 'accessibe_register_settings'));
     87        add_action('plugins_loaded', array('AccessibeWp', 'manage_redirect'));
    8688
    8789        /* Render js in footer */
     
    128130    } // accessibe_init_hooks
    129131
     132
     133    public static function manage_redirect() {
     134        $old_page_slug = 'accessiBe';  // Slug for the old settings page
     135   
     136        if (isset($_GET['page']) && $_GET['page'] === $old_page_slug && strpos($_SERVER['REQUEST_URI'], 'options-general.php') !== false) {
     137            wp_redirect(admin_url('admin.php?page=accessibe'));
     138            exit();
     139        }
     140    }
    130141
    131142  /**
     
    277288        }
    278289       
    279         $active_license_id = $current_user_options->activeLicenseId;
    280290        // Conditionally add fields if isLoggedIn is true
    281291        if (isset($current_user_options->activeLicenseId) && isset($current_user_options->licenses) && $current_user_options->activeLicenseId != '') {
     292            $active_license_id = $current_user_options->activeLicenseId;
    282293            $detail['licenseId'] = $current_user_options->licenses->$active_license_id->licenseId;
    283294            $detail['widgetStatus'] = $current_user_options->licenses->$active_license_id->widgetStatus;
     
    380391            $modified_status = true;
    381392            if(!empty($old_data)) {
    382                 // $modified_status = $data_decoded->newLicense ? true : 'enabled' == $old_data['accessibe'];
    383                 $modified_config = self::modify_old_data($old_data);
     393                if(!is_array($old_data)) {
     394                    $old_data = array();
     395                }
     396                else{
     397                    // $modified_status = $data_decoded->newLicense ? true : 'enabled' == $old_data['accessibe'];
     398                    $modified_config = self::modify_old_data($old_data);
     399                }
    384400                delete_option(ACCESSIBE_WP_OLD_OPTIONS_KEY);
    385401            }
     
    565581      if(empty($accessibe_options) || !isset($accessibe_options['script'])) {
    566582          $older_options = get_option(ACCESSIBE_WP_OLD_OPTIONS_KEY, array());
     583          if (!is_array($older_options)) {
     584            $older_options = array();
     585          }
    567586          $accessibe_options = array_merge($accessibe_options, $older_options);
    568587      }
     
    711730    $plugin_basename = ACCESSIBE_WP_BASENAME;
    712731
     732    error_log(json_encode($hook_extra));
     733
    713734    // Check if the hook involves updating plugins.
    714735    if (
     
    751772    // Check if the plugin was recently updated.
    752773    $previous_version = get_transient('accessibe_previous_version');
     774    error_log($previous_version);
    753775    if ($previous_version) {
    754776        // Delete the transient after fetching its value.
  • accessibe/trunk/readme.txt

    r3231917 r3235362  
    44Requires at least: 4.7
    55Tested up to: 6.7
    6 Stable tag: 2.4
     6Stable tag: 2.5
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    6868
    6969== Changelog ==
     70= v2.5 =
     71* 2025-02-05
     72* Bug fixes
     73
    7074= v2.4 =
    7175* 2025-01-30
Note: See TracChangeset for help on using the changeset viewer.