Changeset 2843533
- Timestamp:
- 01/04/2023 03:38:15 PM (3 years ago)
- Location:
- advanced-notifications/trunk
- Files:
-
- 5 edited
-
advanced-notifications.php (modified) (1 diff)
-
includes/an-api.php (modified) (1 diff)
-
includes/an-functions.php (modified) (9 diffs)
-
plugins/easy-interface-settings/includes/eis-functions.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-notifications/trunk/advanced-notifications.php
r2838370 r2843533 4 4 * Plugin URI: https://wordpress.org/plugins/advanced-notifications 5 5 * Description: Advanced Notifications allows you to create beautiful custom notifications 6 * Version: 1.1. 76 * Version: 1.1.8 7 7 * Author: Yehi 8 8 * Author URI: https://profiles.wordpress.org/yehi/ -
advanced-notifications/trunk/includes/an-api.php
r2800574 r2843533 76 76 foreach ($notifications_list as $location_id => $notifications) { 77 77 usort($notifications, function ($notification1, $notification2) { 78 return $notification 1['delay'] < $notification2['delay'];78 return $notification2['delay'] <=> $notification1['delay']; 79 79 }); 80 80 $notifications_list_sort[$location_id] = $notifications; -
advanced-notifications/trunk/includes/an-functions.php
r2800574 r2843533 93 93 $notifications = $this->get_notifications(); 94 94 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); 96 96 foreach ($notification_settings as $option_key => $option_value) { 97 97 $notification_settings[$option_key] = str_replace($option_key . '_', '', $option_value); … … 102 102 'content' => wpautop($notification->post_content), 103 103 ); 104 $an_api->add_notification( $args+$notification_settings);104 $an_api->add_notification(array_merge($args, $notification_settings)); 105 105 } 106 106 return $an_register_notifications; … … 207 207 $locations_posts = $this->get_locations(); 208 208 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); 211 210 foreach ($location_settings as $option_key => $option_value) { 212 211 $location_settings[$option_key] = str_replace($option_key . '_', '', $option_value); … … 216 215 'label' => $location_post->post_title, 217 216 ); 218 $an_api->add_location( $args+$location_settings);217 $an_api->add_location(array_merge($args, $location_settings)); 219 218 } 220 219 } … … 225 224 // must run first to get all register_locations to global var $an_register_locationss 226 225 $register_locations = $this->register_locations(); 227 $locations_list ['register_locations'] = $an_register_locations;226 $locations_list = array('register_locations' => $an_register_locations); 228 227 $an_core->an_add_cache('locations_list', $locations_list); 229 228 } … … 236 235 // must run first to get all register_designs to global var $an_register_designss 237 236 $register_designs = $this->register_designs(); 238 $designs_list ['register_locations'] = $an_register_designs;237 $designs_list = array('register_designs' => $an_register_designs); 239 238 $an_core->an_add_cache('designs_list', $designs_list); 240 239 } 241 return apply_filters('an_designs_list', $designs_list['register_ locations']);240 return apply_filters('an_designs_list', $designs_list['register_designs']); 242 241 } 243 242 function get_designs() { … … 274 273 $designs_posts = $this->get_designs(); 275 274 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); 277 276 foreach ($design_settings as $option_key => $option_value) { 278 277 $design_settings[$option_key] = str_replace($option_key . '_', '', $option_value); … … 282 281 'label' => $design_post->post_title, 283 282 ); 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)); 286 284 } 287 285 } … … 351 349 if (!$is_show_cache || !$cache) { 352 350 $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 ); 356 356 $an_core->an_add_cache('is_show', $is_show_cache); 357 357 } -
advanced-notifications/trunk/plugins/easy-interface-settings/includes/eis-functions.php
r2796164 r2843533 103 103 $option = null; 104 104 } 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 ) 109 111 ); 110 112 if ($cache) { -
advanced-notifications/trunk/readme.txt
r2838370 r2843533 3 3 Tags: notice, notifications, notifications, alerts, popup, messages, banners, 4 4 Requires at least: 5.6.2 5 Tested up to: 6. 0.26 Stable tag: 1.1. 65 Tested up to: 6.1.1 6 Stable tag: 1.1.8 7 7 License: GPLv2 or later 8 8 … … 47 47 48 48 == Changelog == 49 50 = 1.1.8 = 51 * Improvement: compatibility with PHP 8.1 version 49 52 50 53 = 1.1.7 =
Note: See TracChangeset
for help on using the changeset viewer.