Changeset 826348
- Timestamp:
- 12/21/2013 12:19:38 AM (12 years ago)
- File:
-
- 1 edited
-
smarter-archives/trunk/smarter-archives.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smarter-archives/trunk/smarter-archives.php
r822290 r826348 29 29 $archives = array(); 30 30 31 if ( empty( $results ) ) 32 return $archives; 33 34 foreach ( $results as $result ) { 35 if ( !isset( $archives[$result->year] ) ) 36 $archives[$result->year] = array(); 31 if ( !empty( $results ) ) { 32 foreach ( $results as $result ) { 33 if ( !isset( $archives[$result->year] ) ) 34 $archives[$result->year] = array(); 37 35 38 $archives[$result->year][$result->month] = $result->count; 36 $archives[$result->year][$result->month] = $result->count; 37 } 39 38 } 40 39 … … 65 64 $mode = 'output'; 66 65 67 $order = strtoupper( $order );68 if ( $order != 'DESC' && $order != 'ASC' )69 $order = 'DESC';70 71 66 $archives = get_smarter_archives(); 72 67 … … 74 69 return ''; 75 70 71 $order = strtoupper( $order ); 76 72 if ( $order == 'ASC' ) 77 73 ksort( $archives ); … … 136 132 function wp_smart_archives( $args = '' ) 137 133 { 138 return smarter_archives( $args);134 return smarter_archives( $args ); 139 135 } 140 136
Note: See TracChangeset
for help on using the changeset viewer.