mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
jquery for list manipulation. Round one, fight. Props mdawaffe. fixes #4805
git-svn-id: https://develop.svn.wordpress.org/trunk@6213 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -696,11 +696,13 @@ class WP_Ajax_Response {
|
||||
$defaults = array(
|
||||
'what' => 'object', 'action' => false,
|
||||
'id' => '0', 'old_id' => false,
|
||||
'position' => 1, // -1 = top, 1 = bottom, html ID = after, -html ID = before
|
||||
'data' => '', 'supplemental' => array()
|
||||
);
|
||||
|
||||
$r = wp_parse_args( $args, $defaults );
|
||||
extract( $r, EXTR_SKIP );
|
||||
$postition = preg_replace( '/[^a-z0-9:_-]/i', '', $position );
|
||||
|
||||
if ( is_wp_error($id) ) {
|
||||
$data = $id;
|
||||
@@ -724,7 +726,7 @@ class WP_Ajax_Response {
|
||||
|
||||
$x = '';
|
||||
$x .= "<response action='{$action}_$id'>"; // The action attribute in the xml output is formatted like a nonce action
|
||||
$x .= "<$what id='$id'" . ( false !== $old_id ? "old_id='$old_id'>" : '>' );
|
||||
$x .= "<$what id='$id' " . ( false === $old_id ? '' : "old_id='$old_id' " ) . "position='$position'>";
|
||||
$x .= $response;
|
||||
$x .= $s;
|
||||
$x .= "</$what>";
|
||||
|
||||
Reference in New Issue
Block a user