Plugin Directory

Changeset 2843533


Ignore:
Timestamp:
01/04/2023 03:38:15 PM (3 years ago)
Author:
yehi
Message:

Version 1.1.8

Location:
advanced-notifications/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • advanced-notifications/trunk/advanced-notifications.php

    r2838370 r2843533  
    44 * Plugin URI: https://wordpress.org/plugins/advanced-notifications
    55 * Description: Advanced Notifications allows you to create beautiful custom notifications
    6  * Version: 1.1.7
     6 * Version: 1.1.8
    77 * Author: Yehi
    88 * Author URI: https://profiles.wordpress.org/yehi/
  • advanced-notifications/trunk/includes/an-api.php

    r2800574 r2843533  
    7676            foreach ($notifications_list as $location_id => $notifications) {
    7777                usort($notifications, function ($notification1, $notification2) {
    78                     return $notification1['delay'] < $notification2['delay'];
     78                    return $notification2['delay'] <=> $notification1['delay'];
    7979                });
    8080                $notifications_list_sort[$location_id] = $notifications;
  • advanced-notifications/trunk/includes/an-functions.php

    r2800574 r2843533  
    9393        $notifications = $this->get_notifications();
    9494        foreach ($notifications as $notification) {
    95             $notification_settings = eis_get_option('a_notifications', null, $notification->ID);
     95            $notification_settings = (array) eis_get_option('a_notifications', null, $notification->ID);
    9696            foreach ($notification_settings as $option_key => $option_value) {
    9797                $notification_settings[$option_key] = str_replace($option_key . '_', '', $option_value);
     
    102102                'content'   => wpautop($notification->post_content),
    103103            );
    104             $an_api->add_notification($args+$notification_settings);
     104            $an_api->add_notification(array_merge($args, $notification_settings));
    105105        }
    106106        return $an_register_notifications;
     
    207207        $locations_posts = $this->get_locations();
    208208        foreach ($locations_posts as $location_post) {
    209             $location_settings = eis_get_option('an_locations', null, $location_post->ID);
    210             $location_settings = (is_array($location_settings)) ? $location_settings : array();
     209            $location_settings = (array) eis_get_option('an_locations', null, $location_post->ID);
    211210            foreach ($location_settings as $option_key => $option_value) {
    212211                $location_settings[$option_key] = str_replace($option_key . '_', '', $option_value);
     
    216215                'label'   => $location_post->post_title,
    217216            );
    218             $an_api->add_location($args+$location_settings);
     217            $an_api->add_location(array_merge($args, $location_settings));
    219218        }
    220219    }
     
    225224            // must run first to get all register_locations to global var $an_register_locationss
    226225            $register_locations = $this->register_locations();
    227             $locations_list['register_locations'] = $an_register_locations;
     226            $locations_list = array('register_locations' => $an_register_locations);
    228227            $an_core->an_add_cache('locations_list', $locations_list);
    229228        }
     
    236235            // must run first to get all register_designs to global var $an_register_designss
    237236            $register_designs = $this->register_designs();
    238             $designs_list['register_locations'] = $an_register_designs;
     237            $designs_list = array('register_designs' => $an_register_designs);
    239238            $an_core->an_add_cache('designs_list', $designs_list);
    240239        }
    241         return apply_filters('an_designs_list', $designs_list['register_locations']);
     240        return apply_filters('an_designs_list', $designs_list['register_designs']);
    242241    }
    243242    function get_designs() {
     
    274273        $designs_posts = $this->get_designs();
    275274        foreach ($designs_posts as $design_post) {
    276             $design_settings = eis_get_option('an_designs', null, $design_post->ID);
     275            $design_settings = (array) eis_get_option('an_designs', null, $design_post->ID);
    277276            foreach ($design_settings as $option_key => $option_value) {
    278277                $design_settings[$option_key] = str_replace($option_key . '_', '', $option_value);
     
    282281                'label'   => $design_post->post_title,
    283282            );
    284             $design_settings_arr = (is_array($design_settings)) ? $args+$design_settings : $args;
    285             $an_api->add_design($design_settings_arr);
     283            $an_api->add_design(array_merge($args, $design_settings));
    286284        }
    287285    }
     
    351349        if (!$is_show_cache || !$cache) {
    352350            $tax = get_queried_object();
    353             $is_show_cache['post_type'] = get_post_type();
    354             $is_show_cache['taxonomy'] = (isset($tax->taxonomy)) ? $tax->taxonomy : false;
    355             $is_show_cache['an_item_data'] = is_singular() ? get_post_meta($item_id, 'an_item_data', true) : null;
     351            $is_show_cache = array(
     352                'post_type' => get_post_type(),
     353                'taxonomy' => (isset($tax->taxonomy) ? $tax->taxonomy : false),
     354                'an_item_data' => (is_singular() ? get_post_meta($item_id, 'an_item_data', true) : null),
     355            );
    356356            $an_core->an_add_cache('is_show', $is_show_cache);
    357357        }
  • advanced-notifications/trunk/plugins/easy-interface-settings/includes/eis-functions.php

    r2796164 r2843533  
    103103            $option = null;
    104104        }
    105         $eis_get_save_option[$cache_name] = array(
    106             'site_lang' => mb_substr(get_locale(), 0, 2, "UTF-8"),
    107             'interface_type' => $interface_type,
    108             'option' => $option,
     105        $eis_get_save_option = array(
     106            $cache_name => array(
     107                'site_lang' => mb_substr(get_locale(), 0, 2, "UTF-8"),
     108                'interface_type' => $interface_type,
     109                'option' => $option,
     110            )
    109111        );
    110112        if ($cache) {
  • advanced-notifications/trunk/readme.txt

    r2838370 r2843533  
    33Tags: notice, notifications, notifications, alerts, popup, messages, banners,
    44Requires at least: 5.6.2
    5 Tested up to: 6.0.2
    6 Stable tag: 1.1.6
     5Tested up to: 6.1.1
     6Stable tag: 1.1.8
    77License: GPLv2 or later
    88
     
    4747
    4848== Changelog ==
     49
     50= 1.1.8 =
     51* Improvement: compatibility with PHP 8.1 version
    4952
    5053= 1.1.7 =
Note: See TracChangeset for help on using the changeset viewer.