Changes from branches/3.1/wp-includes/bookmark.php at r18355 to trunk/wp-includes/bookmark.php at r17146
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/bookmark.php
r18355 r17146 214 214 $orderby = strtolower($orderby); 215 215 $length = ''; 216 switch ( $orderby) {216 switch ($orderby) { 217 217 case 'length': 218 218 $length = ", CHAR_LENGTH(link_name) AS length"; … … 221 221 $orderby = 'rand()'; 222 222 break; 223 case 'link_id':224 $orderby = "$wpdb->links.link_id";225 break;226 223 default: 227 224 $orderparams = array(); 228 foreach ( explode(',', $orderby) as $ordparam ) { 229 $ordparam = trim($ordparam); 230 if ( in_array( $ordparam, array( 'name', 'url', 'visible', 'rating', 'owner', 'updated' ) ) ) 231 $orderparams[] = 'link_' . $ordparam; 232 } 225 foreach ( explode(',', $orderby) as $ordparam ) 226 $orderparams[] = 'link_' . trim($ordparam); 233 227 $orderby = implode(',', $orderparams); 234 228 } 235 229 236 if ( empty( $orderby ) ) 237 $orderby = 'link_name'; 238 239 $order = strtoupper( $order ); 240 if ( '' !== $order && !in_array( $order, array( 'ASC', 'DESC' ) ) ) 241 $order = 'ASC'; 230 if ( 'link_id' == $orderby ) 231 $orderby = "$wpdb->links.link_id"; 242 232 243 233 $visible = '';
Note: See TracChangeset
for help on using the changeset viewer.