mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-10 18:37:58 +01:00
Remove unused admin-categories and admin-custom-fields JavaScript files. props ocean90. fixes #23486.
git-svn-id: http://core.svn.wordpress.org/trunk@23446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
83e0ce2ac1
commit
ea9e0c317d
@ -1,34 +0,0 @@
|
||||
jQuery(document).ready(function($) {
|
||||
var options = false, addAfter, delBefore, delAfter;
|
||||
if ( document.forms['addcat'].category_parent )
|
||||
options = document.forms['addcat'].category_parent.options;
|
||||
|
||||
addAfter = function( r, settings ) {
|
||||
var name, id;
|
||||
|
||||
name = $("<span>" + $('name', r).text() + "</span>").text();
|
||||
id = $('cat', r).attr('id');
|
||||
options[options.length] = new Option(name, id);
|
||||
}
|
||||
|
||||
delAfter = function( r, settings ) {
|
||||
var id = $('cat', r).attr('id'), o;
|
||||
for ( o = 0; o < options.length; o++ )
|
||||
if ( id == options[o].value )
|
||||
options[o] = null;
|
||||
}
|
||||
|
||||
delBefore = function(s) {
|
||||
if ( 'undefined' != showNotice )
|
||||
return showNotice.warn() ? s : false;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
if ( options )
|
||||
$('#the-list').wpList( { addAfter: addAfter, delBefore: delBefore, delAfter: delAfter } );
|
||||
else
|
||||
$('#the-list').wpList({ delBefore: delBefore });
|
||||
|
||||
$('.delete a[class^="delete"]').live('click', function(){return false;});
|
||||
});
|
1
wp-admin/js/categories.min.js
vendored
1
wp-admin/js/categories.min.js
vendored
@ -1 +0,0 @@
|
||||
jQuery(document).ready(function(d){var b=false,e,c,a;if(document.forms.addcat.category_parent){b=document.forms.addcat.category_parent.options}e=function(h,g){var f,i;f=d("<span>"+d("name",h).text()+"</span>").text();i=d("cat",h).attr("id");b[b.length]=new Option(f,i)};a=function(g,f){var i=d("cat",g).attr("id"),h;for(h=0;h<b.length;h++){if(i==b[h].value){b[h]=null}}};c=function(f){if("undefined"!=showNotice){return showNotice.warn()?f:false}return f};if(b){d("#the-list").wpList({addAfter:e,delBefore:c,delAfter:a})}else{d("#the-list").wpList({delBefore:c})}d('.delete a[class^="delete"]').live("click",function(){return false})});
|
@ -1,34 +0,0 @@
|
||||
jQuery(document).ready( function($) {
|
||||
var before, addBefore, addAfter, delBefore;
|
||||
|
||||
before = function() {
|
||||
var nonce = $('#newmeta [name="_ajax_nonce"]').val(), postId = $('#post_ID').val();
|
||||
if ( !nonce || !postId ) { return false; }
|
||||
return [nonce,postId];
|
||||
}
|
||||
|
||||
addBefore = function( s ) {
|
||||
var b = before();
|
||||
if ( !b ) { return false; }
|
||||
s.data = s.data.replace(/_ajax_nonce=[a-f0-9]+/, '_ajax_nonce=' + b[0]) + '&post_id=' + b[1];
|
||||
return s;
|
||||
};
|
||||
|
||||
addAfter = function( r, s ) {
|
||||
var postId = $('postid', r).text(), h;
|
||||
if ( !postId ) { return; }
|
||||
$('#post_ID').attr( 'name', 'post_ID' ).val( postId );
|
||||
h = $('#hiddenaction');
|
||||
if ( 'post' == h.val() ) { h.val( 'postajaxpost' ); }
|
||||
};
|
||||
|
||||
delBefore = function( s ) {
|
||||
var b = before(); if ( !b ) return false;
|
||||
s.data._ajax_nonce = b[0]; s.data.post_id = b[1];
|
||||
return s;
|
||||
}
|
||||
|
||||
$('#the-list')
|
||||
.wpList( { addBefore: addBefore, addAfter: addAfter, delBefore: delBefore } )
|
||||
.find('.updatemeta, .deletemeta').attr( 'type', 'button' );
|
||||
} );
|
1
wp-admin/js/custom-fields.min.js
vendored
1
wp-admin/js/custom-fields.min.js
vendored
@ -1 +0,0 @@
|
||||
jQuery(document).ready(function(d){var c,b,e,a;c=function(){var g=d('#newmeta [name="_ajax_nonce"]').val(),f=d("#post_ID").val();if(!g||!f){return false}return[g,f]};b=function(g){var f=c();if(!f){return false}g.data=g.data.replace(/_ajax_nonce=[a-f0-9]+/,"_ajax_nonce="+f[0])+"&post_id="+f[1];return g};e=function(j,i){var f=d("postid",j).text(),g;if(!f){return}d("#post_ID").attr("name","post_ID").val(f);g=d("#hiddenaction");if("post"==g.val()){g.val("postajaxpost")}};a=function(g){var f=c();if(!f){return false}g.data._ajax_nonce=f[0];g.data.post_id=f[1];return g};d("#the-list").wpList({addBefore:b,addAfter:e,delBefore:a}).find(".updatemeta, .deletemeta").attr("type","button")});
|
@ -356,16 +356,12 @@ function wp_default_scripts( &$scripts ) {
|
||||
'how' => __('Separate multiple categories with commas.')
|
||||
) );
|
||||
|
||||
$scripts->add( 'admin-categories', "/wp-admin/js/categories$suffix.js", array('wp-lists'), false, 1 );
|
||||
|
||||
$scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array('jquery', 'wp-ajax-response'), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
|
||||
'noPerm' => __('You do not have permission to do that.'),
|
||||
'broken' => __('An unidentified error has occurred.')
|
||||
));
|
||||
|
||||
$scripts->add( 'admin-custom-fields', "/wp-admin/js/custom-fields$suffix.js", array('wp-lists'), false, 1 );
|
||||
|
||||
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'quicktags', 'jquery-query'), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
|
||||
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
|
||||
|
Loading…
Reference in New Issue
Block a user