diff --git a/wp-admin/js/list-table.dev.js b/wp-admin/js/list-table.dev.js
index 6eb6c2ff58..32e9806940 100644
--- a/wp-admin/js/list-table.dev.js
+++ b/wp-admin/js/list-table.dev.js
@@ -104,7 +104,8 @@ window.listTable = {
fetch_list: function(data, success_callback, error_callback) {
data = $.extend(data, {
'action': 'fetch-list',
- 'list_args': list_args
+ 'list_args': list_args,
+ '_ajax_fetch_list_nonce': $('#_ajax_fetch_list_nonce').val()
});
$.ajax({
diff --git a/wp-admin/js/list-table.js b/wp-admin/js/list-table.js
index f70c671815..ab87daa73e 100644
--- a/wp-admin/js/list-table.js
+++ b/wp-admin/js/list-table.js
@@ -1 +1 @@
-jQuery(document).ready(function($){window.listTable={init:function(){this.loading=false;this.reset(".tablenav, .search-box, .wp-list-table");if(""==$.query.GET("paged")){$.query.SET("paged",1)}this.set_total_pages();this.$tbody=$("#the-list, #the-comment-list")},reset:function(context){context=$(context);$("input",context).each(function(){this.value=this.defaultValue;this.checked=this.defaultChecked});$("select",context).each(function(){var options=$("option",this),anySelected=false;options.each(function(){this.selected=this.defaultSelected;anySelected=anySelected||this.defaultSelected});if(!this.multiple&&!anySelected){options[0].selected=true}});$("textarea",context).each(function(){this.value=this.defaultValue})},set_total_pages:function(num){var last_page_url=$(".last-page").attr("href");if(last_page_url){this.total_pages=num||$.query.load(last_page_url).get("paged")}},get_total_pages:function(){return this.total_pages},htmlencode:function(value){return $("
").text(value).html()},update_rows:function(args,reset_paging,callback){if(this.loading){return false}var different=false,data={};$.each(args,function(key,val){if(val!=$.query.GET(key)){$.query.SET(key,val);different=true}});if(!different){return false}this.start_loading();if(reset_paging){$.query.SET("paged",1)}$.each($.query.get(),function(key,value){if(true===value){data[key]=""}else{data[key]=value}});this._callback=callback;this.fetch_list(data,$.proxy(this,"handle_success"),$.proxy(this,"handle_error"));return true},fetch_list:function(data,success_callback,error_callback){data=$.extend(data,{action:"fetch-list",list_args:list_args});$.ajax({url:ajaxurl,global:false,dataType:"json",data:data,success:success_callback,error:error_callback})},handle_success:function(response){if("object"!=typeof response){this.handle_error()}else{var tablenav=$(".tablenav-pages");this.stop_loading();$("div.updated, div.error").not(".persistent, .inline").remove();this.$tbody.html(response.rows);$(".displaying-num").html(response.total_items_i18n);$(".total-pages").html(response.total_pages_i18n);this.set_total_pages(response.total_pages);if(response.total_pages>1){tablenav.removeClass("one-page")}$(".current-page").val($.query.GET("paged"));tablenav.find(".first-page, .prev-page").toggleClass("disabled",1==$.query.GET("paged"));tablenav.find(".next-page, .last-page").toggleClass("disabled",response.total_pages==$.query.GET("paged"));$("th.column-cb :input").attr("checked",false);if(history.replaceState){history.replaceState({},"",location.pathname+$.query)}if(this._callback){this._callback()}}},handle_error:function(){this.stop_loading();$("h2").after('
")},start_loading:function(){this.loading=true;$(".error.ajax").remove();$(".list-ajax-loading").css("visibility","visible")},stop_loading:function(){this.loading=false;$(".list-ajax-loading").css("visibility","hidden")}};listTable.init();function change_page(paged,$el){if(paged<1){paged=1}if(paged>listTable.get_total_pages()){paged=listTable.get_total_pages()}$(listTable).trigger("beforeChangePage");listTable.update_rows({paged:paged},false,function(){if($el.parents(".tablenav.bottom").length){scrollTo(0,0)}$(listTable).trigger("changePage")})}$(".tablenav-pages a").click(function(){var $el=$(this),paged=$.query.GET("paged");switch($el.attr("class")){case"first-page":paged=1;break;case"prev-page":paged-=1;break;case"next-page":paged+=1;break;case"last-page":paged=listTable.get_total_pages();break}change_page(paged,$el);return false});$(".current-page").keypress(function(e){if(13!=e.keyCode){return}var $el=$(this);change_page(parseInt($el.val())||1,$el);return false});$("th.sortable a, th.sorted a").click(function(){function get_initial_order($el){return $.query.load($el.find("a").attr("href")).get("order")}var $link=$(this),$th=$link.parent("th"),thIndex=$th.index(),orderby=$.query.load($link.attr("href")).get("orderby"),order;$th=$th.closest("table").find("thead th:eq("+thIndex+"), tfoot th:eq("+thIndex+")");if(orderby==$.query.get("orderby")){order=("asc"==$.query.get("order"))?"desc":"asc"}else{order=get_initial_order($th);var $old_th=$("th.sorted");if($old_th.length){$old_th.removeClass("sorted").addClass("sortable");$old_th.removeClass("desc").removeClass("asc").addClass("asc"==get_initial_order($old_th)?"desc":"asc")}$th.removeClass("sortable").addClass("sorted")}$th.removeClass("desc").removeClass("asc").addClass(order);listTable.update_rows({orderby:orderby,order:order},true);return false});function change_search(ev){if("keypress"==ev.type&&13!=ev.keyCode){return}ev.preventDefault();ev.stopImmediatePropagation();var data=$(this).parent(".search-box").find(":input").serializeObject();listTable.update_rows(data,true,function(){if($("h2.nav-tab-wrapper").length){return}if("site-users-network"==pagenow||"site-themes-network"==pagenow){$("h4.search-text").remove();if(data.s){$("ul.subsubsub").after($('
').html(listTableL10n.search.replace("%s",this.htmlencode(data.s))))}}else{$("h2 .subtitle").remove();if(data.s){$("h2").append($('').html(listTableL10n.search.replace("%s",this.htmlencode(data.s))))}}})}$(".search-box :submit").click(change_search);$(".search-box :text").keypress(change_search);$("#post-query-submit").click(function(){var args={};$(this).parents(".actions").find('select[name!="action"]').each(function(){var $el=$(this);args[$el.attr("name")]=$el.val()});listTable.update_rows(args,true);return false});$(".view-switch a").click(function(){var $this=$(this);listTable.update_rows({mode:$.query.load($this.attr("href")).get("mode")},false,function(){$(".view-switch .current").removeClass("current");$this.addClass("current")});return false})});
\ No newline at end of file
+jQuery(document).ready(function(a){window.listTable={init:function(){this.loading=false;this.reset(".tablenav, .search-box, .wp-list-table");if(""==a.query.GET("paged")){a.query.SET("paged",1)}this.set_total_pages();this.$tbody=a("#the-list, #the-comment-list")},reset:function(d){d=a(d);a("input",d).each(function(){this.value=this.defaultValue;this.checked=this.defaultChecked});a("select",d).each(function(){var e=a("option",this),f=false;e.each(function(){this.selected=this.defaultSelected;f=f||this.defaultSelected});if(!this.multiple&&!f){e[0].selected=true}});a("textarea",d).each(function(){this.value=this.defaultValue})},set_total_pages:function(e){var d=a(".last-page").attr("href");if(d){this.total_pages=e||a.query.load(d).get("paged")}},get_total_pages:function(){return this.total_pages},htmlencode:function(d){return a("").text(d).html()},update_rows:function(e,d,h){if(this.loading){return false}var g=false,f={};a.each(e,function(i,j){if(j!=a.query.GET(i)){a.query.SET(i,j);g=true}});if(!g){return false}this.start_loading();if(d){a.query.SET("paged",1)}a.each(a.query.get(),function(i,j){if(true===j){f[i]=""}else{f[i]=j}});this._callback=h;this.fetch_list(f,a.proxy(this,"handle_success"),a.proxy(this,"handle_error"));return true},fetch_list:function(e,f,d){e=a.extend(e,{action:"fetch-list",list_args:list_args,_ajax_fetch_list_nonce:a("#_ajax_fetch_list_nonce").val()});a.ajax({url:ajaxurl,global:false,dataType:"json",data:e,success:f,error:d})},handle_success:function(d){if("object"!=typeof d){this.handle_error()}else{var e=a(".tablenav-pages");this.stop_loading();a("div.updated, div.error").not(".persistent, .inline").remove();this.$tbody.html(d.rows);a(".displaying-num").html(d.total_items_i18n);a(".total-pages").html(d.total_pages_i18n);this.set_total_pages(d.total_pages);if(d.total_pages>1){e.removeClass("one-page")}a(".current-page").val(a.query.GET("paged"));e.find(".first-page, .prev-page").toggleClass("disabled",1==a.query.GET("paged"));e.find(".next-page, .last-page").toggleClass("disabled",d.total_pages==a.query.GET("paged"));a("th.column-cb :input").attr("checked",false);if(history.replaceState){history.replaceState({},"",location.pathname+a.query)}if(this._callback){this._callback()}}},handle_error:function(){this.stop_loading();a("h2").after('")},start_loading:function(){this.loading=true;a(".error.ajax").remove();a(".list-ajax-loading").css("visibility","visible")},stop_loading:function(){this.loading=false;a(".list-ajax-loading").css("visibility","hidden")}};listTable.init();function b(e,d){if(e<1){e=1}if(e>listTable.get_total_pages()){e=listTable.get_total_pages()}a(listTable).trigger("beforeChangePage");listTable.update_rows({paged:e},false,function(){if(d.parents(".tablenav.bottom").length){scrollTo(0,0)}a(listTable).trigger("changePage")})}a(".tablenav-pages a").click(function(){var e=a(this),d=a.query.GET("paged");switch(e.attr("class")){case"first-page":d=1;break;case"prev-page":d-=1;break;case"next-page":d+=1;break;case"last-page":d=listTable.get_total_pages();break}b(d,e);return false});a(".current-page").keypress(function(f){if(13!=f.keyCode){return}var d=a(this);b(parseInt(d.val())||1,d);return false});a("th.sortable a, th.sorted a").click(function(){function i(k){return a.query.load(k.find("a").attr("href")).get("order")}var f=a(this),h=f.parent("th"),g=h.index(),j=a.query.load(f.attr("href")).get("orderby"),e;h=h.closest("table").find("thead th:eq("+g+"), tfoot th:eq("+g+")");if(j==a.query.get("orderby")){e=("asc"==a.query.get("order"))?"desc":"asc"}else{e=i(h);var d=a("th.sorted");if(d.length){d.removeClass("sorted").addClass("sortable");d.removeClass("desc").removeClass("asc").addClass("asc"==i(d)?"desc":"asc")}h.removeClass("sortable").addClass("sorted")}h.removeClass("desc").removeClass("asc").addClass(e);listTable.update_rows({orderby:j,order:e},true);return false});function c(d){if("keypress"==d.type&&13!=d.keyCode){return}d.preventDefault();d.stopImmediatePropagation();var e=a(this).parent(".search-box").find(":input").serializeObject();listTable.update_rows(e,true,function(){if(a("h2.nav-tab-wrapper").length){return}if("site-users-network"==pagenow||"site-themes-network"==pagenow){a("h4.search-text").remove();if(e.s){a("ul.subsubsub").after(a('').html(listTableL10n.search.replace("%s",this.htmlencode(e.s))))}}else{a("h2 .subtitle").remove();if(e.s){a("h2").append(a('').html(listTableL10n.search.replace("%s",this.htmlencode(e.s))))}}})}a(".search-box :submit").click(c);a(".search-box :text").keypress(c);a("#post-query-submit").click(function(){var d={};a(this).parents(".actions").find('select[name!="action"]').each(function(){var e=a(this);d[e.attr("name")]=e.val()});listTable.update_rows(d,true);return false});a(".view-switch a").click(function(){var d=a(this);listTable.update_rows({mode:a.query.load(d.attr("href")).get("mode")},false,function(){a(".view-switch .current").removeClass("current");d.addClass("current")});return false})});
\ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js b/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js
index 6d30b515da..8f12ebec29 100644
--- a/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js
+++ b/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js
@@ -433,7 +433,8 @@ var wpLink;
var self = this,
query = {
action : 'wp-link-ajax',
- page : this.page
+ page : this.page,
+ '_ajax_linking_nonce' : $('#_ajax_linking_nonce').val()
};
if ( this.search )
diff --git a/wp-includes/js/tinymce/plugins/wplink/js/wplink.js b/wp-includes/js/tinymce/plugins/wplink/js/wplink.js
index f71eaf2d4d..565c49bb05 100644
--- a/wp-includes/js/tinymce/plugins/wplink/js/wplink.js
+++ b/wp-includes/js/tinymce/plugins/wplink/js/wplink.js
@@ -1 +1 @@
-var wpLink;(function(f){var b={},e={},d,a,c;wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",init:function(){b.dialog=f("#wp-link");b.submit=f("#wp-link-submit");b.url=f("#url-field");b.title=f("#link-title-field");b.openInNewTab=f("#link-target-checkbox");b.search=f("#search-field");e.search=new a(f("#search-results"));e.recent=new a(f("#most-recent-results"));e.elements=f(".query-results",b.dialog);b.dialog.keydown(wpLink.keydown);b.dialog.keyup(wpLink.keyup);b.submit.click(function(g){wpLink.update();g.preventDefault()});f("#wp-link-cancel").click(wpLink.cancel);f("#internal-toggle").click(wpLink.toggleInternalLinking);e.elements.bind("river-select",wpLink.updateFields);b.search.keyup(wpLink.searchInternalLinks);b.dialog.bind("wpdialogrefresh",wpLink.refresh)},refresh:function(){var g;d=tinyMCEPopup.editor;e.search.refresh();e.recent.refresh();tinyMCEPopup.restoreSelection();if(g=d.dom.getParent(d.selection.getNode(),"A")){b.url.val(g.href);b.title.val(d.dom.getAttrib(g,"title"));if("_blank"==d.dom.getAttrib(g,"target")){b.openInNewTab.attr("checked","checked")}b.submit.val(wpLinkL10n.update)}else{wpLink.setDefaultValues();b.submit.val(wpLinkL10n.save)}tinyMCEPopup.storeSelection();b.url.focus()[0].select();if(!e.recent.ul.children().length){e.recent.ajax()}},cancel:function(){tinyMCEPopup.close()},update:function(){var h=tinyMCEPopup.editor,i={href:b.url.val(),title:b.title.val(),target:b.openInNewTab.attr("checked")?"_blank":""},j,g;tinyMCEPopup.restoreSelection();j=h.dom.getParent(h.selection.getNode(),"A");if(!i.href||i.href=="http://"){if(j){tinyMCEPopup.execCommand("mceBeginUndoLevel");g=h.selection.getBookmark();h.dom.remove(j,1);h.selection.moveToBookmark(g);tinyMCEPopup.execCommand("mceEndUndoLevel");tinyMCEPopup.close()}return}tinyMCEPopup.execCommand("mceBeginUndoLevel");if(j==null){h.getDoc().execCommand("unlink",false,null);tinyMCEPopup.execCommand("CreateLink",false,"#mce_temp_url#",{skip_undo:1});tinymce.each(h.dom.select("a"),function(k){if(h.dom.getAttrib(k,"href")=="#mce_temp_url#"){j=k;h.dom.setAttribs(j,i)}});if(f(j).text()=="#mce_temp_url#"){h.dom.remove(j);j=null}}else{h.dom.setAttribs(j,i)}if(j&&(j.childNodes.length!=1||j.firstChild.nodeName!="IMG")){h.focus();h.selection.select(j);h.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand("mceEndUndoLevel");tinyMCEPopup.close()},updateFields:function(i,h,g){b.url.val(h.children(".item-permalink").val());b.title.val(h.hasClass("no-title")?"":h.children(".item-title").text());if(g&&g.type=="click"){b.url.focus()}},setDefaultValues:function(){b.url.val("http://");b.title.val("")},searchInternalLinks:function(){var h=f(this),i,g=h.val();if(g.length>2){e.recent.hide();e.search.show();if(wpLink.lastSearch==g){return}wpLink.lastSearch=g;i=h.siblings("img.waiting").show();e.search.change(g);e.search.ajax(function(){i.hide()})}else{e.search.hide();e.recent.show()}},next:function(){e.search.next();e.recent.next()},prev:function(){e.search.prev();e.recent.prev()},keydown:function(i){var h,g=f.ui.keyCode;switch(i.which){case g.UP:h="prev";case g.DOWN:h=h||"next";clearInterval(wpLink.keyInterval);wpLink[h]();wpLink.keyInterval=setInterval(wpLink[h],wpLink.keySensitivity);break;default:return}i.preventDefault()},keyup:function(h){var g=f.ui.keyCode;switch(h.which){case g.ESCAPE:wpLink.cancel();break;case g.UP:case g.DOWN:clearInterval(wpLink.keyInterval);break;default:return}h.preventDefault()},delayedCallback:function(i,g){var l,k,j,h;if(!g){return i}setTimeout(function(){if(k){return i.apply(h,j)}l=true},g);return function(){if(l){return i.apply(this,arguments)}j=arguments;h=this;k=true}},toggleInternalLinking:function(h){var g=f("#search-panel"),i=b.dialog.wpdialog("widget"),k=!g.is(":visible"),j=f(window);f(this).toggleClass("toggle-arrow-active",k);b.dialog.height("auto");g.slideToggle(300,function(){setUserSetting("wplink",k?"1":"0");b[k?"search":"url"].focus();var l=j.scrollTop(),o=i.offset().top,m=o+i.outerHeight(),n=m-j.height();if(n>l){i.animate({top:ni){this.element.scrollTop(g+l-i+j)}}this.element.trigger("river-select",[h,k,this])},deselect:function(){if(this.selected){this.selected.removeClass("selected")}this.selected=false},prev:function(){if(!this.visible){return}var g;if(this.selected){g=this.selected.prev("li");if(g.length){this.select(g)}}},next:function(){if(!this.visible){return}var g=this.selected?this.selected.next("li"):f("li:not(.unselectable):first",this.element);if(g.length){this.select(g)}},ajax:function(j){var h=this,i=this.query.page==1?0:wpLink.minRiverAJAXDuration,g=wpLink.delayedCallback(function(k,l){h.process(k,l);if(j){j(k,l)}},i);this.query.ajax(g)},change:function(g){if(this.query&&this._search==g){return}this._search=g;this.query=new c(g);this.element.scrollTop(0)},process:function(h,l){var i="",j=true,g="",k=l.page==1;if(!h){if(k){i+=''+wpLinkL10n.noMatchesFound+""}}else{f.each(h,function(){g=j?"alternate":"";g+=this["title"]?"":" no-title";i+=g?'':"";i+='';i+='';i+=this["title"]?this["title"]:wpLinkL10n.noTitle;i+=''+this["info"]+"";j=!j})}this.ul[k?"html":"append"](i)},maybeLoad:function(){var h=this,i=this.element,g=i.scrollTop()+i.height();if(!this.query.ready()||g2){e.recent.hide();e.search.show();if(wpLink.lastSearch==g){return}wpLink.lastSearch=g;i=h.siblings("img.waiting").show();e.search.change(g);e.search.ajax(function(){i.hide()})}else{e.search.hide();e.recent.show()}},next:function(){e.search.next();e.recent.next()},prev:function(){e.search.prev();e.recent.prev()},keydown:function(i){var h,g=f.ui.keyCode;switch(i.which){case g.UP:h="prev";case g.DOWN:h=h||"next";clearInterval(wpLink.keyInterval);wpLink[h]();wpLink.keyInterval=setInterval(wpLink[h],wpLink.keySensitivity);break;default:return}i.preventDefault()},keyup:function(h){var g=f.ui.keyCode;switch(h.which){case g.ESCAPE:wpLink.cancel();break;case g.UP:case g.DOWN:clearInterval(wpLink.keyInterval);break;default:return}h.preventDefault()},delayedCallback:function(i,g){var l,k,j,h;if(!g){return i}setTimeout(function(){if(k){return i.apply(h,j)}l=true},g);return function(){if(l){return i.apply(this,arguments)}j=arguments;h=this;k=true}},toggleInternalLinking:function(h){var g=f("#search-panel"),i=b.dialog.wpdialog("widget"),k=!g.is(":visible"),j=f(window);f(this).toggleClass("toggle-arrow-active",k);b.dialog.height("auto");g.slideToggle(300,function(){setUserSetting("wplink",k?"1":"0");b[k?"search":"url"].focus();var l=j.scrollTop(),o=i.offset().top,m=o+i.outerHeight(),n=m-j.height();if(n>l){i.animate({top:ni){this.element.scrollTop(g+l-i+j)}}this.element.trigger("river-select",[h,k,this])},deselect:function(){if(this.selected){this.selected.removeClass("selected")}this.selected=false},prev:function(){if(!this.visible){return}var g;if(this.selected){g=this.selected.prev("li");if(g.length){this.select(g)}}},next:function(){if(!this.visible){return}var g=this.selected?this.selected.next("li"):f("li:not(.unselectable):first",this.element);if(g.length){this.select(g)}},ajax:function(j){var h=this,i=this.query.page==1?0:wpLink.minRiverAJAXDuration,g=wpLink.delayedCallback(function(k,l){h.process(k,l);if(j){j(k,l)}},i);this.query.ajax(g)},change:function(g){if(this.query&&this._search==g){return}this._search=g;this.query=new c(g);this.element.scrollTop(0)},process:function(h,l){var i="",j=true,g="",k=l.page==1;if(!h){if(k){i+=''+wpLinkL10n.noMatchesFound+""}}else{f.each(h,function(){g=j?"alternate":"";g+=this["title"]?"":" no-title";i+=g?'':"";i+='';i+='';i+=this["title"]?this["title"]:wpLinkL10n.noTitle;i+=''+this["info"]+"";j=!j})}this.ul[k?"html":"append"](i)},maybeLoad:function(){var h=this,i=this.element,g=i.scrollTop()+i.height();if(!this.query.ready()||g 'try{convertEntities(adminBarL10n);}catch(e){};',
) );
- $scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array('jquery'), '20101223' );
+ $scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array('jquery'), '20100111' );
$scripts->localize( 'wplink', 'wpLinkL10n', array(
'update' => __('Update'),
'save' => __('Add Link'),