WordPress.org

Make WordPress Core

Changeset 18840


Ignore:
Timestamp:
09/30/11 17:03:46 (3 years ago)
Author:
nacin
Message:

Allow 'id' to work in get_bookmarks(). Add link_notes even though such sorting is a bad idea. see #18068 for 3.3.

File:
1 edited

Legend:

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

    r18470 r18840  
    228228            foreach ( explode(',', $orderby) as $ordparam ) { 
    229229                $ordparam = trim($ordparam); 
    230                 if ( in_array( $ordparam, array( 'id', 'name', 'url', 'visible', 'rating', 'owner', 'updated' ) ) ) 
     230                $keys = array( 'link_id', 'link_name', 'link_url', 'link_visible', 'link_rating', 'link_owner', 'link_updated', 'link_notes' ); 
     231                if ( in_array( 'link_' . $ordparam, $keys ) ) 
    231232                    $orderparams[] = 'link_' . $ordparam; 
     233                elseif ( in_array( $ordparam, $keys ) ) 
     234                    $orderparams[] = $ordparam; 
    232235            } 
    233236            $orderby = implode(',', $orderparams); 
Note: See TracChangeset for help on using the changeset viewer.