Changeset 7592 for trunk/wp-includes/media.php
- Timestamp:
- 04/03/2008 03:05:49 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/media.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r7575 r7592 340 340 if ( $output != '' ) 341 341 return $output; 342 342 343 // We're trusting author input, so let's at least make sure it looks like a valid orderby statement 344 if ( isset( $attr['orderby'] ) ) { 345 $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] ); 346 if ( !$attr['orderby'] ) 347 unset( $attr['orderby'] ); 348 } 349 343 350 extract(shortcode_atts(array( 344 351 'orderby' => 'menu_order ASC, ID ASC', … … 352 359 353 360 $id = intval($id); 354 $orderby = addslashes($orderby); 355 $attachments = get_children("post_parent=$id&post_type=attachment&post_mime_type=image&orderby=\"{$orderby}\""); 361 $attachments = get_children("post_parent=$id&post_type=attachment&post_mime_type=image&orderby={$orderby}"); 356 362 357 363 if ( empty($attachments) ) … … 427 433 global $post; 428 434 $post = get_post($post); 429 $attachments = array_values(get_children("post_parent=$post->post_parent&post_type=attachment&post_mime_type=image&orderby= \"menu_order ASC, ID ASC\""));435 $attachments = array_values(get_children("post_parent=$post->post_parent&post_type=attachment&post_mime_type=image&orderby=menu_order ASC, ID ASC")); 430 436 431 437 foreach ( $attachments as $k => $attachment )
Note: See TracChangeset
for help on using the changeset viewer.