← All changes
|
includes/widgets/Magazine_Grid/Magazine_Grid.php
+14
-15
51.1.79
→
51.1.83
View file →
| @@ -1023,10 +1023,9 @@ | ||
| 1023 | 1023 | ] |
| 1024 | 1024 | ] |
| 1025 | 1025 | ); |
| 1026 | 1026 | |
| 1027 | - Core::renderUpgradeProNotice($repeater, Controls_Manager::RAW_HTML, 'magazine-grid', 'element_select', ['pro-lk', 'pro-shr']); | |
| 1028 | - Core::renderUpgradeProNotice($repeater, Controls_Manager::RAW_HTML, 'magazine-grid', 'element_select', ['pro-cf']); | |
| 1027 | + Core::renderUpgradeProNotice($repeater, Controls_Manager::RAW_HTML, 'magazine-grid', 'element_select', ['pro-lk', 'pro-shr', 'pro-cf']); | |
| 1029 | 1028 | |
| 1030 | 1029 | $repeater->add_control( |
| 1031 | 1030 | 'element_display', |
| 1032 | 1031 | [ |
| @@ -5019,9 +5018,9 @@ | ||
| 5019 | 5018 | } |
| 5020 | 5019 | |
| 5021 | 5020 | public function get_main_query_args($slide_offset) |
| 5022 | 5021 | { |
| 5023 | - $settings = $this->get_settings(); | |
| 5022 | + $settings = Core::displaySettings($this); | |
| 5024 | 5023 | $author = !empty($settings['query_author']) ? implode(',', $settings['query_author']) : ''; |
| 5025 | 5024 | $paged = get_query_var('paged') ?: (get_query_var('page') ?: 1); |
| 5026 | 5025 | |
| 5027 | 5026 | // Handle no-premium settings |
| @@ -5143,9 +5142,9 @@ | ||
| 5143 | 5142 | } |
| 5144 | 5143 | |
| 5145 | 5144 | public function get_tax_query_args() |
| 5146 | 5145 | { |
| 5147 | - $settings = $this->get_settings(); | |
| 5146 | + $settings = Core::displaySettings($this); | |
| 5148 | 5147 | |
| 5149 | 5148 | // If "related" source |
| 5150 | 5149 | if ('related' === $settings['query_source']) { |
| 5151 | 5150 | return [ |
| @@ -5235,9 +5234,9 @@ | ||
| 5235 | 5234 | } |
| 5236 | 5235 | |
| 5237 | 5236 | public function render_post_title($settings, $class) |
| 5238 | 5237 | { |
| 5239 | - $open_links_in_new_tab = ('yes' === $settings['open_links_in_new_tab']) ? '_blank' : '_self'; | |
| 5238 | + $open_links_in_new_tab = ('yes' === ($settings['open_links_in_new_tab'] ?? '')) ? '_blank' : '_self'; | |
| 5240 | 5239 | |
| 5241 | 5240 | // If premium unavailable, fallback pointer settings |
| 5242 | 5241 | $title_pointer = king_addons_freemius()->can_use_premium_code__premium_only() |
| 5243 | 5242 | ? Grid_Ajax_Security::sanitize_class_token($settings['title_pointer'] ?? 'none') |
| @@ -5413,12 +5412,12 @@ | ||
| 5413 | 5412 | $count = 0; |
| 5414 | 5413 | $pointer = king_addons_freemius()->can_use_premium_code__premium_only(); |
| 5415 | 5414 | |
| 5416 | 5415 | // Pointer settings |
| 5417 | - $tax1_pointer = $pointer ? Grid_Ajax_Security::sanitize_class_token($this->get_settings()['tax1_pointer'] ?? 'none') : 'none'; | |
| 5418 | - $tax1_pointer_animation = $pointer ? Grid_Ajax_Security::sanitize_class_token($this->get_settings()['tax1_pointer_animation'] ?? 'fade') : 'fade'; | |
| 5419 | - $tax2_pointer = $pointer ? Grid_Ajax_Security::sanitize_class_token($this->get_settings()['tax2_pointer'] ?? 'none') : 'none'; | |
| 5420 | - $tax2_pointer_animation = $pointer ? Grid_Ajax_Security::sanitize_class_token($this->get_settings()['tax2_pointer_animation'] ?? 'fade') : 'fade'; | |
| 5416 | + $tax1_pointer = $pointer ? Grid_Ajax_Security::sanitize_class_token(Core::displaySettings($this)['tax1_pointer'] ?? 'none') : 'none'; | |
| 5417 | + $tax1_pointer_animation = $pointer ? Grid_Ajax_Security::sanitize_class_token(Core::displaySettings($this)['tax1_pointer_animation'] ?? 'fade') : 'fade'; | |
| 5418 | + $tax2_pointer = $pointer ? Grid_Ajax_Security::sanitize_class_token(Core::displaySettings($this)['tax2_pointer'] ?? 'none') : 'none'; | |
| 5419 | + $tax2_pointer_animation = $pointer ? Grid_Ajax_Security::sanitize_class_token(Core::displaySettings($this)['tax2_pointer_animation'] ?? 'fade') : 'fade'; | |
| 5421 | 5420 | |
| 5422 | 5421 | if ($settings['element_tax_style'] === 'king-addons-grid-tax-style-1') { |
| 5423 | 5422 | $class .= " king-addons-pointer-$tax1_pointer king-addons-pointer-fx-$tax1_pointer_animation"; |
| 5424 | 5423 | } else { |
| @@ -5426,10 +5425,10 @@ | ||
| 5426 | 5425 | } |
| 5427 | 5426 | $class .= ' king-addons-pointer-line-fx'; |
| 5428 | 5427 | |
| 5429 | 5428 | $pointer_item_class = ( |
| 5430 | - (isset($this->get_settings()['tax1_pointer']) && $this->get_settings()['tax1_pointer'] !== 'none') || | |
| 5431 | - (isset($this->get_settings()['tax2_pointer']) && $this->get_settings()['tax2_pointer'] !== 'none') | |
| 5429 | + (isset(Core::displaySettings($this)['tax1_pointer']) && Core::displaySettings($this)['tax1_pointer'] !== 'none') || | |
| 5430 | + (isset(Core::displaySettings($this)['tax2_pointer']) && Core::displaySettings($this)['tax2_pointer'] !== 'none') | |
| 5432 | 5431 | ) ? 'king-addons-pointer-item' : ''; |
| 5433 | 5432 | |
| 5434 | 5433 | echo '<div class="' . esc_attr($class . ' ' . ($settings['element_tax_style'] ?? '')) . '">'; |
| 5435 | 5434 | echo '<div class="inner-block">'; |
| @@ -5437,15 +5436,15 @@ | ||
| 5437 | 5436 | $this->render_extra_text_and_icon($settings, 'before'); |
| 5438 | 5437 | |
| 5439 | 5438 | foreach ($terms as $term) { |
| 5440 | 5439 | // Check if premium color styling |
| 5441 | - $enable_custom_colors = $pointer ? $this->get_settings()['tax1_custom_color_switcher'] : ''; | |
| 5440 | + $enable_custom_colors = $pointer ? Core::displaySettings($this)['tax1_custom_color_switcher'] : ''; | |
| 5442 | 5441 | if ('yes' === $enable_custom_colors) { |
| 5443 | 5442 | $cfc_text = Grid_Ajax_Security::sanitize_css_color( |
| 5444 | - get_term_meta($term->term_id, sanitize_key($this->get_settings()['tax1_custom_color_field_text'] ?? ''), true) | |
| 5443 | + get_term_meta($term->term_id, sanitize_key(Core::displaySettings($this)['tax1_custom_color_field_text'] ?? ''), true) | |
| 5445 | 5444 | ); |
| 5446 | 5445 | $cfc_bg = Grid_Ajax_Security::sanitize_css_color( |
| 5447 | - get_term_meta($term->term_id, sanitize_key($this->get_settings()['tax1_custom_color_field_bg'] ?? ''), true) | |
| 5446 | + get_term_meta($term->term_id, sanitize_key(Core::displaySettings($this)['tax1_custom_color_field_bg'] ?? ''), true) | |
| 5448 | 5447 | ); |
| 5449 | 5448 | |
| 5450 | 5449 | if ($cfc_text || $cfc_bg) { |
| 5451 | 5450 | $style_block = 'color:' . esc_html($cfc_text) . '; background-color:' . esc_html($cfc_bg) . '; border-color:' . esc_html($cfc_bg) . ';'; |
| @@ -5682,9 +5681,9 @@ | ||
| 5682 | 5681 | } |
| 5683 | 5682 | |
| 5684 | 5683 | protected function render() |
| 5685 | 5684 | { |
| 5686 | - $settings = $this->get_settings(); | |
| 5685 | + $settings = Core::displaySettings($this); | |
| 5687 | 5686 | $render_attribute = ''; |
| 5688 | 5687 | |
| 5689 | 5688 | // If no premium, reset slider options |
| 5690 | 5689 | if (!king_addons_freemius()->can_use_premium_code__premium_only()) { |