Last active
August 29, 2015 14:03
-
-
Save sebbdk/d3b383bf2be557990dd1 to your computer and use it in GitHub Desktop.
ridiculous!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (is_admin()) | |
| { | |
| if ($options['adminsort'] == "1" && | |
| //ignore when ajax Gallery Edit default functionality | |
| !($options['adminsort'] == "1" && defined('DOING_AJAX') && isset($_REQUEST['action']) && $_REQUEST['action'] == 'query-attachments') | |
| ) | |
| { | |
| $orderBy = "{$wpdb->posts}.menu_order, {$wpdb->posts}.post_date DESC"; | |
| } | |
| } | |
| else | |
| { | |
| //ignore search | |
| if($query->is_search()) | |
| return($orderBy); | |
| if ($options['autosort'] == "1") | |
| $orderBy = "{$wpdb->posts}.menu_order, " . $orderBy; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment