Plugin Directory

Changeset 3415984


Ignore:
Timestamp:
12/10/2025 04:56:04 AM (5 weeks ago)
Author:
pickplugins
Message:

version update

Location:
wishlist/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • wishlist/trunk/assets/settings-tabs/settings-tabs.css

    r3230904 r3415984  
    685685
    686686
     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
    687720
    688721@media only screen and (min-width: 1024px) {}
  • wishlist/trunk/assets/settings-tabs/settings-tabs.js

    r3230904 r3415984  
    1111            collapsible: true,
    1212        });
    13 
     13        $(".color-picker").wpColorPicker();
    1414        $(".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        })
    1635
    1736        $(".settings-tabs .accordion[sortable='true']").sortable({
     
    197216        })
    198217
    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
    211256
    212257
  • wishlist/trunk/includes/classes/class-settings-tabs.php

    r3230904 r3415984  
    44  class settings_tabs_field
    55  {
     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
    648    //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
    1359    function admin_scripts()
    1460    {
     
    2874      wp_enqueue_style('code-editor');
    2975      wp_enqueue_script('jquery.lazy');
     76      wp_enqueue_script('jquery-ui-datepicker');
     77
    3078      if (function_exists('wp_enqueue_editor')) {
    3179        wp_enqueue_editor();
     
    237285    <?php
    238286      $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)));
    240288    }
    241289    public function field_option_group($option)
     
    290338    <?php
    291339      $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());
    293341    }
    294342    public function field_media($option)
     
    310358      $media_url    = wp_get_attachment_url($value);
    311359      $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";
    313361      $media_url = !empty($media_url) ? $media_url : $default;
    314362      $media_url = !empty($media_url) ? $media_url : $placeholder;
     
    354402        <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); ?>" />
    355403        <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>
    358406        <div class="error-mgs"></div>
    359407      </div>
    360408    <?php
    361409      $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());
    363411    }
    364412    public function field_media_url($option)
     
    414462        <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); ?>" />
    415463        <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>
    417465        <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>
    419467        <div class="error-mgs"></div>
    420468      </div>
    421469    <?php
    422470      $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());
    424472    }
    425473    public function field_repeatable($option)
     
    489537      <div id="input-wrapper-<?php echo esc_attr($css_id); ?>" class=" input-wrapper field-repeatable-wrapper
    490538            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>
    493541        <div class="repeatable-field-list sortable" id="<?php echo esc_attr($css_id); ?>">
    494542          <?php
     
    545593    <?php
    546594      $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());
    548596    }
    549597    public function field_select($option)
     
    595643      if ($multiple) :
    596644      ?>
    597         <div class="button select-reset"><?php echo __('Reset', $this->textdomain); ?></div><br>
     645        <div class="button select-reset"><?php echo 'Reset'; ?></div><br>
    598646      <?php
    599647      endif;
     
    604652    <?php
    605653      $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());
    607655    }
    608656    public function field_select2($option)
     
    653701    <?php
    654702      $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());
    656704    }
    657705    public function field_text_multi($option)
     
    679727      <div id="input-wrapper-<?php echo esc_attr($id); ?>" class="input-wrapper input-text-multi-wrapper
    680728            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>
    682730        <div class="field-list <?php if ($sortable) {
    683731                                  echo 'sortable';
     
    721769    <?php
    722770      $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());
    724772    }
    725773    public function field_hidden($option)
     
    746794    <?php
    747795      $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());
    749797    }
    750798    public function field_text($option)
     
    770818    <?php
    771819      $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());
    773821    }
    774822    public function field_number($option)
     
    795843    <?php
    796844      $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());
    798846    }
    799847    public function field_wp_editor($option)
     
    827875    <?php
    828876      $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());
    830878    }
    831879    public function field_text_icon($option)
     
    849897        <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); ?>" />
    850898      </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());
    879904    }
    880905    public function field_range($option)
     
    899924    ?>
    900925      <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); ?>" />
    902927      </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());
    927933    }
    928934    public function field_textarea($option)
     
    949955    <?php
    950956      $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());
    952958    }
    953959    public function field_textarea_editor($option)
     
    974980    <?php
    975981      $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());
    977983    }
    978984    public function field_scripts_js($option)
     
    991997      $details             = isset($option['details']) ? $option['details'] : "";
    992998      $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());
    10061006    }
    10071007    public function field_scripts_css($option)
     
    10191019      $title            = isset($option['title']) ? $option['title'] : "";
    10201020      $details         = isset($option['details']) ? $option['details'] : "";
    1021       $settings = wp_enqueue_code_editor(array('type' => 'text/css'));
    1022       $code_editor = wp_json_encode($settings);
    10231021      $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id;
    10241022    ?>
     
    10261024      ob_start();
    10271025      ?>
    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());
    10371031    }
    10381032    public function field_checkbox($option)
     
    11091103        endforeach;
    11101104      $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());
    11121106    }
    11131107    public function field_radio_image($option)
     
    11671161    <?php
    11681162      $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());
    11701164    }
    11711165    public function field_datepicker($option)
     
    11851179      $details             = isset($option['details']) ? $option['details'] : "";
    11861180      $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());
    12021189    }
    12031190    public function field_colorpicker($option)
     
    12211208      <?php
    12221209      $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());
    12241211    }
    12251212    public function field_colorpicker_multi($option)
     
    12451232          <div class="">
    12461233            <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
    12531236          </div>
    12541237<?php
     
    12561239      endif;
    12571240      $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());
    12591242    }
    12601243    public function field_custom_html($option)
     
    12691252      $title            = isset($option['title']) ? $option['title'] : "";
    12701253      $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());
    12721255    }
    12731256  }
  • wishlist/trunk/includes/functions-ajax.php

    r3406134 r3415984  
    331331
    332332    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>";
    335335
    336336    $wishlist_array = get_posts(array(
     
    346346
    347347        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>";
    350350
    351351    endforeach;
    352352
    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>";
    354354    ?>
    355355    <li class='menu_item create'>
  • wishlist/trunk/readme.txt

    r3406134 r3415984  
    44    Tags: Wishlist, Wish list, Wish-list, WooCommerce Wishlist, product wishlist, Wishlist plugin
    55    Requires at least: 3.8
    6     Tested up to: 6.8
    7     Stable tag: 1.0.45
     6    Tested up to: 6.9
     7    Stable tag: 1.0.46
    88    License: GPLv2 or later
    99    License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    123123
    124124== Changelog ==
     125
     126    = 1.0.46 =
     127    * 2025-12-10 fix - Escaping issue fixed.
     128    * 2025-12-10 fix - Latest WP compatibility issue check.
    125129
    126130    = 1.0.45 =
  • wishlist/trunk/wishlist.php

    r3406134 r3415984  
    44Plugin URI: https://www.pickplugins.com/item/woocommerce-wishlist/?ref=wordpress.org
    55Description: Add wish-list feature to your WooCommerce product or any post types.
    6 Version: 1.0.45
     6Version: 1.0.46
    77Text Domain: wishlist
    88Author: PickPlugins
Note: See TracChangeset for help on using the changeset viewer.