WordPress.org

Make WordPress Core

Changeset 2466


Ignore:
Timestamp:
03/22/2005 01:55:07 AM (17 years ago)
Author:
ryan
Message:

Add posts_orderby filter. http://mosquito.wordpress.org/view.php?id=1149 Props: davidchait

File:
1 edited

Legend:

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

    r2419 r2466  
    538538        $where .= " GROUP BY $wpdb->posts.ID";
    539539        $join = apply_filters('posts_join_paged', $join);
    540         $request = " SELECT $distinct * FROM $wpdb->posts $join WHERE 1=1".$where." ORDER BY post_" . $q['orderby'] . " $limits";
     540        $orderby = "post_" . $q['orderby'];
     541        $orderby = apply_filters('posts_orderby', $orderby);
     542        $request = " SELECT $distinct * FROM $wpdb->posts $join WHERE 1=1".$where." ORDER BY " . $orderby . " $limits";
    541543
    542544        if ($q['preview']) {
Note: See TracChangeset for help on using the changeset viewer.