Changeset 6167
- Timestamp:
- 12/13/2016 09:16:20 AM (8 years ago)
- Location:
- branches/1.2/bb-includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bb-includes/functions.bb-forums.php
r2739 r6167 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.2/bb-includes/functions.bb-template.php
r3847 r6167 916 916 global $bb_forums_loop; 917 917 918 $_args = func_get_args(); 918 919 $default_type = 'flat'; 919 920 … … 922 923 } elseif ( func_num_args() > 1 ) { // bb_forums( 'ul', $args ); Deprecated 923 924 $default_type = $args; 924 $args = func_get_arg(1);925 $args = $_args[1]; 925 926 } elseif ( $args && is_string($args) && false === strpos($args, '=') ) { 926 927 $args = array( 'type' => $args ); … … 3225 3226 3226 3227 function bb_tag_heat_map( $args = '' ) { 3228 $_args = func_get_args(); 3227 3229 $defaults = array( 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'limit' => 40, 'format' => 'flat' ); 3228 3230 $args = wp_parse_args( $args, $defaults ); 3229 3231 3230 3232 if ( 1 < $fn = func_num_args() ) : // For back compat 3231 $args['smallest'] = func_get_arg(0);3232 $args['largest'] = func_get_arg(1);3233 $args['unit'] = 2 < $fn ? func_get_arg(2): $unit;3234 $args['limit'] = 3 < $fn ? func_get_arg(3): $limit;3233 $args['smallest'] = $_args[0]; 3234 $args['largest'] = $_args[1]; 3235 $args['unit'] = 2 < $fn ? $_args[2] : $unit; 3236 $args['limit'] = 3 < $fn ? $_args[3] : $limit; 3235 3237 endif; 3236 3238 … … 3312 3314 3313 3315 function bb_forum_dropdown( $args = '' ) { 3316 $_args = func_get_args(); 3314 3317 if ( $args && is_string($args) && false === strpos($args, '=') ) 3315 3318 $args = array( 'callback' => $args ); 3316 3319 if ( 1 < func_num_args() ) 3317 $args['callback_args'] = func_get_arg(1);3320 $args['callback_args'] = $_args[1]; 3318 3321 echo bb_get_forum_dropdown( $args ); 3319 3322 } 3320 3323 3321 3324 function bb_get_forum_dropdown( $args = '' ) { 3325 $_args = func_get_args(); 3322 3326 $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 ); 3323 3327 if ( $args && is_string($args) && false === strpos($args, '=') ) 3324 3328 $args = array( 'callback' => $args ); 3325 3329 if ( 1 < func_num_args() ) 3326 $args['callback_args'] = func_get_arg(1);3330 $args['callback_args'] = $_args[1]; 3327 3331 3328 3332 $args = wp_parse_args( $args, $defaults ); -
branches/1.2/bb-includes/functions.bb-topic-tags.php
r3854 r6167 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.2/bb-includes/functions.bb-topics.php
r2798 r6167 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.