Make WordPress Core


Ignore:
Timestamp:
10/09/2007 10:49:42 PM (19 years ago)
Author:
ryan
Message:

jquery for list manipulation. Round one, fight. Props mdawaffe. fixes #4805

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r6021 r6213  
    697697                        'what' => 'object', 'action' => false,
    698698                        'id' => '0', 'old_id' => false,
     699                        'position' => 1, // -1 = top, 1 = bottom, html ID = after, -html ID = before
    699700                        'data' => '', 'supplemental' => array()
    700701                );
    … …  
    702703                $r = wp_parse_args( $args, $defaults );
    703704                extract( $r, EXTR_SKIP );
     705                $postition = preg_replace( '/[^a-z0-9:_-]/i', '', $position );
    704706
    705707                if ( is_wp_error($id) ) {
    … …  
    725727                $x = '';
    726728                $x .= "<response action='{$action}_$id'>"; // The action attribute in the xml output is formatted like a nonce action
    727                 $x .=   "<$what id='$id'" . ( false !== $old_id ? "old_id='$old_id'>" : '>' );
     729                $x .=   "<$what id='$id' " . ( false === $old_id ? '' : "old_id='$old_id' " ) . "position='$position'>";
    728730                $x .=           $response;
    729731                $x .=           $s;
Note: See TracChangeset for help on using the changeset viewer.