Changeset 6156
- Timestamp:
- 12/09/2016 02:08:07 PM (6 years ago)
- Location:
- branches/1.1/bb-includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1/bb-includes/functions.bb-forums.php
r2739 r6156 62 62 $args = array( 'child_of' => $args, 'hierarchical' => 1, 'depth' => 0 ); 63 63 } elseif ( is_callable($args) ) { 64 $_args = func_get_args(); 64 65 $args = array( 'callback' => $args ); 65 66 if ( 1 < func_num_args() ) 66 $args['callback_args'] = func_get_arg(1);67 $args['callback_args'] = $_args[1]; 67 68 } 68 69 -
branches/1.1/bb-includes/functions.bb-template.php
r4895 r6156 917 917 global $bb_forums_loop; 918 918 919 $_args = func_get_args(); 919 920 $default_type = 'flat'; 920 921 … … 923 924 } elseif ( func_num_args() > 1 ) { // bb_forums( 'ul', $args ); Deprecated 924 925 $default_type = $args; 925 $args = func_get_arg(1);926 $args = $_args[1]; 926 927 } elseif ( $args && is_string($args) && false === strpos($args, '=') ) { 927 928 $args = array( 'type' => $args ); … … 3226 3227 3227 3228 function bb_tag_heat_map( $args = '' ) { 3229 $_args = func_get_args(); 3228 3230 $defaults = array( 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'limit' => 40, 'format' => 'flat' ); 3229 3231 $args = wp_parse_args( $args, $defaults ); 3230 3232 3231 3233 if ( 1 < $fn = func_num_args() ) : // For back compat 3232 $args['smallest'] = func_get_arg(0);3233 $args['largest'] = func_get_arg(1);3234 $args['unit'] = 2 < $fn ? func_get_arg(2): $unit;3235 $args['limit'] = 3 < $fn ? func_get_arg(3): $limit;3234 $args['smallest'] = $_args[0]; 3235 $args['largest'] = $_args[1]; 3236 $args['unit'] = 2 < $fn ? $_args[2] : $unit; 3237 $args['limit'] = 3 < $fn ? $_args[3] : $limit; 3236 3238 endif; 3237 3239 … … 3313 3315 3314 3316 function bb_forum_dropdown( $args = '' ) { 3317 $_args = func_get_args(); 3315 3318 if ( $args && is_string($args) && false === strpos($args, '=') ) 3316 3319 $args = array( 'callback' => $args ); 3317 3320 if ( 1 < func_num_args() ) 3318 $args['callback_args'] = func_get_arg(1);3321 $args['callback_args'] = $_args[1]; 3319 3322 echo bb_get_forum_dropdown( $args ); 3320 3323 } 3321 3324 3322 3325 function bb_get_forum_dropdown( $args = '' ) { 3326 $_args = func_get_args(); 3323 3327 $defaults = array( 'callback' => false, 'callback_args' => false, 'id' => 'forum_id', 'none' => false, 'selected' => false, 'tab' => false, 'hierarchical' => 1, 'depth' => 0, 'child_of' => 0, 'disable_categories' => 1, 'options_only' => false ); 3324 3328 if ( $args && is_string($args) && false === strpos($args, '=') ) 3325 3329 $args = array( 'callback' => $args ); 3326 3330 if ( 1 < func_num_args() ) 3327 $args['callback_args'] = func_get_arg(1);3331 $args['callback_args'] = $_args[1]; 3328 3332 3329 3333 $args = wp_parse_args( $args, $defaults ); -
branches/1.1/bb-includes/functions.bb-topic-tags.php
r3854 r6156 355 355 function get_tagged_topics( $args ) { 356 356 global $tagged_topic_count; 357 $_args = func_get_args(); 357 358 $defaults = array( 'tag_id' => false, 'page' => 1, 'number' => false, 'count' => true ); 358 359 if ( is_numeric( $args ) ) … … 361 362 $args = wp_parse_args( $args ); // Make sure it's an array 362 363 if ( 1 < func_num_args() ) 363 $args['page'] = func_get_arg(1);364 $args['page'] = $_args[1]; 364 365 if ( 2 < func_num_args() ) 365 $args['number'] = func_get_arg(2);366 $args['number'] = $_args[2]; 366 367 367 368 $args = wp_parse_args( $args, $defaults ); … … 377 378 378 379 function get_tagged_topic_posts( $args ) { 380 $_args = func_get_args(); 379 381 $defaults = array( 'tag_id' => false, 'page' => 1, 'number' => false ); 380 382 if ( is_numeric( $args ) ) … … 383 385 $args = wp_parse_args( $args ); // Make sure it's an array 384 386 if ( 1 < func_num_args() ) 385 $args['page'] = func_get_arg(1);387 $args['page'] = $_args[1]; 386 388 if ( 2 < func_num_args() ) 387 $args['number'] = func_get_arg(2);389 $args['number'] = $_args[2]; 388 390 389 391 $args = wp_parse_args( $args, $defaults ); -
branches/1.1/bb-includes/functions.bb-topics.php
r2798 r6156 60 60 61 61 function get_latest_topics( $args = null ) { 62 $_args = func_get_args(); 62 63 $defaults = array( 'forum' => false, 'page' => 1, 'exclude' => false, 'number' => false ); 63 64 if ( is_numeric( $args ) ) … … 66 67 $args = wp_parse_args( $args ); // Make sure it's an array 67 68 if ( 1 < func_num_args() ) 68 $args['page'] = func_get_arg(1);69 $args['page'] = $_args[1]; 69 70 if ( 2 < func_num_args() ) 70 $args['exclude'] = func_get_arg(2);71 $args['exclude'] = $_args[2]; 71 72 72 73 $args = wp_parse_args( $args, $defaults ); … … 437 438 438 439 function get_thread( $topic_id, $args = null ) { 440 $_args = func_get_args(); 439 441 $defaults = array( 'page' => 1, 'order' => 'ASC' ); 440 442 if ( is_numeric( $args ) ) 441 443 $args = array( 'page' => $args ); 442 if ( @ func_get_arg(2))444 if ( @$_args[2] ) 443 445 $defaults['order'] = 'DESC'; 444 446
Note: See TracChangeset
for help on using the changeset viewer.