Changeset 3605
- Timestamp:
- 03/03/2006 09:38:36 PM (20 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 3 edited
-
deprecated.php (modified) (2 diffs)
-
template-functions-bookmarks.php (modified) (1 diff)
-
template-functions-category.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/deprecated.php
r3591 r3605 412 412 } 413 413 414 function wp_list_cats($args = '') { 415 if ( is_array($args) ) 416 $r = &$args; 417 else 418 parse_str($args, $r); 419 420 // Map to new names. 421 if ( isset($r['optionall']) && isset($r['all'])) 422 $r['show_option_all'] = $r['all']; 423 if ( isset($r['sort_column']) ) 424 $r['orderby'] = $r['sort_column']; 425 if ( isset($r['sort_order']) ) 426 $r['order'] = $r['sort_order']; 427 if ( isset($r['optiondates']) ) 428 $r['show_last_update'] = $r['optiondates']; 429 if ( isset($r['optioncount']) ) 430 $r['show_count'] = $r['optioncount']; 431 if ( !empty($r['list']) ) 432 $r['style'] = 'break'; 433 434 return wp_list_categories($r); 435 } 436 414 437 function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc', 415 $show_last_update = 0, $show_count s= 0, $hide_empty = 1, $optionnone = FALSE,438 $show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = FALSE, 416 439 $selected = 0, $exclude = 0) { 417 440 … … 425 448 426 449 $vars = compact('show_option_all', 'show_option_none', 'orderby', 'order', 427 'show_last_update', 'show_count s', 'hide_empty', 'selected', 'exclude');450 'show_last_update', 'show_count', 'hide_empty', 'selected', 'exclude'); 428 451 $query = add_query_arg($vars, ''); 429 452 return wp_dropdown_categories($query); -
trunk/wp-includes/template-functions-bookmarks.php
r3595 r3605 248 248 } 249 249 250 function wp_list_bookmarks($args = '') { 251 if ( is_array($args) ) 252 $r = &$args; 253 else 254 parse_str($args, $r); 255 256 $defaults = array('orderby' => 'name', 'order' => 'ASC', 'limit' => 0, 'category' => 0, 257 'category_name' => '', 'hide_invisible' => 1, 'show_updated' => 0, 'echo' =>1, 258 'categorize' => 1, 'title_li' => __('Bookmarks')); 259 $r = array_merge($defaults, $r); 260 extract($r); 261 262 // TODO: The rest of it. 263 // If $categorize, group links by category with the category name being the 264 // title of each li, otherwise just list them with title_li as the li title. 265 // If $categorize and $category or $category_name, list links for the given category 266 // with the category name as the title li. If not $categorize, use title_li. 267 // When using each category's name as a title li, use before and after args for specifying 268 // any markup. We don't want to hardcode h2. 269 } 270 250 271 function get_bookmarks($args = '') { 251 272 global $wpdb; -
trunk/wp-includes/template-functions-category.php
r3595 r3605 157 157 158 158 $defaults = array('show_option_all' => '', 'show_option_none' => '', 'orderby' => 'ID', 159 'order' => 'ASC', 'show_last_update' => 0, 'show_count s' => 0,159 'order' => 'ASC', 'show_last_update' => 0, 'show_count' => 0, 160 160 'hide_empty' => 1, 'child_of' => 0, 'exclude' => '', 'echo' => 1, 161 161 'selected' => 0, 'hierarchical' => 0, 'name' => 'cat', … … 207 207 $output .= '>'; 208 208 $output .= $cat_name; 209 if ( $args['show_count s'] )209 if ( $args['show_count'] ) 210 210 $output .= ' ('. $category->category_count .')'; 211 211 if ( $args['show_last_update'] ) { … … 218 218 } 219 219 220 function wp_list_cats($args = '') {221 return wp_list_categories($args);222 }223 224 220 function wp_list_categories($args = '') { 225 221 if ( is_array($args) ) … … 228 224 parse_str($args, $r); 229 225 230 $defaults = array(' optionall' => 0, 'all' => 'All', 'sort_column' => 'ID',231 ' sort_order' => 'asc', 'list' => true, 'optiondates' => 0,232 ' optioncount' => 0, 'hide_empty' => 1, 'use_desc_for_title' => 1,226 $defaults = array('show_option_all' => '', 'orderby' => 'ID', 227 'order' => 'asc', 'style' => 'list', 'show_last_update' => 0, 228 'show_count' => 0, 'hide_empty' => 1, 'use_desc_for_title' => 1, 233 229 'child_of' => 0, 'feed' => '', 'feed_image' => '', 'exclude' => '', 234 230 'hierarchical' => false, 'title_li' => ''); 235 231 $r = array_merge($defaults, $r); 236 if ( ! isset($r['orderby']) ) 237 $r['orderby'] = $r['sort_column']; 238 if ( ! isset($r['order']) ) 239 $r['order'] = $r['sort_order']; 240 $r['include_last_update_time'] = $r['optiondates']; 232 $r['include_last_update_time'] = $r['show_date']; 241 233 extract($r); 242 234 … … 270 262 271 263 function _category_list_level_start($output, $depth, $cat, $args) { 272 if ( ! $args['list'])264 if ( 'list' != $args['style'] ) 273 265 return $output; 274 266 … … 279 271 280 272 function _category_list_level_end($output, $depth, $cat, $args) { 281 if ( ! $args['list'])273 if ( 'list' != $args['style'] ) 282 274 return $output; 283 275 … … 324 316 } 325 317 326 if ( intval($optioncount) == 1)318 if ( $show_count ) 327 319 $link .= ' ('.intval($category->category_count).')'; 328 320 329 if ( $optiondates ) { 330 if ( $optiondates == 1 ) 331 $optiondates = 'Y-m-d'; 332 $link .= ' ' . gmdate($optiondates,$category->last_update_timestamp); 333 } 334 335 if ( $list ) { 321 if ( $show_date ) { 322 $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp); 323 } 324 325 if ( 'list' == $args['style'] ) { 336 326 $output .= "\t<li"; 337 327 if ( ($category->cat_ID == $current_category) && is_category() ) … … 346 336 347 337 function _category_list_element_end($output, $category, $depth, $cat, $args) { 348 if ( ! $args['list'])338 if ( 'list' != $args['style'] ) 349 339 return $output; 350 340
Note: See TracChangeset
for help on using the changeset viewer.