PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
plugins
/
contextual-related-posts
/
includes
/
admin
/
js
jQuery(document).ready((function(t){t.fn.crpAutocompletePosts=function(e){var n,o,a=t(this),c=t("#post_ID").val();const i="crp_get_posts_action",l="#crp-post-list",s="#crp-manual-related-csv",r=1,d=(e=e||{}).ajaxAction||a.attr("data-wp-ajax-action")||i;delete e.ajaxAction;const p=a,u=e.postList?t(e.postList):t(l);delete e.postList;const f=e.hiddenField?t(e.hiddenField):t(s);delete e.hiddenField;const m=e.relevance||a.attr("data-wp-relevance")||r;function h(){const e=[];return u.children("li").each((function(){const n=t(this).attr("class").replace("widefat post-","");e.push(n)})),e}function v(){const t=h();f.val(t.join(","))}u.sortable({placeholder:"crp-sortable-placeholder",opacity:.7,cursor:"move",update:function(){v()}}).disableSelection(),e=t.extend({position:{my:"left top+2",at:"left bottom",collision:"none"},source:function(e,a){o!==e.term?(t.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:d,search_term:e.term,crp_get_posts_nonce:crp_metabox.nonce,postid:c,exclude_post_ids:h(),relevance:m}}).done((function(t){const e=t.map((function(t){return{label:t.title,id:t.id}}));n=e,a(e)})).fail((function(){})),o=e.term):a(n)},search:function(t,e){if(p.val().match(/^\d+$/)){if(p.val().length<2)return!1}else if(p.val().length<3)return!1},focus:function(t,e){t.preventDefault()},select:function(e,n){const o=n.item,a=t("<li>").addClass("widefat post-"+o.id),c=t("<button>").text("").addClass("ntdelbutton button-link").attr("type","button"),i=t("<span>").addClass("crp-drag-handle dashicons dashicons-menu").attr("title","Drag to reorder");return a.append(i),a.append(c),a.append(" "),a.append(o.label),u.append(a),v(),p.val(""),e.preventDefault(),!1}},e),a.on("keydown",(function(e){e.keyCode===t.ui.keyCode.TAB&&t(this).autocomplete("instance").menu.active&&e.preventDefault()})).autocomplete(e),u.on("click",".ntdelbutton",(function(){t(this).parent().remove(),v()}))},t("#crp-manual-related").crpAutocompletePosts()}));
[-] admin-scripts.js
[edit]
[-] metabox.min.js
[edit]
[-] bulk-edit.js
[edit]
[-] index.php
[edit]
[-] admin-scripts.min.js
[edit]
[-] metabox.js
[edit]
[-] bulk-edit.min.js
[edit]
[+]
..