Changeset 6726 for trunk/wp-includes/query.php
- Timestamp:
- 02/05/2008 06:47:27 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r6704 r6726 38 38 39 39 function is_admin () { 40 if ( defined('WP_ADMIN') ) 40 if ( defined('WP_ADMIN') ) 41 41 return WP_ADMIN; 42 42 return false; … … 144 144 * @return bool True if front of site 145 145 */ 146 function is_front () { 147 // most likely case 148 if ( 'posts' == get_option('show_on_front') && is_home() ) 149 return true; 150 elseif ( 'page' == get_option('show_on_front') && get_option('page_on_front') && is_page(get_option('page_on_front')) ) 151 return true; 152 else 153 return false; 154 } 146 function is_front () { 147 // most likely case 148 if ( 'posts' == get_option('show_on_front') && is_home() ) 149 return true; 150 elseif ( 'page' == get_option('show_on_front') && get_option('page_on_front') && is_page(get_option('page_on_front')) ) 151 return true; 152 else 153 return false; 154 } 155 155 156 156 /** … … 186 186 187 187 $page = (array) $page; 188 188 189 189 if ( in_array( $page_obj->ID, $page ) ) 190 190 return true; … … 978 978 if ( !empty($q['category__not_in']) ) { 979 979 $ids = get_objects_in_term($q['category__not_in'], 'category'); 980 if ( is_wp_error( $ids ) ) 980 if ( is_wp_error( $ids ) ) 981 981 return $ids; 982 982 if ( is_array($ids) && count($ids > 0) ) { … … 1166 1166 $q['orderby'] .= (($i == 0) ? '' : ',') . $orderby; 1167 1167 } 1168 /* append ASC or DESC at the end */ 1168 /* append ASC or DESC at the end */ 1169 1169 if ( !empty($q['orderby'])){ 1170 1170 $q['orderby'] .= " {$q['order']}"; 1171 1171 } 1172 1172 1173 1173 if ( empty($q['orderby']) ) 1174 1174 $q['orderby'] = 'post_date '.$q['order'];
Note: See TracChangeset
for help on using the changeset viewer.