Changeset 3415984
- Timestamp:
- 12/10/2025 04:56:04 AM (5 weeks ago)
- Location:
- wishlist/trunk
- Files:
-
- 6 edited
-
assets/settings-tabs/settings-tabs.css (modified) (1 diff)
-
assets/settings-tabs/settings-tabs.js (modified) (2 diffs)
-
includes/classes/class-settings-tabs.php (modified) (32 diffs)
-
includes/functions-ajax.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
wishlist.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wishlist/trunk/assets/settings-tabs/settings-tabs.css
r3230904 r3415984 685 685 686 686 687 .range-input {} 688 689 .range-input .range-value { 690 display: inline-block; 691 vertical-align: top; 692 margin: 0 0; 693 padding: 4px 10px; 694 background: #eee; 695 } 696 697 .text-icon {} 698 699 .text-icon .icon { 700 /* width: 30px; */ 701 background: #ddd; 702 /* height: 28px; */ 703 display: inline-block; 704 vertical-align: top; 705 text-align: center; 706 font-size: 14px; 707 padding: 5px 10px; 708 line-height: normal; 709 } 710 711 712 713 714 715 716 717 718 719 687 720 688 721 @media only screen and (min-width: 1024px) {} -
wishlist/trunk/assets/settings-tabs/settings-tabs.js
r3230904 r3415984 11 11 collapsible: true, 12 12 }); 13 13 $(".color-picker").wpColorPicker(); 14 14 $(".settings-tabs [colorPicker]").wpColorPicker(); 15 15 $(".datepicker").datepicker({ 16 dateFormat: "" 17 }); 18 19 $(document).on("keyup", ".text-icon input", function () { 20 val = $(this).val(); 21 if (val) { 22 $(this).parent().children(".icon").html(val); 23 } 24 }) 25 26 wp.codeEditor.initialize($('.code-editor'), { type: "text/javascript" }); 27 wp.codeEditor.initialize($('.css_editor'), { type: "text/css" }); 28 29 $(document).on("change", ".range", function () { 30 val = $(this).val(); 31 if (val) { 32 $(this).parent().children(".range-value").html(val); 33 } 34 }) 16 35 17 36 $(".settings-tabs .accordion[sortable='true']").sortable({ … … 197 216 }) 198 217 199 jQuery(document).on("click", ".settings-tabs .field-repeatable-wrapper .add-repeat-field", function () { 200 now = jQuery.now(); 201 add_html = $(this).attr('add_html'); 202 203 repeatable_html = add_html.replace(/TIMEINDEX/g, now); 204 205 $(this).parent().children('.repeatable-field-list').append(repeatable_html); 206 207 textarea_to_editor(); 208 209 210 }) 218 // jQuery(document).on("click", ".settings-tabs .field-repeatable-wrapper .add-repeat-field", function () { 219 // now = jQuery.now(); 220 // add_html = $(this).attr('add_html'); 221 222 // //console.log($(this)); 223 224 // repeatable_html = add_html.replace(/TIMEINDEX/g, now); 225 226 // $(this).parent().children('.repeatable-field-list').append(repeatable_html); 227 228 // textarea_to_editor(); 229 230 231 // }) 232 233 234 document.querySelectorAll(".add-repeat-field").forEach(item => { 235 item.addEventListener("click", function (e) { 236 const timestamp = Date.now(); 237 238 const wrapperid = e.target.getAttribute("data-wrapper-id"); 239 const add_html = e.target.getAttribute("data-add_html"); 240 repeatable_html = add_html.replace(/TIMEINDEX/g, timestamp); 241 242 console.log(wrapperid); 243 console.log(repeatable_html); 244 245 e.target.parentElement.querySelector('.repeatable-field-list').insertAdjacentHTML('beforeend', repeatable_html); 246 textarea_to_editor(); 247 }); 248 }); 249 250 251 252 253 254 255 211 256 212 257 -
wishlist/trunk/includes/classes/class-settings-tabs.php
r3230904 r3415984 4 4 class settings_tabs_field 5 5 { 6 7 public function allowed() 8 { 9 10 return wp_kses_allowed_html('post'); 11 } 12 public $custom = array( 13 'select' => array( 14 'name' => true, 15 'id' => true, 16 'class' => true, 17 'multiple' => true, 18 ), 19 'option' => array( 20 'value' => true, 21 'selected' => true, 22 ), 23 'optgroup' => array( 24 'label' => true, 25 ), 26 'input' => array( 27 'type' => true, 28 'name' => true, 29 'value' => true, 30 'class' => true, 31 'id' => true, 32 'checked' => true, 33 'placeholder' => true, 34 ), 35 'label' => array( 36 'for' => true, 37 'class' => true, 38 ), 39 ); 40 41 public function allowed_html() 42 { 43 44 return array_merge($this->allowed(), $this->custom); 45 } 46 47 6 48 //public $asset_dir_url = ''; 7 public $textdomain = 'settings-tabs'; 8 public function __construct() 9 { 10 // $this->asset_dir_url = isset($args['asset_dir_url']) ? $args['asset_dir_url'] : ''; 11 // $this->textdomain = isset($args['textdomain']) ? $args['textdomain'] : ''; 12 } 49 public function __construct() {} 50 51 52 53 54 55 56 57 58 13 59 function admin_scripts() 14 60 { … … 28 74 wp_enqueue_style('code-editor'); 29 75 wp_enqueue_script('jquery.lazy'); 76 wp_enqueue_script('jquery-ui-datepicker'); 77 30 78 if (function_exists('wp_enqueue_editor')) { 31 79 wp_enqueue_editor(); … … 237 285 <?php 238 286 $input_html = ob_get_clean(); 239 echo sprintf($field_template, $title, $input_html, $group_details);287 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($group_details))); 240 288 } 241 289 public function field_option_group($option) … … 290 338 <?php 291 339 $input_html = ob_get_clean(); 292 echo sprintf($field_template, $title, $input_html, $group_details);340 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($group_details)), $this->allowed_html()); 293 341 } 294 342 public function field_media($option) … … 310 358 $media_url = wp_get_attachment_url($value); 311 359 $media_type = get_post_mime_type($value); 312 $media_title = !empty($value) ? get_the_title($value) : __('Placeholder.jpg', $this->textdomain);360 $media_title = !empty($value) ? get_the_title($value) : "Placeholder"; 313 361 $media_url = !empty($media_url) ? $media_url : $default; 314 362 $media_url = !empty($media_url) ? $media_url : $placeholder; … … 354 402 <input class="media-input-value" type="hidden" name="<?php echo esc_attr($field_name); ?>" id="media_input_<?php echo esc_attr($css_id); ?>" value="<?php echo esc_attr($value); ?>" /> 355 403 <div class="media-upload button" id="media_upload_<?php echo esc_attr($css_id); ?>"> 356 <?php echo __('Upload', $this->textdomain); ?></div>357 <div placeholder="<?php echo esc_attr($placeholder); ?>" class="clear button" id="media_clear_<?php echo esc_attr($css_id); ?>"><?php echo __('Clear', $this->textdomain); ?></div>404 <?php echo "Upload"; ?></div> 405 <div placeholder="<?php echo esc_attr($placeholder); ?>" class="clear button" id="media_clear_<?php echo esc_attr($css_id); ?>"><?php echo 'Clear'; ?></div> 358 406 <div class="error-mgs"></div> 359 407 </div> 360 408 <?php 361 409 $input_html = ob_get_clean(); 362 echo (sprintf($field_template, $title, $input_html, $details));410 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 363 411 } 364 412 public function field_media_url($option) … … 414 462 <input type="text" placeholder="<?php echo esc_attr($placeholder); ?>" name="<?php echo esc_attr($field_name); ?>" id="media_input_<?php echo esc_attr($css_id); ?>" value="<?php echo esc_attr($value); ?>" /> 415 463 <div class="media-upload button" id="media_upload_<?php echo esc_attr($css_id); ?>"> 416 <?php echo __('Upload', $this->textdomain); ?></div>464 <?php echo 'Upload'; ?></div> 417 465 <div class="clear button" id="media_clear_<?php echo esc_attr($css_id); ?>"> 418 <?php echo __('Clear', $this->textdomain); ?></div>466 <?php echo 'Clear'; ?></div> 419 467 <div class="error-mgs"></div> 420 468 </div> 421 469 <?php 422 470 $input_html = ob_get_clean(); 423 echo (sprintf($field_template, $title, $input_html, $details));471 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 424 472 } 425 473 public function field_repeatable($option) … … 489 537 <div id="input-wrapper-<?php echo esc_attr($css_id); ?>" class=" input-wrapper field-repeatable-wrapper 490 538 field-repeatable-wrapper-<?php echo esc_attr($css_id); ?>"> 491 <div add_html="<?php echo esc_attr($fieldHtml); ?>" class="add-repeat-field"><i class="far fa-plus-square"></i>492 <?php _e('Add', $this->textdomain); ?></div>539 <div data-add_html="<?php echo esc_attr($fieldHtml); ?>" class="add-repeat-field" data-wrapper-id="<?php echo esc_attr($css_id); ?>"><i class="far fa-plus-square"></i> 540 <?php echo 'Add'; ?></div> 493 541 <div class="repeatable-field-list sortable" id="<?php echo esc_attr($css_id); ?>"> 494 542 <?php … … 545 593 <?php 546 594 $input_html = ob_get_clean(); 547 echo (sprintf($field_template, $title, $input_html, $details));595 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 548 596 } 549 597 public function field_select($option) … … 595 643 if ($multiple) : 596 644 ?> 597 <div class="button select-reset"><?php echo __('Reset', $this->textdomain); ?></div><br>645 <div class="button select-reset"><?php echo 'Reset'; ?></div><br> 598 646 <?php 599 647 endif; … … 604 652 <?php 605 653 $input_html = ob_get_clean(); 606 echo (sprintf($field_template, $title, $input_html, $details));654 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 607 655 } 608 656 public function field_select2($option) … … 653 701 <?php 654 702 $input_html = ob_get_clean(); 655 echo (sprintf($field_template, $title, $input_html, $details));703 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 656 704 } 657 705 public function field_text_multi($option) … … 679 727 <div id="input-wrapper-<?php echo esc_attr($id); ?>" class="input-wrapper input-text-multi-wrapper 680 728 input-text-multi-wrapper-<?php echo esc_attr($css_id); ?>"> 681 <span data-placeholder="<?php echo esc_attr($placeholder); ?>" data-sort="<?php echo esc_attr($sortable); ?>" data-clone="<?php echo esc_attr($allow_clone); ?>" data-name="<?php echo esc_attr($field_name); ?>[]" class="button add-item"><?php echo __('Add', $this->textdomain); ?></span>729 <span data-placeholder="<?php echo esc_attr($placeholder); ?>" data-sort="<?php echo esc_attr($sortable); ?>" data-clone="<?php echo esc_attr($allow_clone); ?>" data-name="<?php echo esc_attr($field_name); ?>[]" class="button add-item"><?php echo 'Add'; ?></span> 682 730 <div class="field-list <?php if ($sortable) { 683 731 echo 'sortable'; … … 721 769 <?php 722 770 $input_html = ob_get_clean(); 723 echo (sprintf($field_template, $title, $input_html, $details));771 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 724 772 } 725 773 public function field_hidden($option) … … 746 794 <?php 747 795 $input_html = ob_get_clean(); 748 echo (sprintf($field_template, $title, $input_html, $details));796 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 749 797 } 750 798 public function field_text($option) … … 770 818 <?php 771 819 $input_html = ob_get_clean(); 772 echo (sprintf($field_template, $title, $input_html, $details));820 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 773 821 } 774 822 public function field_number($option) … … 795 843 <?php 796 844 $input_html = ob_get_clean(); 797 echo (sprintf($field_template, $title, $input_html, $details));845 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 798 846 } 799 847 public function field_wp_editor($option) … … 827 875 <?php 828 876 $input_html = ob_get_clean(); 829 echo (sprintf($field_template, $title, $input_html, $details));877 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 830 878 } 831 879 public function field_text_icon($option) … … 849 897 <span class="icon"><?php echo esc_html($option_value); ?></span><input type="text" class="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($option_value); ?>" /> 850 898 </div> 851 <style type="text/css"> 852 .text-icon {} 853 854 .text-icon .icon { 855 /* width: 30px; */ 856 background: #ddd; 857 /* height: 28px; */ 858 display: inline-block; 859 vertical-align: top; 860 text-align: center; 861 font-size: 14px; 862 padding: 5px 10px; 863 line-height: normal; 864 } 865 </style> 866 <script> 867 jQuery(document).ready(function($) { 868 $(document).on("keyup", ".text-icon input", function() { 869 val = $(this).val(); 870 if (val) { 871 $(this).parent().children(".icon").html(val); 872 } 873 }) 874 }) 875 </script> 876 <?php 877 $input_html = ob_get_clean(); 878 echo (sprintf($field_template, $title, $input_html, $details)); 899 900 901 <?php 902 $input_html = ob_get_clean(); 903 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 879 904 } 880 905 public function field_range($option) … … 899 924 ?> 900 925 <div class="range-input"> 901 <span class="range-value"><?php echo esc_html($value); ?></span><input type="range" min="<?php if ($min) echo esc_attr($min); ?>" max="<?php if ($max) echo esc_attr($max); ?>" step="<?php if ($step) echo esc_attr($step); ?>" class="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" value="<?php echo esc_attr($value); ?>" />926 <span class="range-value"><?php echo esc_html($value); ?></span><input type="range" min="<?php if ($min) echo esc_attr($min); ?>" max="<?php if ($max) echo esc_attr($max); ?>" step="<?php if ($step) echo esc_attr($step); ?>" class="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" class="range" value="<?php echo esc_attr($value); ?>" /> 902 927 </div> 903 <script> 904 jQuery(document).ready(function($) { 905 $(document).on("change", "#<?php echo esc_attr($css_id); ?>", function() { 906 val = $(this).val(); 907 if (val) { 908 $(this).parent().children(".range-value").html(val); 909 } 910 }) 911 }) 912 </script> 913 <style type="text/css"> 914 .range-input {} 915 916 .range-input .range-value { 917 display: inline-block; 918 vertical-align: top; 919 margin: 0 0; 920 padding: 4px 10px; 921 background: #eee; 922 } 923 </style> 924 <?php 925 $input_html = ob_get_clean(); 926 echo (sprintf($field_template, $title, $input_html, $details)); 928 929 930 <?php 931 $input_html = ob_get_clean(); 932 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 927 933 } 928 934 public function field_textarea($option) … … 949 955 <?php 950 956 $input_html = ob_get_clean(); 951 echo (sprintf($field_template, $title, $input_html, $details));957 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 952 958 } 953 959 public function field_textarea_editor($option) … … 974 980 <?php 975 981 $input_html = ob_get_clean(); 976 echo (sprintf($field_template, $title, $input_html, $details));982 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 977 983 } 978 984 public function field_scripts_js($option) … … 991 997 $details = isset($option['details']) ? $option['details'] : ""; 992 998 $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; 993 $settings = wp_enqueue_code_editor(array('type' => 'text/javascript')); 994 $code_editor = wp_json_encode($settings); 995 ob_start(); 996 ?> 997 <textarea name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" cols="40" rows="5" placeholder="<?php echo esc_attr($placeholder); ?>"><?php echo esc_html($value); ?></textarea> 998 <script> 999 jQuery(document).ready(function($) { 1000 wp.codeEditor.initialize($('#<?php echo esc_attr($css_id); ?>'), <?php echo ($code_editor); ?>); 1001 }) 1002 </script> 1003 <?php 1004 $input_html = ob_get_clean(); 1005 echo (sprintf($field_template, $title, $input_html, $details)); 999 ob_start(); 1000 ?> 1001 <textarea name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" class="code-editor" cols="40" rows="5" placeholder="<?php echo esc_attr($placeholder); ?>"><?php echo esc_html($value); ?></textarea> 1002 1003 <?php 1004 $input_html = ob_get_clean(); 1005 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 1006 1006 } 1007 1007 public function field_scripts_css($option) … … 1019 1019 $title = isset($option['title']) ? $option['title'] : ""; 1020 1020 $details = isset($option['details']) ? $option['details'] : ""; 1021 $settings = wp_enqueue_code_editor(array('type' => 'text/css'));1022 $code_editor = wp_json_encode($settings);1023 1021 $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; 1024 1022 ?> … … 1026 1024 ob_start(); 1027 1025 ?> 1028 <textarea name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" cols="40" rows="5" placeholder="<?php echo esc_attr($placeholder); ?>"><?php echo esc_html($value); ?></textarea> 1029 <script> 1030 jQuery(document).ready(function($) { 1031 wp.codeEditor.initialize($('#<?php echo esc_attr($css_id); ?>'), <?php echo ($code_editor); ?>); 1032 }) 1033 </script> 1034 <?php 1035 $input_html = ob_get_clean(); 1036 echo (sprintf($field_template, $title, $input_html, $details)); 1026 <textarea name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" class="css_editor" cols="40" rows="5" placeholder="<?php echo esc_attr($placeholder); ?>"><?php echo esc_html($value); ?></textarea> 1027 1028 <?php 1029 $input_html = ob_get_clean(); 1030 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 1037 1031 } 1038 1032 public function field_checkbox($option) … … 1109 1103 endforeach; 1110 1104 $input_html = ob_get_clean(); 1111 echo (sprintf($field_template, $title, $input_html, $details));1105 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 1112 1106 } 1113 1107 public function field_radio_image($option) … … 1167 1161 <?php 1168 1162 $input_html = ob_get_clean(); 1169 echo (sprintf($field_template, $title, $input_html, $details));1163 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 1170 1164 } 1171 1165 public function field_datepicker($option) … … 1185 1179 $details = isset($option['details']) ? $option['details'] : ""; 1186 1180 $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; 1187 wp_enqueue_script('jquery-ui-datepicker'); 1188 wp_enqueue_style('jquery-ui'); 1189 ob_start(); 1190 ?> 1191 <input type="text" autocomplete="off" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($value); ?>" /> 1192 <script> 1193 jQuery(document).ready(function($) { 1194 $("#<?php echo esc_attr($css_id); ?>").datepicker({ 1195 dateFormat: "<?php echo esc_attr($format); ?>" 1196 }); 1197 }); 1198 </script> 1199 <?php 1200 $input_html = ob_get_clean(); 1201 echo (sprintf($field_template, $title, $input_html, $details)); 1181 1182 ob_start(); 1183 ?> 1184 <input type="text" autocomplete="off" name="<?php echo esc_attr($field_name); ?>" class="datepicker" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($value); ?>" format="<?php echo esc_attr($format); ?>" /> 1185 1186 <?php 1187 $input_html = ob_get_clean(); 1188 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 1202 1189 } 1203 1190 public function field_colorpicker($option) … … 1221 1208 <?php 1222 1209 $input_html = ob_get_clean(); 1223 echo (sprintf($field_template, $title, $input_html, $details));1210 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 1224 1211 } 1225 1212 public function field_colorpicker_multi($option) … … 1245 1232 <div class=""> 1246 1233 <span><?php echo esc_html($arg_key); ?></span> 1247 <input name="<?php echo esc_attr($field_name); ?>[<?php echo esc_attr($arg_key); ?>]" id="<?php echo esc_attr($arg_key . '-' . $css_id); ?>" value="<?php echo esc_attr($item_value); ?>" /> 1248 <script> 1249 jQuery(document).ready(function($) { 1250 $("#<?php echo esc_attr($arg_key . '-' . $css_id); ?>").wpColorPicker(); 1251 }); 1252 </script> 1234 <input name="<?php echo esc_attr($field_name); ?>[<?php echo esc_attr($arg_key); ?>]" id="<?php echo esc_attr($arg_key . '-' . $css_id); ?>" class="color-picker" value="<?php echo esc_attr($item_value); ?>" /> 1235 1253 1236 </div> 1254 1237 <?php … … 1256 1239 endif; 1257 1240 $input_html = ob_get_clean(); 1258 echo (sprintf($field_template, $title, $input_html, $details));1241 echo wp_kses(sprintf($field_template, esc_html($title), $input_html, wp_kses_post($details)), $this->allowed_html()); 1259 1242 } 1260 1243 public function field_custom_html($option) … … 1269 1252 $title = isset($option['title']) ? $option['title'] : ""; 1270 1253 $details = isset($option['details']) ? $option['details'] : ""; 1271 echo sprintf($field_template, $title, $html, $details);1254 echo wp_kses(sprintf($field_template, esc_html($title), $html, wp_kses_post($details)), $this->allowed_html()); 1272 1255 } 1273 1256 } -
wishlist/trunk/includes/functions-ajax.php
r3406134 r3415984 331 331 332 332 if (!empty($default_wishlist_id) && in_array($default_wishlist_id, $wishlisted_array)) 333 echo "<li class='menu_item menu_item-{ $default_wishlist_id} wishlist_saved' wishlist='$default_wishlist_id'><i class='fa fa-heart' aria-hidden='true'></i> " . get_the_title($default_wishlist_id) . " <span class='counter'>$total_items</spam></li>";334 else echo "<li class='menu_item menu_item- {$default_wishlist_id}' wishlist='$default_wishlist_id'><i class='fa fa-heart' aria-hidden='true'></i> " . get_the_title($default_wishlist_id) . " <span class='counter'>$total_items</spam></li>";333 echo "<li class='menu_item menu_item-{" . esc_attr($default_wishlist_id) . "} wishlist_saved' wishlist='" . esc_attr($default_wishlist_id) . "'><i class='fa fa-heart' aria-hidden='true'></i> " . esc_html(get_the_title($default_wishlist_id)) . " <span class='counter'>" . esc_html($total_items) . "</spam></li>"; 334 else echo "<li class='menu_item menu_item-" . esc_attr($default_wishlist_id) . "' wishlist='" . esc_attr($default_wishlist_id) . "'><i class='fa fa-heart' aria-hidden='true'></i> " . esc_html(get_the_title($default_wishlist_id)) . " <span class='counter'>" . esc_html($total_items) . "</spam></li>"; 335 335 336 336 $wishlist_array = get_posts(array( … … 346 346 347 347 if ($wishlisted_array && in_array($list->ID, $wishlisted_array)) 348 echo "<li class='menu_item menu_item- {$list->ID} wishlist_saved' wishlist='{$list->ID}'><i class='fa fa-heart' aria-hidden='true'></i> {$list->post_title} <span class='counter'>$total_items</spam></li>";349 else echo "<li class='menu_item menu_item- {$list->ID}' wishlist='{$list->ID}'><i class='fa fa-heart' aria-hidden='true'></i> {$list->post_title} <span class='counter'>$total_items</spam></li>";348 echo "<li class='menu_item menu_item-" . esc_attr($list->ID) . " wishlist_saved' wishlist='" . esc_attr($list->ID) . "'><i class='fa fa-heart' aria-hidden='true'></i> " . esc_html($list->post_title) . " <span class='counter'>" . esc_html($total_items) . "</spam></li>"; 349 else echo "<li class='menu_item menu_item-" . esc_attr($list->ID) . "' wishlist='" . esc_attr($list->ID) . "'><i class='fa fa-heart' aria-hidden='true'></i> " . esc_html($list->post_title) . " <span class='counter'>" . esc_html($total_items) . "</spam></li>"; 350 350 351 351 endforeach; 352 352 353 echo "<li class='menu_item add_new'><i class='fa fa-plus'></i> " . __('Add New', 'wishlist') . "</li>";353 echo "<li class='menu_item add_new'><i class='fa fa-plus'></i> " . esc_html_e('Add New', 'wishlist') . "</li>"; 354 354 ?> 355 355 <li class='menu_item create'> -
wishlist/trunk/readme.txt
r3406134 r3415984 4 4 Tags: Wishlist, Wish list, Wish-list, WooCommerce Wishlist, product wishlist, Wishlist plugin 5 5 Requires at least: 3.8 6 Tested up to: 6. 87 Stable tag: 1.0.4 56 Tested up to: 6.9 7 Stable tag: 1.0.46 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 123 123 124 124 == Changelog == 125 126 = 1.0.46 = 127 * 2025-12-10 fix - Escaping issue fixed. 128 * 2025-12-10 fix - Latest WP compatibility issue check. 125 129 126 130 = 1.0.45 = -
wishlist/trunk/wishlist.php
r3406134 r3415984 4 4 Plugin URI: https://www.pickplugins.com/item/woocommerce-wishlist/?ref=wordpress.org 5 5 Description: Add wish-list feature to your WooCommerce product or any post types. 6 Version: 1.0.4 56 Version: 1.0.46 7 7 Text Domain: wishlist 8 8 Author: PickPlugins
Note: See TracChangeset
for help on using the changeset viewer.