@@ 217-226 (lines=10) @@ | ||
214 | */ |
|
215 | public static function minor_conditions( $minor_conditions, $major_condition ) { |
|
216 | switch ( $major_condition ) { |
|
217 | case 'category': |
|
218 | $minor_conditions[''] = __( 'All category pages', 'jetpack' ); |
|
219 | ||
220 | $categories = get_categories( array( 'number' => 1000, 'orderby' => 'count', 'order' => 'DESC' ) ); |
|
221 | usort( $categories, array( __CLASS__, 'strcasecmp_name' ) ); |
|
222 | ||
223 | foreach ( $categories as $category ) { |
|
224 | $minor_conditions[$category->term_id] = $category->name; |
|
225 | } |
|
226 | break; |
|
227 | case 'author': |
|
228 | $minor_conditions[''] = __( 'All author pages', 'jetpack' ); |
|
229 | ||
@@ 234-243 (lines=10) @@ | ||
231 | $minor_conditions[$author->ID] = $author->display_name; |
|
232 | } |
|
233 | break; |
|
234 | case 'tag': |
|
235 | $minor_conditions[''] = __( 'All tag pages', 'jetpack' ); |
|
236 | ||
237 | $tags = get_tags( array( 'number' => 1000, 'orderby' => 'count', 'order' => 'DESC' ) ); |
|
238 | usort( $tags, array( __CLASS__, 'strcasecmp_name' ) ); |
|
239 | ||
240 | foreach ( $tags as $tag ) { |
|
241 | $minor_conditions[$tag->term_id] = $tag->name; |
|
242 | } |
|
243 | break; |
|
244 | case 'date': |
|
245 | $minor_conditions[''] = __( 'All date archives', 'jetpack' ); |
|
246 | $minor_conditions['day'] = __( 'Daily archives', 'jetpack' ); |