PHP Cross Reference of WordPress Subversion HEAD |
| [ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] |
[Summary view] [Print] [Text view]
1 jQuery( function($) { 2 var before = function() { 3 var nonce = $('#newmeta [@name=_ajax_nonce]').val(); 4 var postId = $('#post_ID').val(); 5 if ( !nonce || !postId ) { return false; } 6 return [nonce,postId]; 7 } 8 9 var addBefore = function( s ) { 10 var b = before(); 11 if ( !b ) { return false; } 12 s.data = s.data.replace(/_ajax_nonce=[a-f0-9]+/, '_ajax_nonce=' + b[0]) + '&post_id=' + b[1]; 13 return s; 14 }; 15 16 var addAfter = function( r, s ) { 17 var postId = $('postid', r).text(); 18 if ( !postId ) { return; } 19 $('#post_ID').attr( 'name', 'post_ID' ).val( postId ); 20 var h = $('#hiddenaction'); 21 if ( 'post' == h.val() ) { h.val( 'postajaxpost' ); } 22 }; 23 24 var delBefore = function( s ) { 25 var b = before(); if ( !b ) return false; 26 s.data._ajax_nonce = b[0]; s.data.post_id = b[1]; 27 return s; 28 } 29 30 $('#the-list') 31 .wpList( { addBefore: addBefore, addAfter: addAfter, delBefore: delBefore } ) 32 .find('.updatemeta, .deletemeta').attr( 'type', 'button' ); 33 } );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated Thu Dec 6 06:47:08 2007 for RedAlt XRefs | Cross-referenced by PHPXref 0.6 and RedAlt |