Plugin Directory

Changeset 3426531


Ignore:
Timestamp:
12/23/2025 10:58:24 PM (3 months ago)
Author:
sajib1223
Message:

Update to version 2.5.4 from GitHub

Location:
w4-post-list
Files:
18 edited
1 copied

Legend:

Unmodified
Added
Removed
  • w4-post-list/tags/2.5.4/assets/block/build.asset.php

    r3200437 r3426531  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '1d6f11a578aaa0a1101c');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => 'b506accc7fb0f97ed4b3');
  • w4-post-list/tags/2.5.4/assets/block/build.js

    r3200437 r3426531  
    1 !function(){"use strict";var t={n:function(e){var s=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(s,{a:s}),s},d:function(e,s){for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.blocks,s=window.wp.i18n,i=window.wp.components,o=window.wp.blockEditor,n=window.wp.apiFetch,r=t.n(n),l=window.wp.element,c=window.wp.serverSideRender,a=t.n(c),p=window.ReactJSXRuntime;class d extends l.Component{constructor(t){super(t),this.state={choices:[]},this.onListSearch=this.onListSearch.bind(this),this.onListSelect=this.onListSelect.bind(this)}componentDidMount(){const{listId:t}=this.props.attributes;parseInt(t,10)>0&&this.loadChoices({include:t})}loadChoices({search:t,include:e}){let s="/wp/v2/w4pl?_fields=id,title&status=publish,pending,draft&per_page=10&_locale=user";t&&(s+="&search="+t),e&&(s+="&include[]="+e),r()({path:s}).then((t=>{const e=this.formatChoices(t);this.setState({choices:e})}))}formatChoices(t){return t?t.map((t=>({value:t.id.toString(),label:`${t.title.rendered} (#${t.id})`}))):[]}onListSearch(t){this.loadChoices({search:t})}onListSelect(t){this.props.setAttributes({listId:t})}render(){const{attributes:t}=this.props,{choices:e}=this.state;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(o.InspectorControls,{children:(0,p.jsxs)(i.PanelBody,{title:(0,s.__)("Settings","w4-post-list"),children:[(0,p.jsx)(i.PanelRow,{children:(0,p.jsx)(i.ComboboxControl,{label:"Select a list",value:t.listId,options:e,onChange:this.onListSelect,onFilterValueChange:this.onListSearch})}),(0,p.jsx)(i.PanelRow,{children:(0,p.jsxs)("p",{children:[(0,s.__)("Or","w4-post-list")," ",(0,p.jsx)("a",{target:"_blank",href:"post-new.php?post_type=w4pl",children:(0,s.__)("Create a new list","w4-post-list")})]})})]})}),(0,p.jsx)(i.Disabled,{children:(0,p.jsx)(a(),{block:"w4-post-list/postlist",attributes:t})})]})}}(0,e.registerBlockType)("w4-post-list/postlist",{title:(0,s.__)("W4 Post List","w4-post-list"),description:(0,s.__)("Display a list from w4 post list plugin.","w4-post-list"),supports:{align:!1,html:!1},icon:"list-view",category:"widgets",attributes:{listId:{type:"string",default:""}},edit:d})}();
     1!function(){"use strict";var t={n:function(e){var s=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(s,{a:s}),s},d:function(e,s){for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.blocks,s=window.wp.i18n,i=window.wp.components,o=window.wp.blockEditor,n=window.wp.apiFetch,r=t.n(n),l=window.wp.element,c=window.wp.serverSideRender,a=t.n(c),p=window.ReactJSXRuntime;class d extends l.Component{constructor(t){super(t),this.state={choices:[]},this.onListSearch=this.onListSearch.bind(this),this.onListSelect=this.onListSelect.bind(this)}componentDidMount(){const{listId:t}=this.props.attributes;parseInt(t,10)>0&&this.loadChoices({include:t})}loadChoices({search:t,include:e}){let s="/wp/v2/w4pl?_fields=id,title&status=publish,pending,draft&per_page=10&_locale=user";t&&(s+="&search="+t),e&&(s+="&include[]="+e),r()({path:s}).then(t=>{const e=this.formatChoices(t);this.setState({choices:e})})}formatChoices(t){return t?t.map(t=>({value:t.id.toString(),label:`${t.title.rendered} (#${t.id})`})):[]}onListSearch(t){this.loadChoices({search:t})}onListSelect(t){this.props.setAttributes({listId:t})}render(){const{attributes:t}=this.props,{choices:e}=this.state;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(o.InspectorControls,{children:(0,p.jsxs)(i.PanelBody,{title:(0,s.__)("Settings","w4-post-list"),children:[(0,p.jsx)(i.PanelRow,{children:(0,p.jsx)(i.ComboboxControl,{label:"Select a list",value:t.listId,options:e,onChange:this.onListSelect,onFilterValueChange:this.onListSearch})}),(0,p.jsx)(i.PanelRow,{children:(0,p.jsxs)("p",{children:[(0,s.__)("Or","w4-post-list")," ",(0,p.jsx)("a",{target:"_blank",href:"post-new.php?post_type=w4pl",children:(0,s.__)("Create a new list","w4-post-list")})]})})]})}),(0,p.jsx)(i.Disabled,{children:(0,p.jsx)(a(),{block:"w4-post-list/postlist",attributes:t})})]})}}(0,e.registerBlockType)("w4-post-list/postlist",{title:(0,s.__)("W4 Post List","w4-post-list"),description:(0,s.__)("Display a list from w4 post list plugin.","w4-post-list"),supports:{align:!1,html:!1},icon:"list-view",category:"widgets",attributes:{listId:{type:"string",default:""}},edit:d})}();
  • w4-post-list/tags/2.5.4/assets/js/form.min.js

    r2878549 r3426531  
    1 !function(o){o(document).ready(function(){function d(t){return t.split(/,\s*/)}o(".wff_ajax_form").each(function(){var e=o(this),a=e.find(".form_button"),n=e.find(".form_action").val()||"",i=(e.find(".wffwt_submit").append('<div class="wf_notes"></div>'),e.find(".wf_notes"));a.click(function(t){t.preventDefault();t=e.serialize();if(i.removeClass("_error _ok").empty(),a.hasClass("ld"))return i.html("Please hold on till the last request completes").addClass("_error"),!1;a.addClass("ld").attr("disabled","disabled"),e.data("loading_text"),i.html(e.data("loading_text")).addClass("_note ld"),o.post(ajaxurl,t).done(function(t){"0"==t?i.html("Invalid form response.").addClass("_error"):i.html(t.html).addClass("_"+t.status),n&&o(window).trigger(n,t)}).complete(function(t){a.removeClass("ld").removeAttr("disabled"),i.removeClass("ld")})})}),o(document.body).on("click",".wff_ajax_action_btn",function(t){t.preventDefault();var e,a=o(this),n=a.data("action")||"",i=a.data("target")||"";return _confirm=a.data("confirm")||"",_alert=a.data("alert"),!(a.hasClass("ld")||""==n||_confirm&&!confirm(_confirm))&&(e=a.data("form")?o(a.data("form")).serialize()+"&action="+n:a.data(),a.addClass("ld").attr("disabled","disabled"),void o.post(ajaxurl,e).done(function(t){"ok"!=t.status&&"error"!=t.status||(i?o(i).html(t.html):"1"==_alert&&alert(t.html)),o(window).trigger(n,[t,e,a])}).complete(function(){a.removeClass("ld").removeAttr("disabled")}))}),o(document.body).on("click",".wff_clone_btn",function(t){t.preventDefault();var t=o(this).closest(".wff_clone_wrap"),e=t.find(".wff_clone_to"),a=t.find(".wff_clone_from").html();return e.append(a),o(window).trigger("w4pl/row_cloned"),""!=t.attr("id")&&o(window).trigger("wff_cloned_"+t.attr("id")),!1}),o(document.body).on("click",".wff_clone_remove_btn",function(t){return t.preventDefault(),o(this).closest(".wff_clone_item").remove(),!1}),o(".wff_clone_to.sortable").sortable({items:"tr",handle:".wff_clone_drag_handle",helper:function(t,e){var a=e.children(),e=e.clone();return e.children().each(function(t){o(this).width(a.eq(t).width())}),e}}),o(".checkbox_limit2").each(function(t,e){var a=o(this),n=a.data("max"),i=a.find("input[type=checkbox]:checked").length>=n;a.find("input[type=checkbox]").not(":checked").attr("disabled",i),a.find("input[type=checkbox]").click(function(){var t=a.find("input[type=checkbox]:checked").length>=n;a.find("input[type=checkbox]").not(":checked").attr("disabled",t)})}),o(".checkbox_limit").each(function(t,e){var a=o(this);a.find("input[type=checkbox]").click(function(){var t=o(this);!function t(e,a){var n=void 0!==a.attr("checked"),a=a.data("parent"),i=o("#term_"+a),c=(0<i.length&&(!n&&i.is(":checked")?(_shiblings=o("input[data-parent="+a+"]:checked").length)<1&&i.removeAttr("checked").removeAttr("disabled"):n&&i.not(":checked")&&i.attr("checked",!0).attr("disabled",!0),t(e,i)),0),a=(e.find("input[type=checkbox]:checked").each(function(t,e){o("input[data-parent="+o(e).data("tid")+"]:checked").length<1&&c++}),c>=e.data("max"));e.find("input[type=checkbox]:checked"),e.find("input[type=checkbox]").not(":checked").attr("disabled",a)}(a,t)})}),o(".tags_limit").each(function(t,e){var a=o(this),n=a.data("max"),i=a.data("sep");a.find("input[type=text]").bind("keypress",function(t){String.fromCharCode(t.which)==i&&8!=t.which&&0!=t.which&&(t.which<48||57<t.which)&&46!=t.which&&a.find("input[type=text]").val().replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"").split(i).length>=n&&t.preventDefault()})}),o("[data-term_suggest2]").each(function(t,e){var a=o(e),n=a.find("input"),e=a.data("term_suggest");n.suggest(UGC.ajaxurl+"?action=UGC_term_suggest&tax="+e,{delay:500,minchars:2,multiple:1,onSelect:function(t){a.hasClass("tags_limit")&&(tags=(tags=(tags=a.find("input[type=text]").val()).replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")).split(a.data("sep"))).length>=a.data("max")&&n.val(tags.join(a.data("sep")+" "))}})}),o("[data-auc]").each(function(t,e){var e=o(e),a=e.find("input"),n=e.data("max")||10,i=e.data("sep")||",",c=e.data("auc");if(c.length<1)return!1;a.bind("keydown focus",function(t){t.keyCode===o.ui.keyCode.TAB&&o(this).data("ui-autocomplete").menu.active&&t.preventDefault()}).autocomplete({minLength:0,source:function(t,e){e(o.ui.autocomplete.filter(c,d(t.term).pop()).slice(0,10))},focus:function(){return!1},select:function(t,e){var a=d(this.value);return a.pop(),a.push(e.item.value),a.length>=n||a.push(""),this.value=a.join(i+" "),!1}})})})}(jQuery);
     1(o=>{o(document).ready(function(){function d(t){return t.split(/,\s*/)}o(".wff_ajax_form").each(function(){var e=o(this),a=e.find(".form_button"),n=e.find(".form_action").val()||"",i=(e.find(".wffwt_submit").append('<div class="wf_notes"></div>'),e.find(".wf_notes"));a.click(function(t){t.preventDefault();t=e.serialize();if(i.removeClass("_error _ok").empty(),a.hasClass("ld"))return i.html("Please hold on till the last request completes").addClass("_error"),!1;a.addClass("ld").attr("disabled","disabled"),e.data("loading_text"),i.html(e.data("loading_text")).addClass("_note ld"),o.post(ajaxurl,t).done(function(t){"0"==t?i.html("Invalid form response.").addClass("_error"):i.html(t.html).addClass("_"+t.status),n&&o(window).trigger(n,t)}).complete(function(t){a.removeClass("ld").removeAttr("disabled"),i.removeClass("ld")})})}),o(document.body).on("click",".wff_ajax_action_btn",function(t){t.preventDefault();var e,a=o(this),n=a.data("action")||"",i=a.data("target")||"";return _confirm=a.data("confirm")||"",_alert=a.data("alert"),!(a.hasClass("ld")||""==n||_confirm&&!confirm(_confirm))&&(e=a.data("form")?o(a.data("form")).serialize()+"&action="+n:a.data(),a.addClass("ld").attr("disabled","disabled"),void o.post(ajaxurl,e).done(function(t){"ok"!=t.status&&"error"!=t.status||(i?o(i).html(t.html):"1"==_alert&&alert(t.html)),o(window).trigger(n,[t,e,a])}).complete(function(){a.removeClass("ld").removeAttr("disabled")}))}),o(document.body).on("click",".wff_clone_btn",function(t){t.preventDefault();var t=o(this).closest(".wff_clone_wrap"),e=t.find(".wff_clone_to"),a=t.find(".wff_clone_from").html();return e.append(a),o(window).trigger("w4pl/row_cloned"),""!=t.attr("id")&&o(window).trigger("wff_cloned_"+t.attr("id")),!1}),o(document.body).on("click",".wff_clone_remove_btn",function(t){return t.preventDefault(),o(this).closest(".wff_clone_item").remove(),!1}),o(".wff_clone_to.sortable").sortable({items:"tr",handle:".wff_clone_drag_handle",helper:function(t,e){var a=e.children(),e=e.clone();return e.children().each(function(t){o(this).width(a.eq(t).width())}),e}}),o(".checkbox_limit2").each(function(t,e){var a=o(this),n=a.data("max"),i=a.find("input[type=checkbox]:checked").length>=n;a.find("input[type=checkbox]").not(":checked").attr("disabled",i),a.find("input[type=checkbox]").click(function(){var t=a.find("input[type=checkbox]:checked").length>=n;a.find("input[type=checkbox]").not(":checked").attr("disabled",t)})}),o(".checkbox_limit").each(function(t,e){var a=o(this);a.find("input[type=checkbox]").click(function(){var t=o(this);!function t(e,a){var n=void 0!==a.attr("checked"),a=a.data("parent"),i=o("#term_"+a),c=(0<i.length&&(!n&&i.is(":checked")?(_shiblings=o("input[data-parent="+a+"]:checked").length)<1&&i.removeAttr("checked").removeAttr("disabled"):n&&i.not(":checked")&&i.attr("checked",!0).attr("disabled",!0),t(e,i)),0),a=(e.find("input[type=checkbox]:checked").each(function(t,e){o("input[data-parent="+o(e).data("tid")+"]:checked").length<1&&c++}),c>=e.data("max"));e.find("input[type=checkbox]:checked"),e.find("input[type=checkbox]").not(":checked").attr("disabled",a)}(a,t)})}),o(".tags_limit").each(function(t,e){var a=o(this),n=a.data("max"),i=a.data("sep");a.find("input[type=text]").bind("keypress",function(t){String.fromCharCode(t.which)==i&&8!=t.which&&0!=t.which&&(t.which<48||57<t.which)&&46!=t.which&&a.find("input[type=text]").val().replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"").split(i).length>=n&&t.preventDefault()})}),o("[data-term_suggest2]").each(function(t,e){var a=o(e),n=a.find("input"),e=a.data("term_suggest");n.suggest(UGC.ajaxurl+"?action=UGC_term_suggest&tax="+e,{delay:500,minchars:2,multiple:1,onSelect:function(t){a.hasClass("tags_limit")&&(tags=(tags=(tags=a.find("input[type=text]").val()).replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")).split(a.data("sep"))).length>=a.data("max")&&n.val(tags.join(a.data("sep")+" "))}})}),o("[data-auc]").each(function(t,e){var e=o(e),a=e.find("input"),n=e.data("max")||10,i=e.data("sep")||",",c=e.data("auc");if(c.length<1)return!1;a.bind("keydown focus",function(t){t.keyCode===o.ui.keyCode.TAB&&o(this).data("ui-autocomplete").menu.active&&t.preventDefault()}).autocomplete({minLength:0,source:function(t,e){e(o.ui.autocomplete.filter(c,d(t.term).pop()).slice(0,10))},focus:function(){return!1},select:function(t,e){var a=d(this.value);return a.pop(),a.push(e.item.value),a.length>=n||a.push(""),this.value=a.join(i+" "),!1}})})})})(jQuery);
  • w4-post-list/tags/2.5.4/assets/js/list-editor.min.js

    r2878549 r3426531  
    1 !function(d){function t(){var e=d(".w4pl_active .w4pl_group_fields").outerHeight();d("#w4pl_list_options").css("minHeight",e)}d(document).on("w4pl/form_loaded",function(e){t(),d("#w4pl_orderby").trigger("change")}),d(document).ready(function(){d(document).trigger("w4pl/form_loaded",d("#w4pl_list_options"))}),d(document.body).on("change",".w4pl_field_compare",function(){(-1!==d.inArray(d(this).val(),["IN","NOT IN","BETWEEN","NOT BETWEEN"])?d(this).parent("td").next("td").children(".item").show().children(".button"):(d(this).parent("td").next("td").children(".item").hide().children(".button").hide(),d(this).parent("td").next("td").find(".item:first"))).show()}),d(document.body).on("click",".w4pl_clone_parent",function(e){var t=d(this).parent(".wpce_parent_item").clone();return d(this).parent(".wpce_parent_item").after(t),d(this).parent(".wpce_parent_item").parent().find(".w4pl_remove_parent").show(),!1}),d(document.body).on("click",".w4pl_remove_parent",function(e){var t=d(this);return 0==t.parent(".wpce_parent_item").siblings().length?t.hide():(d(".w4pl_remove_parent").show(),t.parent(".wpce_parent_item").remove()),!1}),d(document.body).on("change",".w4pl_onchange_lfr",function(){var e=d(this).parents(".w4pl_field_group").attr("id"),t=null,n=e;d("#publish").addClass("disabled"),null===n&&(n="w4pl_field_group_type"),null===t&&(t=d("#w4pl_list_options :input").serialize()+"&action=w4pl_list_edit_form_html"),d("#w4pl_list_options").append('<div id="w4pl_lo"></div>'),d.post(ajaxurl,t,function(e){return d("#w4pl_list_options").replaceWith(e),d("#"+n).addClass("w4pl_active"),d(document).trigger("w4pl/form_loaded",d("#w4pl_list_options")),d("#publish").removeClass("disabled"),!1})}),d(document.body).on("click",".w4pl_toggler",function(){return d(d(this).data("target")).toggle(),t(),!1}),d(document.body).on("change","#w4pl_orderby",function(){"meta_value"==d(this).val()||"meta_value_num"==d(this).val()?d("#orderby_meta_key_wrap").show():d("#orderby_meta_key_wrap").hide()}),d(document.body).on("click",".w4pl_group_title",function(){return d("#w4pl_list_options").height("auto"),d(".w4pl_field_group").removeClass("w4pl_active"),d(this).parent(".w4pl_field_group").addClass("w4pl_active"),d("#w4pl_tab_id").val(d(this).parent(".w4pl_field_group").attr("id")),t(),!1}),d(document.body).on("click","#w4pl_template_buttons a",function(e){var t,n="w4pl_template",r=d(this).data("code"),a=(n=document.getElementById(n)).scrollTop,l=0,i=n.selectionStart||"0"==n.selectionStart?"ff":!!document.selection&&"ie",_=("ie"==i?(n.focus(),(t=document.selection.createRange()).moveStart("character",-n.value.length),l=t.text.length):"ff"==i&&(l=n.selectionStart),n.value.substring(0,l)),o=n.value.substring(l,n.value.length);return n.value=_+r+o,l+=r.length,"ie"==i?(n.focus(),(t=document.selection.createRange()).moveStart("character",-n.value.length),t.moveStart("character",l),t.moveEnd("character",0),t.select()):"ff"==i&&(n.selectionStart=l,n.selectionEnd=l,n.focus()),n.scrollTop=a,!1}),d(document).ready(function(){function e(){d("#w4pl_meta_query_table tbody tr").each(function(e,t){t=d(t);t.find(".wffi_w4pl_meta_query_key").attr("name","w4pl[meta_query][key]["+e+"]"),t.find(".wffi_w4pl_meta_query_compare").attr("name","w4pl[meta_query][compare]["+e+"]"),t.find(".wffi_w4pl_meta_query_value").attr("name","w4pl[meta_query][value]["+e+"][]"),t.find("td.values").attr("data-pos",e),d(this).replaceWith(t)})}function n(e){var t=e.children(".item"),n=e.data("pos");t.each(function(e,t){t=d(t);t.find("input").attr("name","w4pl[meta_query][value]["+n+"]["+e+"]"),d(this).replaceWith(t)})}d(document.body).on("click","#w4pl_meta_query_add_btn",function(){return d(d("#w4pl_meta_query_clone tbody").html()).appendTo("#w4pl_meta_query_table tbody"),e(),!1}),d(document.body).on("click",".w4pl_meta_query_remove_btn",function(){return d(this).parents("tr").remove(),e(),!1}),d(document.body).on("click",".w4pl_meta_query_value_add",function(){d(".w4pl_meta_query_value_del").show();var e=d(this).parent(".item").parent("td");return d(this).parent(".item").after(d("#w4pl_meta_query_value_clone").html()),n(e),!1}),d(document.body).on("click",".w4pl_meta_query_value_del",function(){d(".w4pl_meta_query_value_del").show();var e=d(this).parent(".item").parent("td"),t=d(this);return 1==e.children(".item").length?d(this).hide():(t.parent(".item").remove(),n(e)),!1}),d(document.body).on("change",".w4pl_meta_query_compare",function(){(-1!=d.inArray(d(this).val(),["IN","NOT IN","BETWEEN","NOT BETWEEN"])?d(this).parent("td").next("td").children(".item").show().children(".w4pl_meta_query_value_add, .w4pl_meta_query_value_del"):(d(this).parent("td").next("td").children(".item").hide().children(".w4pl_meta_query_value_add, .w4pl_meta_query_value_del").hide(),d(this).parent("td").next("td").find(".item:first"))).show()}),d(".w4pl_meta_query_compare").each(function(e,t){d(this).trigger("change")})}),d(document).ready(function(){function e(){d("#w4pl_tax_query_table tbody tr").each(function(e,t){t=d(t);t.find(".wffi_w4pl_tax_query_taxonomy").attr("name","w4pl[tax_query][taxonomy]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_field").attr("name","w4pl[tax_query][field]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_operator").attr("name","w4pl[tax_query][operator]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_terms").attr("name","w4pl[tax_query][terms]["+e+"][]").removeAttr("id"),t.find("td.terms").attr("data-pos",e),d(this).replaceWith(t)})}function n(e){var t=e.children(".item"),n=e.data("pos");t.each(function(e,t){t=d(t);t.find("input").attr("name","w4pl[tax_query][terms]["+n+"]["+e+"]"),d(this).replaceWith(t)})}d(document.body).on("click","#w4pl_tax_query_add_btn",function(){return d(d("#w4pl_tax_query_clone tbody").html()).appendTo("#w4pl_tax_query_table tbody"),e(),!1}),d(document.body).on("click",".w4pl_tax_query_remove_btn",function(){return d(this).parents("tr").remove(),e(),!1}),d(document.body).on("click",".w4pl_tax_query_value_add",function(){d(".w4pl_tax_query_value_del").show();var e=d(this).parent(".item").parent("td");return d(this).parent(".item").after(d("#w4pl_tax_query_value_clone").html()),n(e),!1}),d(document.body).on("click",".w4pl_tax_query_value_del",function(){d(".w4pl_tax_query_value_del").show();var e=d(this).parent(".item").parent("td"),t=d(this);return 1==e.children(".item").length?d(this).hide():(t.parent(".item").remove(),n(e)),!1}),d(document.body).on("change",".w4pl_tax_query_operator",function(){(-1!=d.inArray(d(this).val(),["IN","NOT IN"])?(console.log(d(this).val()),d(this).parents("tr").find(".w4pl_tax_query_terms_cell").children(".item").show().children(".w4pl_tax_query_value_add, .w4pl_tax_query_value_del")):(d(this).parents("tr").find(".w4pl_tax_query_terms_cell .item").hide().children(".w4pl_tax_query_value_add, .w4pl_tax_query_value_del").hide(),d(this).parents("tr").find(".w4pl_tax_query_terms_cell .item:first"))).show()}),d(".w4pl_tax_query_operator").each(function(e,t){d(this).trigger("change")})})}(jQuery);
     1(d=>{function t(){var e=d(".w4pl_active .w4pl_group_fields").outerHeight();d("#w4pl_list_options").css("minHeight",e)}d(document).on("w4pl/form_loaded",function(e){t(),d("#w4pl_orderby").trigger("change")}),d(document).ready(function(){d(document).trigger("w4pl/form_loaded",d("#w4pl_list_options"))}),d(document.body).on("change",".w4pl_field_compare",function(){(-1!==d.inArray(d(this).val(),["IN","NOT IN","BETWEEN","NOT BETWEEN"])?d(this).parent("td").next("td").children(".item").show().children(".button"):(d(this).parent("td").next("td").children(".item").hide().children(".button").hide(),d(this).parent("td").next("td").find(".item:first"))).show()}),d(document.body).on("click",".w4pl_clone_parent",function(e){var t=d(this).parent(".wpce_parent_item").clone();return d(this).parent(".wpce_parent_item").after(t),d(this).parent(".wpce_parent_item").parent().find(".w4pl_remove_parent").show(),!1}),d(document.body).on("click",".w4pl_remove_parent",function(e){var t=d(this);return 0==t.parent(".wpce_parent_item").siblings().length?t.hide():(d(".w4pl_remove_parent").show(),t.parent(".wpce_parent_item").remove()),!1}),d(document.body).on("change",".w4pl_onchange_lfr",function(){var e=d(this).parents(".w4pl_field_group").attr("id"),t=null,n=e;d("#publish").addClass("disabled"),null===n&&(n="w4pl_field_group_type"),null===t&&(t=d("#w4pl_list_options :input").serialize()+"&action=w4pl_list_edit_form_html"),d("#w4pl_list_options").append('<div id="w4pl_lo"></div>'),d.post(ajaxurl,t,function(e){return d("#w4pl_list_options").replaceWith(e),d("#"+n).addClass("w4pl_active"),d(document).trigger("w4pl/form_loaded",d("#w4pl_list_options")),d("#publish").removeClass("disabled"),!1})}),d(document.body).on("click",".w4pl_toggler",function(){return d(d(this).data("target")).toggle(),t(),!1}),d(document.body).on("change","#w4pl_orderby",function(){"meta_value"==d(this).val()||"meta_value_num"==d(this).val()?d("#orderby_meta_key_wrap").show():d("#orderby_meta_key_wrap").hide()}),d(document.body).on("click",".w4pl_group_title",function(){return d("#w4pl_list_options").height("auto"),d(".w4pl_field_group").removeClass("w4pl_active"),d(this).parent(".w4pl_field_group").addClass("w4pl_active"),d("#w4pl_tab_id").val(d(this).parent(".w4pl_field_group").attr("id")),t(),!1}),d(document.body).on("click","#w4pl_template_buttons a",function(e){var t,n="w4pl_template",r=d(this).data("code"),a=(n=document.getElementById(n)).scrollTop,l=0,i=n.selectionStart||"0"==n.selectionStart?"ff":!!document.selection&&"ie",_=("ie"==i?(n.focus(),(t=document.selection.createRange()).moveStart("character",-n.value.length),l=t.text.length):"ff"==i&&(l=n.selectionStart),n.value.substring(0,l)),o=n.value.substring(l,n.value.length);return n.value=_+r+o,l+=r.length,"ie"==i?(n.focus(),(t=document.selection.createRange()).moveStart("character",-n.value.length),t.moveStart("character",l),t.moveEnd("character",0),t.select()):"ff"==i&&(n.selectionStart=l,n.selectionEnd=l,n.focus()),n.scrollTop=a,!1}),d(document).ready(function(){function e(){d("#w4pl_meta_query_table tbody tr").each(function(e,t){t=d(t);t.find(".wffi_w4pl_meta_query_key").attr("name","w4pl[meta_query][key]["+e+"]"),t.find(".wffi_w4pl_meta_query_compare").attr("name","w4pl[meta_query][compare]["+e+"]"),t.find(".wffi_w4pl_meta_query_value").attr("name","w4pl[meta_query][value]["+e+"][]"),t.find("td.values").attr("data-pos",e),d(this).replaceWith(t)})}function n(e){var t=e.children(".item"),n=e.data("pos");t.each(function(e,t){t=d(t);t.find("input").attr("name","w4pl[meta_query][value]["+n+"]["+e+"]"),d(this).replaceWith(t)})}d(document.body).on("click","#w4pl_meta_query_add_btn",function(){return d(d("#w4pl_meta_query_clone tbody").html()).appendTo("#w4pl_meta_query_table tbody"),e(),!1}),d(document.body).on("click",".w4pl_meta_query_remove_btn",function(){return d(this).parents("tr").remove(),e(),!1}),d(document.body).on("click",".w4pl_meta_query_value_add",function(){d(".w4pl_meta_query_value_del").show();var e=d(this).parent(".item").parent("td");return d(this).parent(".item").after(d("#w4pl_meta_query_value_clone").html()),n(e),!1}),d(document.body).on("click",".w4pl_meta_query_value_del",function(){d(".w4pl_meta_query_value_del").show();var e=d(this).parent(".item").parent("td"),t=d(this);return 1==e.children(".item").length?d(this).hide():(t.parent(".item").remove(),n(e)),!1}),d(document.body).on("change",".w4pl_meta_query_compare",function(){(-1!=d.inArray(d(this).val(),["IN","NOT IN","BETWEEN","NOT BETWEEN"])?d(this).parent("td").next("td").children(".item").show().children(".w4pl_meta_query_value_add, .w4pl_meta_query_value_del"):(d(this).parent("td").next("td").children(".item").hide().children(".w4pl_meta_query_value_add, .w4pl_meta_query_value_del").hide(),d(this).parent("td").next("td").find(".item:first"))).show()}),d(".w4pl_meta_query_compare").each(function(e,t){d(this).trigger("change")})}),d(document).ready(function(){function e(){d("#w4pl_tax_query_table tbody tr").each(function(e,t){t=d(t);t.find(".wffi_w4pl_tax_query_taxonomy").attr("name","w4pl[tax_query][taxonomy]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_field").attr("name","w4pl[tax_query][field]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_operator").attr("name","w4pl[tax_query][operator]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_terms").attr("name","w4pl[tax_query][terms]["+e+"][]").removeAttr("id"),t.find("td.terms").attr("data-pos",e),d(this).replaceWith(t)})}function n(e){var t=e.children(".item"),n=e.data("pos");t.each(function(e,t){t=d(t);t.find("input").attr("name","w4pl[tax_query][terms]["+n+"]["+e+"]"),d(this).replaceWith(t)})}d(document.body).on("click","#w4pl_tax_query_add_btn",function(){return d(d("#w4pl_tax_query_clone tbody").html()).appendTo("#w4pl_tax_query_table tbody"),e(),!1}),d(document.body).on("click",".w4pl_tax_query_remove_btn",function(){return d(this).parents("tr").remove(),e(),!1}),d(document.body).on("click",".w4pl_tax_query_value_add",function(){d(".w4pl_tax_query_value_del").show();var e=d(this).parent(".item").parent("td");return d(this).parent(".item").after(d("#w4pl_tax_query_value_clone").html()),n(e),!1}),d(document.body).on("click",".w4pl_tax_query_value_del",function(){d(".w4pl_tax_query_value_del").show();var e=d(this).parent(".item").parent("td"),t=d(this);return 1==e.children(".item").length?d(this).hide():(t.parent(".item").remove(),n(e)),!1}),d(document.body).on("change",".w4pl_tax_query_operator",function(){(-1!=d.inArray(d(this).val(),["IN","NOT IN"])?(console.log(d(this).val()),d(this).parents("tr").find(".w4pl_tax_query_terms_cell").children(".item").show().children(".w4pl_tax_query_value_add, .w4pl_tax_query_value_del")):(d(this).parents("tr").find(".w4pl_tax_query_terms_cell .item").hide().children(".w4pl_tax_query_value_add, .w4pl_tax_query_value_del").hide(),d(this).parents("tr").find(".w4pl_tax_query_terms_cell .item:first"))).show()}),d(".w4pl_tax_query_operator").each(function(e,t){d(this).trigger("change")})})})(jQuery);
  • w4-post-list/tags/2.5.4/includes/class-w4-post-list.php

    r3384593 r3426531  
    3030     * @var string
    3131     */
    32     public $version = '2.5.3';
     32    public $version = '2.5.4';
    3333
    3434    /**
  • w4-post-list/tags/2.5.4/includes/template-tags/class-post-template-tags.php

    r2883184 r3426531  
    643643            $size = $attr['size'];
    644644        } elseif ( isset( $attr['width'] ) ) {
     645            $attr['width'] = trim( $attr['width'], 'px' );
     646
    645647            if ( isset( $attr['height'] ) ) {
    646648                $height = $attr['height'];
     
    651653            $size = array( $attr['width'], $height );
    652654        } elseif ( isset( $attr['height'] ) ) {
     655            $attr['height'] = trim( $attr['height'], 'px' );
     656
    653657            if ( isset( $attr['width'] ) ) {
    654658                $width = $attr['width'];
  • w4-post-list/tags/2.5.4/languages/w4-post-list.pot

    r3384593 r3426531  
    44"Project-Id-Version: W4 Post List\n"
    55"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/w4-post-list/\n"
    6 "POT-Creation-Date: 2025-10-26 03:46:04+00:00\n"
     6"POT-Creation-Date: 2025-12-23 22:57:51+00:00\n"
    77"MIME-Version: 1.0\n"
    88"Content-Type: text/plain; charset=utf-8\n"
     
    1313"Language: en_US\n"
    1414"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    15 "X-Generator: grunt-wp-i18n 1.0.3\n"
     15"X-Generator: grunt-wp-i18n 1.0.4\n"
    1616
    1717#: admin/class-admin-lists-metaboxes.php:53
     
    12641264msgstr ""
    12651265
    1266 #: includes/template-tags/class-post-template-tags.php:940
     1266#: includes/template-tags/class-post-template-tags.php:944
    12671267msgid "View %s"
    12681268msgstr ""
    12691269
    1270 #: includes/template-tags/class-post-template-tags.php:947
     1270#: includes/template-tags/class-post-template-tags.php:951
    12711271msgid "Posted on"
    12721272msgstr ""
    12731273
    1274 #: includes/template-tags/class-post-template-tags.php:950
     1274#: includes/template-tags/class-post-template-tags.php:954
    12751275msgid "by %s"
    12761276msgstr ""
    12771277
    1278 #: includes/template-tags/class-post-template-tags.php:955
     1278#: includes/template-tags/class-post-template-tags.php:959
    12791279msgid "Published"
    12801280msgstr ""
    12811281
    1282 #: includes/template-tags/class-post-template-tags.php:962
     1282#: includes/template-tags/class-post-template-tags.php:966
    12831283msgid "Updated"
    12841284msgstr ""
    12851285
    1286 #: includes/template-tags/class-post-template-tags.php:971
     1286#: includes/template-tags/class-post-template-tags.php:975
    12871287msgid "View all posts by %s"
    12881288msgstr ""
    12891289
    1290 #: includes/template-tags/class-post-template-tags.php:988
     1290#: includes/template-tags/class-post-template-tags.php:992
    12911291msgid "Continue reading &raquo;"
    12921292msgstr ""
  • w4-post-list/tags/2.5.4/readme.txt

    r3384593 r3426531  
    33Tags: post, post list, custom post type, shortcode, media
    44Requires at least: 5.8
    5 Tested up to: 6.8.3
     5Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 2.5.3
     7Stable tag: 2.5.4
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    113113
    114114== Changelog ==
     115= 2.5.4 =
     116* Fix: Sanitized media image width and height attributes - https://github.com/w4devInc/w4-post-list/issues/64.
     117= 2.5.3 =
     118* Fix: Fixed version number.
    115119= 2.5.1 =
    116120* Fix: Fixed textdomain issue.
    117 = 2.4.9 =
    118 * Updated: Text localization.
    119 = 2.4.8 =
    120 * Fix: Prev page navigation button weren't showing on page 2.
    121 * Fix: Tracking message were showing javascript content on admin notice.
    122 = 2.4.7 =
    123 * Updated: Updated php 8.2 compatibility.
    124 = 2.4.6 =
    125 * Security: Fixed multiple security issues.
    126 * Fixed: Template attributes removal upon saving.
    127 = 2.4.5 =
    128 * Fix: Sanitization were removing html tags from template.
    129 * Change: Updated post list post type capability to page level access.
    130 = 2.4.4 =
    131 * Security: Sanitized all form inputs.
    132 = 2.4.3 =
    133 * Security: Escaped no items text from XSS injection.
    134 = 2.4.2 =
    135 * Updated: WP Version compatibility.
    136 = 2.4.1 =
    137 * New: Added search and select option for list block.
    138 = 2.4.0 =
    139 * Fixed: Previous pagination link were not showing on page 2.
    140 * Fixed: Default 10 lists per page were showing on block editor list select. Made it to 100.
    141121
    142122
     
    144124
    145125== Upgrade Notice ==
     126= 2.5.4 =
     127* Fix: Sanitized media image width and height attributes - https://github.com/w4devInc/w4-post-list/issues/64.
     128= 2.5.3 =
     129* Fix: Fixed version number.
    146130= 2.5.1 =
    147131* Fix: Fixed textdomain issue.
    148 = 2.4.9 =
    149 * Updated: Text localization.
    150 = 2.4.8 =
    151 * Fix: Prev page navigation button weren't showing on page 2.
    152 * Fix: Tracking message were showing javascript content on admin notice.
    153 = 2.4.7 =
    154 * Updated: Updated php 8.2 compatibility.
    155 = 2.4.6 =
    156 * Security: Fixed multiple security issues.
    157 * Fixed: Template attributes removal upon saving.
    158 = 2.4.5 =
    159 * Fix: Sanitization were removing html tags from template.
    160 * Change: Updated post list post type capability to page level access.
    161 = 2.4.4 =
    162 * Security: Sanitized all form inputs.
    163 = 2.4.3 =
    164 * Security: Escaped no items text from XSS injection.
    165 = 2.4.2 =
    166 * Updated: WP Version compatibility.
    167 = 2.4.1 =
    168 * Improvement: Added search feature for list block which avoids loading 100 lists on load.
    169132
    170133== Privacy Policy ==
  • w4-post-list/tags/2.5.4/w4-post-list.php

    r3384593 r3426531  
    44 * Plugin URI: https://w4dev.com/plugins/w4-post-list
    55 * Description: This plugin lets you create a list of - Posts, Terms, Users, Terms + Posts and Users + Posts. Outputs are completely customizable using Shortcode, HTML & CSS. Read documentation plugin usage.
    6  * Version: 2.5.3
     6 * Version: 2.5.4
    77 * Requires at least: 5.8
    88 * Requires PHP: 5.7
  • w4-post-list/trunk/assets/block/build.asset.php

    r3200437 r3426531  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '1d6f11a578aaa0a1101c');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => 'b506accc7fb0f97ed4b3');
  • w4-post-list/trunk/assets/block/build.js

    r3200437 r3426531  
    1 !function(){"use strict";var t={n:function(e){var s=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(s,{a:s}),s},d:function(e,s){for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.blocks,s=window.wp.i18n,i=window.wp.components,o=window.wp.blockEditor,n=window.wp.apiFetch,r=t.n(n),l=window.wp.element,c=window.wp.serverSideRender,a=t.n(c),p=window.ReactJSXRuntime;class d extends l.Component{constructor(t){super(t),this.state={choices:[]},this.onListSearch=this.onListSearch.bind(this),this.onListSelect=this.onListSelect.bind(this)}componentDidMount(){const{listId:t}=this.props.attributes;parseInt(t,10)>0&&this.loadChoices({include:t})}loadChoices({search:t,include:e}){let s="/wp/v2/w4pl?_fields=id,title&status=publish,pending,draft&per_page=10&_locale=user";t&&(s+="&search="+t),e&&(s+="&include[]="+e),r()({path:s}).then((t=>{const e=this.formatChoices(t);this.setState({choices:e})}))}formatChoices(t){return t?t.map((t=>({value:t.id.toString(),label:`${t.title.rendered} (#${t.id})`}))):[]}onListSearch(t){this.loadChoices({search:t})}onListSelect(t){this.props.setAttributes({listId:t})}render(){const{attributes:t}=this.props,{choices:e}=this.state;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(o.InspectorControls,{children:(0,p.jsxs)(i.PanelBody,{title:(0,s.__)("Settings","w4-post-list"),children:[(0,p.jsx)(i.PanelRow,{children:(0,p.jsx)(i.ComboboxControl,{label:"Select a list",value:t.listId,options:e,onChange:this.onListSelect,onFilterValueChange:this.onListSearch})}),(0,p.jsx)(i.PanelRow,{children:(0,p.jsxs)("p",{children:[(0,s.__)("Or","w4-post-list")," ",(0,p.jsx)("a",{target:"_blank",href:"post-new.php?post_type=w4pl",children:(0,s.__)("Create a new list","w4-post-list")})]})})]})}),(0,p.jsx)(i.Disabled,{children:(0,p.jsx)(a(),{block:"w4-post-list/postlist",attributes:t})})]})}}(0,e.registerBlockType)("w4-post-list/postlist",{title:(0,s.__)("W4 Post List","w4-post-list"),description:(0,s.__)("Display a list from w4 post list plugin.","w4-post-list"),supports:{align:!1,html:!1},icon:"list-view",category:"widgets",attributes:{listId:{type:"string",default:""}},edit:d})}();
     1!function(){"use strict";var t={n:function(e){var s=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(s,{a:s}),s},d:function(e,s){for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.blocks,s=window.wp.i18n,i=window.wp.components,o=window.wp.blockEditor,n=window.wp.apiFetch,r=t.n(n),l=window.wp.element,c=window.wp.serverSideRender,a=t.n(c),p=window.ReactJSXRuntime;class d extends l.Component{constructor(t){super(t),this.state={choices:[]},this.onListSearch=this.onListSearch.bind(this),this.onListSelect=this.onListSelect.bind(this)}componentDidMount(){const{listId:t}=this.props.attributes;parseInt(t,10)>0&&this.loadChoices({include:t})}loadChoices({search:t,include:e}){let s="/wp/v2/w4pl?_fields=id,title&status=publish,pending,draft&per_page=10&_locale=user";t&&(s+="&search="+t),e&&(s+="&include[]="+e),r()({path:s}).then(t=>{const e=this.formatChoices(t);this.setState({choices:e})})}formatChoices(t){return t?t.map(t=>({value:t.id.toString(),label:`${t.title.rendered} (#${t.id})`})):[]}onListSearch(t){this.loadChoices({search:t})}onListSelect(t){this.props.setAttributes({listId:t})}render(){const{attributes:t}=this.props,{choices:e}=this.state;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(o.InspectorControls,{children:(0,p.jsxs)(i.PanelBody,{title:(0,s.__)("Settings","w4-post-list"),children:[(0,p.jsx)(i.PanelRow,{children:(0,p.jsx)(i.ComboboxControl,{label:"Select a list",value:t.listId,options:e,onChange:this.onListSelect,onFilterValueChange:this.onListSearch})}),(0,p.jsx)(i.PanelRow,{children:(0,p.jsxs)("p",{children:[(0,s.__)("Or","w4-post-list")," ",(0,p.jsx)("a",{target:"_blank",href:"post-new.php?post_type=w4pl",children:(0,s.__)("Create a new list","w4-post-list")})]})})]})}),(0,p.jsx)(i.Disabled,{children:(0,p.jsx)(a(),{block:"w4-post-list/postlist",attributes:t})})]})}}(0,e.registerBlockType)("w4-post-list/postlist",{title:(0,s.__)("W4 Post List","w4-post-list"),description:(0,s.__)("Display a list from w4 post list plugin.","w4-post-list"),supports:{align:!1,html:!1},icon:"list-view",category:"widgets",attributes:{listId:{type:"string",default:""}},edit:d})}();
  • w4-post-list/trunk/assets/js/form.min.js

    r2878549 r3426531  
    1 !function(o){o(document).ready(function(){function d(t){return t.split(/,\s*/)}o(".wff_ajax_form").each(function(){var e=o(this),a=e.find(".form_button"),n=e.find(".form_action").val()||"",i=(e.find(".wffwt_submit").append('<div class="wf_notes"></div>'),e.find(".wf_notes"));a.click(function(t){t.preventDefault();t=e.serialize();if(i.removeClass("_error _ok").empty(),a.hasClass("ld"))return i.html("Please hold on till the last request completes").addClass("_error"),!1;a.addClass("ld").attr("disabled","disabled"),e.data("loading_text"),i.html(e.data("loading_text")).addClass("_note ld"),o.post(ajaxurl,t).done(function(t){"0"==t?i.html("Invalid form response.").addClass("_error"):i.html(t.html).addClass("_"+t.status),n&&o(window).trigger(n,t)}).complete(function(t){a.removeClass("ld").removeAttr("disabled"),i.removeClass("ld")})})}),o(document.body).on("click",".wff_ajax_action_btn",function(t){t.preventDefault();var e,a=o(this),n=a.data("action")||"",i=a.data("target")||"";return _confirm=a.data("confirm")||"",_alert=a.data("alert"),!(a.hasClass("ld")||""==n||_confirm&&!confirm(_confirm))&&(e=a.data("form")?o(a.data("form")).serialize()+"&action="+n:a.data(),a.addClass("ld").attr("disabled","disabled"),void o.post(ajaxurl,e).done(function(t){"ok"!=t.status&&"error"!=t.status||(i?o(i).html(t.html):"1"==_alert&&alert(t.html)),o(window).trigger(n,[t,e,a])}).complete(function(){a.removeClass("ld").removeAttr("disabled")}))}),o(document.body).on("click",".wff_clone_btn",function(t){t.preventDefault();var t=o(this).closest(".wff_clone_wrap"),e=t.find(".wff_clone_to"),a=t.find(".wff_clone_from").html();return e.append(a),o(window).trigger("w4pl/row_cloned"),""!=t.attr("id")&&o(window).trigger("wff_cloned_"+t.attr("id")),!1}),o(document.body).on("click",".wff_clone_remove_btn",function(t){return t.preventDefault(),o(this).closest(".wff_clone_item").remove(),!1}),o(".wff_clone_to.sortable").sortable({items:"tr",handle:".wff_clone_drag_handle",helper:function(t,e){var a=e.children(),e=e.clone();return e.children().each(function(t){o(this).width(a.eq(t).width())}),e}}),o(".checkbox_limit2").each(function(t,e){var a=o(this),n=a.data("max"),i=a.find("input[type=checkbox]:checked").length>=n;a.find("input[type=checkbox]").not(":checked").attr("disabled",i),a.find("input[type=checkbox]").click(function(){var t=a.find("input[type=checkbox]:checked").length>=n;a.find("input[type=checkbox]").not(":checked").attr("disabled",t)})}),o(".checkbox_limit").each(function(t,e){var a=o(this);a.find("input[type=checkbox]").click(function(){var t=o(this);!function t(e,a){var n=void 0!==a.attr("checked"),a=a.data("parent"),i=o("#term_"+a),c=(0<i.length&&(!n&&i.is(":checked")?(_shiblings=o("input[data-parent="+a+"]:checked").length)<1&&i.removeAttr("checked").removeAttr("disabled"):n&&i.not(":checked")&&i.attr("checked",!0).attr("disabled",!0),t(e,i)),0),a=(e.find("input[type=checkbox]:checked").each(function(t,e){o("input[data-parent="+o(e).data("tid")+"]:checked").length<1&&c++}),c>=e.data("max"));e.find("input[type=checkbox]:checked"),e.find("input[type=checkbox]").not(":checked").attr("disabled",a)}(a,t)})}),o(".tags_limit").each(function(t,e){var a=o(this),n=a.data("max"),i=a.data("sep");a.find("input[type=text]").bind("keypress",function(t){String.fromCharCode(t.which)==i&&8!=t.which&&0!=t.which&&(t.which<48||57<t.which)&&46!=t.which&&a.find("input[type=text]").val().replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"").split(i).length>=n&&t.preventDefault()})}),o("[data-term_suggest2]").each(function(t,e){var a=o(e),n=a.find("input"),e=a.data("term_suggest");n.suggest(UGC.ajaxurl+"?action=UGC_term_suggest&tax="+e,{delay:500,minchars:2,multiple:1,onSelect:function(t){a.hasClass("tags_limit")&&(tags=(tags=(tags=a.find("input[type=text]").val()).replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")).split(a.data("sep"))).length>=a.data("max")&&n.val(tags.join(a.data("sep")+" "))}})}),o("[data-auc]").each(function(t,e){var e=o(e),a=e.find("input"),n=e.data("max")||10,i=e.data("sep")||",",c=e.data("auc");if(c.length<1)return!1;a.bind("keydown focus",function(t){t.keyCode===o.ui.keyCode.TAB&&o(this).data("ui-autocomplete").menu.active&&t.preventDefault()}).autocomplete({minLength:0,source:function(t,e){e(o.ui.autocomplete.filter(c,d(t.term).pop()).slice(0,10))},focus:function(){return!1},select:function(t,e){var a=d(this.value);return a.pop(),a.push(e.item.value),a.length>=n||a.push(""),this.value=a.join(i+" "),!1}})})})}(jQuery);
     1(o=>{o(document).ready(function(){function d(t){return t.split(/,\s*/)}o(".wff_ajax_form").each(function(){var e=o(this),a=e.find(".form_button"),n=e.find(".form_action").val()||"",i=(e.find(".wffwt_submit").append('<div class="wf_notes"></div>'),e.find(".wf_notes"));a.click(function(t){t.preventDefault();t=e.serialize();if(i.removeClass("_error _ok").empty(),a.hasClass("ld"))return i.html("Please hold on till the last request completes").addClass("_error"),!1;a.addClass("ld").attr("disabled","disabled"),e.data("loading_text"),i.html(e.data("loading_text")).addClass("_note ld"),o.post(ajaxurl,t).done(function(t){"0"==t?i.html("Invalid form response.").addClass("_error"):i.html(t.html).addClass("_"+t.status),n&&o(window).trigger(n,t)}).complete(function(t){a.removeClass("ld").removeAttr("disabled"),i.removeClass("ld")})})}),o(document.body).on("click",".wff_ajax_action_btn",function(t){t.preventDefault();var e,a=o(this),n=a.data("action")||"",i=a.data("target")||"";return _confirm=a.data("confirm")||"",_alert=a.data("alert"),!(a.hasClass("ld")||""==n||_confirm&&!confirm(_confirm))&&(e=a.data("form")?o(a.data("form")).serialize()+"&action="+n:a.data(),a.addClass("ld").attr("disabled","disabled"),void o.post(ajaxurl,e).done(function(t){"ok"!=t.status&&"error"!=t.status||(i?o(i).html(t.html):"1"==_alert&&alert(t.html)),o(window).trigger(n,[t,e,a])}).complete(function(){a.removeClass("ld").removeAttr("disabled")}))}),o(document.body).on("click",".wff_clone_btn",function(t){t.preventDefault();var t=o(this).closest(".wff_clone_wrap"),e=t.find(".wff_clone_to"),a=t.find(".wff_clone_from").html();return e.append(a),o(window).trigger("w4pl/row_cloned"),""!=t.attr("id")&&o(window).trigger("wff_cloned_"+t.attr("id")),!1}),o(document.body).on("click",".wff_clone_remove_btn",function(t){return t.preventDefault(),o(this).closest(".wff_clone_item").remove(),!1}),o(".wff_clone_to.sortable").sortable({items:"tr",handle:".wff_clone_drag_handle",helper:function(t,e){var a=e.children(),e=e.clone();return e.children().each(function(t){o(this).width(a.eq(t).width())}),e}}),o(".checkbox_limit2").each(function(t,e){var a=o(this),n=a.data("max"),i=a.find("input[type=checkbox]:checked").length>=n;a.find("input[type=checkbox]").not(":checked").attr("disabled",i),a.find("input[type=checkbox]").click(function(){var t=a.find("input[type=checkbox]:checked").length>=n;a.find("input[type=checkbox]").not(":checked").attr("disabled",t)})}),o(".checkbox_limit").each(function(t,e){var a=o(this);a.find("input[type=checkbox]").click(function(){var t=o(this);!function t(e,a){var n=void 0!==a.attr("checked"),a=a.data("parent"),i=o("#term_"+a),c=(0<i.length&&(!n&&i.is(":checked")?(_shiblings=o("input[data-parent="+a+"]:checked").length)<1&&i.removeAttr("checked").removeAttr("disabled"):n&&i.not(":checked")&&i.attr("checked",!0).attr("disabled",!0),t(e,i)),0),a=(e.find("input[type=checkbox]:checked").each(function(t,e){o("input[data-parent="+o(e).data("tid")+"]:checked").length<1&&c++}),c>=e.data("max"));e.find("input[type=checkbox]:checked"),e.find("input[type=checkbox]").not(":checked").attr("disabled",a)}(a,t)})}),o(".tags_limit").each(function(t,e){var a=o(this),n=a.data("max"),i=a.data("sep");a.find("input[type=text]").bind("keypress",function(t){String.fromCharCode(t.which)==i&&8!=t.which&&0!=t.which&&(t.which<48||57<t.which)&&46!=t.which&&a.find("input[type=text]").val().replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"").split(i).length>=n&&t.preventDefault()})}),o("[data-term_suggest2]").each(function(t,e){var a=o(e),n=a.find("input"),e=a.data("term_suggest");n.suggest(UGC.ajaxurl+"?action=UGC_term_suggest&tax="+e,{delay:500,minchars:2,multiple:1,onSelect:function(t){a.hasClass("tags_limit")&&(tags=(tags=(tags=a.find("input[type=text]").val()).replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")).split(a.data("sep"))).length>=a.data("max")&&n.val(tags.join(a.data("sep")+" "))}})}),o("[data-auc]").each(function(t,e){var e=o(e),a=e.find("input"),n=e.data("max")||10,i=e.data("sep")||",",c=e.data("auc");if(c.length<1)return!1;a.bind("keydown focus",function(t){t.keyCode===o.ui.keyCode.TAB&&o(this).data("ui-autocomplete").menu.active&&t.preventDefault()}).autocomplete({minLength:0,source:function(t,e){e(o.ui.autocomplete.filter(c,d(t.term).pop()).slice(0,10))},focus:function(){return!1},select:function(t,e){var a=d(this.value);return a.pop(),a.push(e.item.value),a.length>=n||a.push(""),this.value=a.join(i+" "),!1}})})})})(jQuery);
  • w4-post-list/trunk/assets/js/list-editor.min.js

    r2878549 r3426531  
    1 !function(d){function t(){var e=d(".w4pl_active .w4pl_group_fields").outerHeight();d("#w4pl_list_options").css("minHeight",e)}d(document).on("w4pl/form_loaded",function(e){t(),d("#w4pl_orderby").trigger("change")}),d(document).ready(function(){d(document).trigger("w4pl/form_loaded",d("#w4pl_list_options"))}),d(document.body).on("change",".w4pl_field_compare",function(){(-1!==d.inArray(d(this).val(),["IN","NOT IN","BETWEEN","NOT BETWEEN"])?d(this).parent("td").next("td").children(".item").show().children(".button"):(d(this).parent("td").next("td").children(".item").hide().children(".button").hide(),d(this).parent("td").next("td").find(".item:first"))).show()}),d(document.body).on("click",".w4pl_clone_parent",function(e){var t=d(this).parent(".wpce_parent_item").clone();return d(this).parent(".wpce_parent_item").after(t),d(this).parent(".wpce_parent_item").parent().find(".w4pl_remove_parent").show(),!1}),d(document.body).on("click",".w4pl_remove_parent",function(e){var t=d(this);return 0==t.parent(".wpce_parent_item").siblings().length?t.hide():(d(".w4pl_remove_parent").show(),t.parent(".wpce_parent_item").remove()),!1}),d(document.body).on("change",".w4pl_onchange_lfr",function(){var e=d(this).parents(".w4pl_field_group").attr("id"),t=null,n=e;d("#publish").addClass("disabled"),null===n&&(n="w4pl_field_group_type"),null===t&&(t=d("#w4pl_list_options :input").serialize()+"&action=w4pl_list_edit_form_html"),d("#w4pl_list_options").append('<div id="w4pl_lo"></div>'),d.post(ajaxurl,t,function(e){return d("#w4pl_list_options").replaceWith(e),d("#"+n).addClass("w4pl_active"),d(document).trigger("w4pl/form_loaded",d("#w4pl_list_options")),d("#publish").removeClass("disabled"),!1})}),d(document.body).on("click",".w4pl_toggler",function(){return d(d(this).data("target")).toggle(),t(),!1}),d(document.body).on("change","#w4pl_orderby",function(){"meta_value"==d(this).val()||"meta_value_num"==d(this).val()?d("#orderby_meta_key_wrap").show():d("#orderby_meta_key_wrap").hide()}),d(document.body).on("click",".w4pl_group_title",function(){return d("#w4pl_list_options").height("auto"),d(".w4pl_field_group").removeClass("w4pl_active"),d(this).parent(".w4pl_field_group").addClass("w4pl_active"),d("#w4pl_tab_id").val(d(this).parent(".w4pl_field_group").attr("id")),t(),!1}),d(document.body).on("click","#w4pl_template_buttons a",function(e){var t,n="w4pl_template",r=d(this).data("code"),a=(n=document.getElementById(n)).scrollTop,l=0,i=n.selectionStart||"0"==n.selectionStart?"ff":!!document.selection&&"ie",_=("ie"==i?(n.focus(),(t=document.selection.createRange()).moveStart("character",-n.value.length),l=t.text.length):"ff"==i&&(l=n.selectionStart),n.value.substring(0,l)),o=n.value.substring(l,n.value.length);return n.value=_+r+o,l+=r.length,"ie"==i?(n.focus(),(t=document.selection.createRange()).moveStart("character",-n.value.length),t.moveStart("character",l),t.moveEnd("character",0),t.select()):"ff"==i&&(n.selectionStart=l,n.selectionEnd=l,n.focus()),n.scrollTop=a,!1}),d(document).ready(function(){function e(){d("#w4pl_meta_query_table tbody tr").each(function(e,t){t=d(t);t.find(".wffi_w4pl_meta_query_key").attr("name","w4pl[meta_query][key]["+e+"]"),t.find(".wffi_w4pl_meta_query_compare").attr("name","w4pl[meta_query][compare]["+e+"]"),t.find(".wffi_w4pl_meta_query_value").attr("name","w4pl[meta_query][value]["+e+"][]"),t.find("td.values").attr("data-pos",e),d(this).replaceWith(t)})}function n(e){var t=e.children(".item"),n=e.data("pos");t.each(function(e,t){t=d(t);t.find("input").attr("name","w4pl[meta_query][value]["+n+"]["+e+"]"),d(this).replaceWith(t)})}d(document.body).on("click","#w4pl_meta_query_add_btn",function(){return d(d("#w4pl_meta_query_clone tbody").html()).appendTo("#w4pl_meta_query_table tbody"),e(),!1}),d(document.body).on("click",".w4pl_meta_query_remove_btn",function(){return d(this).parents("tr").remove(),e(),!1}),d(document.body).on("click",".w4pl_meta_query_value_add",function(){d(".w4pl_meta_query_value_del").show();var e=d(this).parent(".item").parent("td");return d(this).parent(".item").after(d("#w4pl_meta_query_value_clone").html()),n(e),!1}),d(document.body).on("click",".w4pl_meta_query_value_del",function(){d(".w4pl_meta_query_value_del").show();var e=d(this).parent(".item").parent("td"),t=d(this);return 1==e.children(".item").length?d(this).hide():(t.parent(".item").remove(),n(e)),!1}),d(document.body).on("change",".w4pl_meta_query_compare",function(){(-1!=d.inArray(d(this).val(),["IN","NOT IN","BETWEEN","NOT BETWEEN"])?d(this).parent("td").next("td").children(".item").show().children(".w4pl_meta_query_value_add, .w4pl_meta_query_value_del"):(d(this).parent("td").next("td").children(".item").hide().children(".w4pl_meta_query_value_add, .w4pl_meta_query_value_del").hide(),d(this).parent("td").next("td").find(".item:first"))).show()}),d(".w4pl_meta_query_compare").each(function(e,t){d(this).trigger("change")})}),d(document).ready(function(){function e(){d("#w4pl_tax_query_table tbody tr").each(function(e,t){t=d(t);t.find(".wffi_w4pl_tax_query_taxonomy").attr("name","w4pl[tax_query][taxonomy]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_field").attr("name","w4pl[tax_query][field]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_operator").attr("name","w4pl[tax_query][operator]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_terms").attr("name","w4pl[tax_query][terms]["+e+"][]").removeAttr("id"),t.find("td.terms").attr("data-pos",e),d(this).replaceWith(t)})}function n(e){var t=e.children(".item"),n=e.data("pos");t.each(function(e,t){t=d(t);t.find("input").attr("name","w4pl[tax_query][terms]["+n+"]["+e+"]"),d(this).replaceWith(t)})}d(document.body).on("click","#w4pl_tax_query_add_btn",function(){return d(d("#w4pl_tax_query_clone tbody").html()).appendTo("#w4pl_tax_query_table tbody"),e(),!1}),d(document.body).on("click",".w4pl_tax_query_remove_btn",function(){return d(this).parents("tr").remove(),e(),!1}),d(document.body).on("click",".w4pl_tax_query_value_add",function(){d(".w4pl_tax_query_value_del").show();var e=d(this).parent(".item").parent("td");return d(this).parent(".item").after(d("#w4pl_tax_query_value_clone").html()),n(e),!1}),d(document.body).on("click",".w4pl_tax_query_value_del",function(){d(".w4pl_tax_query_value_del").show();var e=d(this).parent(".item").parent("td"),t=d(this);return 1==e.children(".item").length?d(this).hide():(t.parent(".item").remove(),n(e)),!1}),d(document.body).on("change",".w4pl_tax_query_operator",function(){(-1!=d.inArray(d(this).val(),["IN","NOT IN"])?(console.log(d(this).val()),d(this).parents("tr").find(".w4pl_tax_query_terms_cell").children(".item").show().children(".w4pl_tax_query_value_add, .w4pl_tax_query_value_del")):(d(this).parents("tr").find(".w4pl_tax_query_terms_cell .item").hide().children(".w4pl_tax_query_value_add, .w4pl_tax_query_value_del").hide(),d(this).parents("tr").find(".w4pl_tax_query_terms_cell .item:first"))).show()}),d(".w4pl_tax_query_operator").each(function(e,t){d(this).trigger("change")})})}(jQuery);
     1(d=>{function t(){var e=d(".w4pl_active .w4pl_group_fields").outerHeight();d("#w4pl_list_options").css("minHeight",e)}d(document).on("w4pl/form_loaded",function(e){t(),d("#w4pl_orderby").trigger("change")}),d(document).ready(function(){d(document).trigger("w4pl/form_loaded",d("#w4pl_list_options"))}),d(document.body).on("change",".w4pl_field_compare",function(){(-1!==d.inArray(d(this).val(),["IN","NOT IN","BETWEEN","NOT BETWEEN"])?d(this).parent("td").next("td").children(".item").show().children(".button"):(d(this).parent("td").next("td").children(".item").hide().children(".button").hide(),d(this).parent("td").next("td").find(".item:first"))).show()}),d(document.body).on("click",".w4pl_clone_parent",function(e){var t=d(this).parent(".wpce_parent_item").clone();return d(this).parent(".wpce_parent_item").after(t),d(this).parent(".wpce_parent_item").parent().find(".w4pl_remove_parent").show(),!1}),d(document.body).on("click",".w4pl_remove_parent",function(e){var t=d(this);return 0==t.parent(".wpce_parent_item").siblings().length?t.hide():(d(".w4pl_remove_parent").show(),t.parent(".wpce_parent_item").remove()),!1}),d(document.body).on("change",".w4pl_onchange_lfr",function(){var e=d(this).parents(".w4pl_field_group").attr("id"),t=null,n=e;d("#publish").addClass("disabled"),null===n&&(n="w4pl_field_group_type"),null===t&&(t=d("#w4pl_list_options :input").serialize()+"&action=w4pl_list_edit_form_html"),d("#w4pl_list_options").append('<div id="w4pl_lo"></div>'),d.post(ajaxurl,t,function(e){return d("#w4pl_list_options").replaceWith(e),d("#"+n).addClass("w4pl_active"),d(document).trigger("w4pl/form_loaded",d("#w4pl_list_options")),d("#publish").removeClass("disabled"),!1})}),d(document.body).on("click",".w4pl_toggler",function(){return d(d(this).data("target")).toggle(),t(),!1}),d(document.body).on("change","#w4pl_orderby",function(){"meta_value"==d(this).val()||"meta_value_num"==d(this).val()?d("#orderby_meta_key_wrap").show():d("#orderby_meta_key_wrap").hide()}),d(document.body).on("click",".w4pl_group_title",function(){return d("#w4pl_list_options").height("auto"),d(".w4pl_field_group").removeClass("w4pl_active"),d(this).parent(".w4pl_field_group").addClass("w4pl_active"),d("#w4pl_tab_id").val(d(this).parent(".w4pl_field_group").attr("id")),t(),!1}),d(document.body).on("click","#w4pl_template_buttons a",function(e){var t,n="w4pl_template",r=d(this).data("code"),a=(n=document.getElementById(n)).scrollTop,l=0,i=n.selectionStart||"0"==n.selectionStart?"ff":!!document.selection&&"ie",_=("ie"==i?(n.focus(),(t=document.selection.createRange()).moveStart("character",-n.value.length),l=t.text.length):"ff"==i&&(l=n.selectionStart),n.value.substring(0,l)),o=n.value.substring(l,n.value.length);return n.value=_+r+o,l+=r.length,"ie"==i?(n.focus(),(t=document.selection.createRange()).moveStart("character",-n.value.length),t.moveStart("character",l),t.moveEnd("character",0),t.select()):"ff"==i&&(n.selectionStart=l,n.selectionEnd=l,n.focus()),n.scrollTop=a,!1}),d(document).ready(function(){function e(){d("#w4pl_meta_query_table tbody tr").each(function(e,t){t=d(t);t.find(".wffi_w4pl_meta_query_key").attr("name","w4pl[meta_query][key]["+e+"]"),t.find(".wffi_w4pl_meta_query_compare").attr("name","w4pl[meta_query][compare]["+e+"]"),t.find(".wffi_w4pl_meta_query_value").attr("name","w4pl[meta_query][value]["+e+"][]"),t.find("td.values").attr("data-pos",e),d(this).replaceWith(t)})}function n(e){var t=e.children(".item"),n=e.data("pos");t.each(function(e,t){t=d(t);t.find("input").attr("name","w4pl[meta_query][value]["+n+"]["+e+"]"),d(this).replaceWith(t)})}d(document.body).on("click","#w4pl_meta_query_add_btn",function(){return d(d("#w4pl_meta_query_clone tbody").html()).appendTo("#w4pl_meta_query_table tbody"),e(),!1}),d(document.body).on("click",".w4pl_meta_query_remove_btn",function(){return d(this).parents("tr").remove(),e(),!1}),d(document.body).on("click",".w4pl_meta_query_value_add",function(){d(".w4pl_meta_query_value_del").show();var e=d(this).parent(".item").parent("td");return d(this).parent(".item").after(d("#w4pl_meta_query_value_clone").html()),n(e),!1}),d(document.body).on("click",".w4pl_meta_query_value_del",function(){d(".w4pl_meta_query_value_del").show();var e=d(this).parent(".item").parent("td"),t=d(this);return 1==e.children(".item").length?d(this).hide():(t.parent(".item").remove(),n(e)),!1}),d(document.body).on("change",".w4pl_meta_query_compare",function(){(-1!=d.inArray(d(this).val(),["IN","NOT IN","BETWEEN","NOT BETWEEN"])?d(this).parent("td").next("td").children(".item").show().children(".w4pl_meta_query_value_add, .w4pl_meta_query_value_del"):(d(this).parent("td").next("td").children(".item").hide().children(".w4pl_meta_query_value_add, .w4pl_meta_query_value_del").hide(),d(this).parent("td").next("td").find(".item:first"))).show()}),d(".w4pl_meta_query_compare").each(function(e,t){d(this).trigger("change")})}),d(document).ready(function(){function e(){d("#w4pl_tax_query_table tbody tr").each(function(e,t){t=d(t);t.find(".wffi_w4pl_tax_query_taxonomy").attr("name","w4pl[tax_query][taxonomy]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_field").attr("name","w4pl[tax_query][field]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_operator").attr("name","w4pl[tax_query][operator]["+e+"]").removeAttr("id"),t.find(".wffi_w4pl_tax_query_terms").attr("name","w4pl[tax_query][terms]["+e+"][]").removeAttr("id"),t.find("td.terms").attr("data-pos",e),d(this).replaceWith(t)})}function n(e){var t=e.children(".item"),n=e.data("pos");t.each(function(e,t){t=d(t);t.find("input").attr("name","w4pl[tax_query][terms]["+n+"]["+e+"]"),d(this).replaceWith(t)})}d(document.body).on("click","#w4pl_tax_query_add_btn",function(){return d(d("#w4pl_tax_query_clone tbody").html()).appendTo("#w4pl_tax_query_table tbody"),e(),!1}),d(document.body).on("click",".w4pl_tax_query_remove_btn",function(){return d(this).parents("tr").remove(),e(),!1}),d(document.body).on("click",".w4pl_tax_query_value_add",function(){d(".w4pl_tax_query_value_del").show();var e=d(this).parent(".item").parent("td");return d(this).parent(".item").after(d("#w4pl_tax_query_value_clone").html()),n(e),!1}),d(document.body).on("click",".w4pl_tax_query_value_del",function(){d(".w4pl_tax_query_value_del").show();var e=d(this).parent(".item").parent("td"),t=d(this);return 1==e.children(".item").length?d(this).hide():(t.parent(".item").remove(),n(e)),!1}),d(document.body).on("change",".w4pl_tax_query_operator",function(){(-1!=d.inArray(d(this).val(),["IN","NOT IN"])?(console.log(d(this).val()),d(this).parents("tr").find(".w4pl_tax_query_terms_cell").children(".item").show().children(".w4pl_tax_query_value_add, .w4pl_tax_query_value_del")):(d(this).parents("tr").find(".w4pl_tax_query_terms_cell .item").hide().children(".w4pl_tax_query_value_add, .w4pl_tax_query_value_del").hide(),d(this).parents("tr").find(".w4pl_tax_query_terms_cell .item:first"))).show()}),d(".w4pl_tax_query_operator").each(function(e,t){d(this).trigger("change")})})})(jQuery);
  • w4-post-list/trunk/includes/class-w4-post-list.php

    r3384593 r3426531  
    3030     * @var string
    3131     */
    32     public $version = '2.5.3';
     32    public $version = '2.5.4';
    3333
    3434    /**
  • w4-post-list/trunk/includes/template-tags/class-post-template-tags.php

    r2883184 r3426531  
    643643            $size = $attr['size'];
    644644        } elseif ( isset( $attr['width'] ) ) {
     645            $attr['width'] = trim( $attr['width'], 'px' );
     646
    645647            if ( isset( $attr['height'] ) ) {
    646648                $height = $attr['height'];
     
    651653            $size = array( $attr['width'], $height );
    652654        } elseif ( isset( $attr['height'] ) ) {
     655            $attr['height'] = trim( $attr['height'], 'px' );
     656
    653657            if ( isset( $attr['width'] ) ) {
    654658                $width = $attr['width'];
  • w4-post-list/trunk/languages/w4-post-list.pot

    r3384593 r3426531  
    44"Project-Id-Version: W4 Post List\n"
    55"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/w4-post-list/\n"
    6 "POT-Creation-Date: 2025-10-26 03:46:04+00:00\n"
     6"POT-Creation-Date: 2025-12-23 22:57:51+00:00\n"
    77"MIME-Version: 1.0\n"
    88"Content-Type: text/plain; charset=utf-8\n"
     
    1313"Language: en_US\n"
    1414"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    15 "X-Generator: grunt-wp-i18n 1.0.3\n"
     15"X-Generator: grunt-wp-i18n 1.0.4\n"
    1616
    1717#: admin/class-admin-lists-metaboxes.php:53
     
    12641264msgstr ""
    12651265
    1266 #: includes/template-tags/class-post-template-tags.php:940
     1266#: includes/template-tags/class-post-template-tags.php:944
    12671267msgid "View %s"
    12681268msgstr ""
    12691269
    1270 #: includes/template-tags/class-post-template-tags.php:947
     1270#: includes/template-tags/class-post-template-tags.php:951
    12711271msgid "Posted on"
    12721272msgstr ""
    12731273
    1274 #: includes/template-tags/class-post-template-tags.php:950
     1274#: includes/template-tags/class-post-template-tags.php:954
    12751275msgid "by %s"
    12761276msgstr ""
    12771277
    1278 #: includes/template-tags/class-post-template-tags.php:955
     1278#: includes/template-tags/class-post-template-tags.php:959
    12791279msgid "Published"
    12801280msgstr ""
    12811281
    1282 #: includes/template-tags/class-post-template-tags.php:962
     1282#: includes/template-tags/class-post-template-tags.php:966
    12831283msgid "Updated"
    12841284msgstr ""
    12851285
    1286 #: includes/template-tags/class-post-template-tags.php:971
     1286#: includes/template-tags/class-post-template-tags.php:975
    12871287msgid "View all posts by %s"
    12881288msgstr ""
    12891289
    1290 #: includes/template-tags/class-post-template-tags.php:988
     1290#: includes/template-tags/class-post-template-tags.php:992
    12911291msgid "Continue reading &raquo;"
    12921292msgstr ""
  • w4-post-list/trunk/readme.txt

    r3384593 r3426531  
    33Tags: post, post list, custom post type, shortcode, media
    44Requires at least: 5.8
    5 Tested up to: 6.8.3
     5Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 2.5.3
     7Stable tag: 2.5.4
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    113113
    114114== Changelog ==
     115= 2.5.4 =
     116* Fix: Sanitized media image width and height attributes - https://github.com/w4devInc/w4-post-list/issues/64.
     117= 2.5.3 =
     118* Fix: Fixed version number.
    115119= 2.5.1 =
    116120* Fix: Fixed textdomain issue.
    117 = 2.4.9 =
    118 * Updated: Text localization.
    119 = 2.4.8 =
    120 * Fix: Prev page navigation button weren't showing on page 2.
    121 * Fix: Tracking message were showing javascript content on admin notice.
    122 = 2.4.7 =
    123 * Updated: Updated php 8.2 compatibility.
    124 = 2.4.6 =
    125 * Security: Fixed multiple security issues.
    126 * Fixed: Template attributes removal upon saving.
    127 = 2.4.5 =
    128 * Fix: Sanitization were removing html tags from template.
    129 * Change: Updated post list post type capability to page level access.
    130 = 2.4.4 =
    131 * Security: Sanitized all form inputs.
    132 = 2.4.3 =
    133 * Security: Escaped no items text from XSS injection.
    134 = 2.4.2 =
    135 * Updated: WP Version compatibility.
    136 = 2.4.1 =
    137 * New: Added search and select option for list block.
    138 = 2.4.0 =
    139 * Fixed: Previous pagination link were not showing on page 2.
    140 * Fixed: Default 10 lists per page were showing on block editor list select. Made it to 100.
    141121
    142122
     
    144124
    145125== Upgrade Notice ==
     126= 2.5.4 =
     127* Fix: Sanitized media image width and height attributes - https://github.com/w4devInc/w4-post-list/issues/64.
     128= 2.5.3 =
     129* Fix: Fixed version number.
    146130= 2.5.1 =
    147131* Fix: Fixed textdomain issue.
    148 = 2.4.9 =
    149 * Updated: Text localization.
    150 = 2.4.8 =
    151 * Fix: Prev page navigation button weren't showing on page 2.
    152 * Fix: Tracking message were showing javascript content on admin notice.
    153 = 2.4.7 =
    154 * Updated: Updated php 8.2 compatibility.
    155 = 2.4.6 =
    156 * Security: Fixed multiple security issues.
    157 * Fixed: Template attributes removal upon saving.
    158 = 2.4.5 =
    159 * Fix: Sanitization were removing html tags from template.
    160 * Change: Updated post list post type capability to page level access.
    161 = 2.4.4 =
    162 * Security: Sanitized all form inputs.
    163 = 2.4.3 =
    164 * Security: Escaped no items text from XSS injection.
    165 = 2.4.2 =
    166 * Updated: WP Version compatibility.
    167 = 2.4.1 =
    168 * Improvement: Added search feature for list block which avoids loading 100 lists on load.
    169132
    170133== Privacy Policy ==
  • w4-post-list/trunk/w4-post-list.php

    r3384593 r3426531  
    44 * Plugin URI: https://w4dev.com/plugins/w4-post-list
    55 * Description: This plugin lets you create a list of - Posts, Terms, Users, Terms + Posts and Users + Posts. Outputs are completely customizable using Shortcode, HTML & CSS. Read documentation plugin usage.
    6  * Version: 2.5.3
     6 * Version: 2.5.4
    77 * Requires at least: 5.8
    88 * Requires PHP: 5.7
Note: See TracChangeset for help on using the changeset viewer.