Changeset 6159 for branches/0.9/bb-includes/template-functions.php
- Timestamp:
- 12/12/2016 01:56:05 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.9/bb-includes/template-functions.php
r2389 r6159 648 648 global $bb_forums_loop; 649 649 650 $_args = func_get_args(); 650 651 $default_type = 'flat'; 651 652 … … 654 655 } elseif ( func_num_args() > 1 ) { // bb_forums( 'ul', $args ); Deprecated 655 656 $default_type = $args; 656 $args = func_get_arg(1);657 $args = $_args[1]; 657 658 } elseif ( $args && is_string($args) && false === strpos($args, '=') ) { 658 659 $args = array( 'type' => $args ); … … 1990 1991 1991 1992 function bb_tag_heat_map( $args = '' ) { 1993 $_args = func_get_args(); 1992 1994 $defaults = array( 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'limit' => 45, 'format' => 'flat' ); 1993 1995 $args = wp_parse_args( $args, $defaults ); 1994 1996 1995 1997 if ( 1 < $fn = func_num_args() ) : // For back compat 1996 $args['smallest'] = func_get_arg(0);1997 $args['largest'] = func_get_arg(1);1998 $args['unit'] = 2 < $fn ? func_get_arg(2): $unit;1999 $args['limit'] = 3 < $fn ? func_get_arg(3): $limit;1998 $args['smallest'] = $_args[0]; 1999 $args['largest'] = $_args[1]; 2000 $args['unit'] = 2 < $fn ? $_args[2] : $unit; 2001 $args['limit'] = 3 < $fn ? $_args[3] : $limit; 2000 2002 endif; 2001 2003 … … 2012 2014 2013 2015 function bb_related_tags_heat_map( $args = '' ) { 2016 $_args = func_get_args(); 2014 2017 if ( $args && is_string($args) && false === strpos($args, '=') || is_numeric($args) ) 2015 2018 $args = array( 'tag' => $args ); … … 2019 2022 2020 2023 if ( 1 < $fn = func_num_args() ) : // For back compat 2021 $args['smallest'] = func_get_arg(0);2022 $args['largest'] = func_get_arg(1);2023 $args['unit'] = 2 < $fn ? func_get_arg(2): $unit;2024 $args['limit'] = 3 < $fn ? func_get_arg(3): $limit;2024 $args['smallest'] = $_args[0]; 2025 $args['largest'] = $_args[1]; 2026 $args['unit'] = 2 < $fn ? $_args[2] : $unit; 2027 $args['limit'] = 3 < $fn ? $_args[3] : $limit; 2025 2028 endif; 2026 2029 … … 2097 2100 2098 2101 function bb_forum_dropdown( $args = '' ) { 2102 $_args = func_get_args(); 2099 2103 if ( $args && is_string($args) && false === strpos($args, '=') ) 2100 2104 $args = array( 'callback' => $args ); 2101 2105 if ( 1 < func_num_args() ) 2102 $args['callback_args'] = func_get_arg(1);2106 $args['callback_args'] = $_args[1]; 2103 2107 echo bb_get_forum_dropdown( $args ); 2104 2108 } 2105 2109 2106 2110 function bb_get_forum_dropdown( $args = '' ) { 2111 $_args = func_get_args(); 2107 2112 $defaults = array( 'callback' => false, 'callback_args' => false, 'id' => 'forum_id', 'none' => false, 'selected' => false, 'tab' => 5, 'hierarchical' => 1, 'depth' => 0, 'child_of' => 0 ); 2108 2113 if ( $args && is_string($args) && false === strpos($args, '=') ) 2109 2114 $args = array( 'callback' => $args ); 2110 2115 if ( 1 < func_num_args() ) 2111 $args['callback_args'] = func_get_arg(1);2116 $args['callback_args'] = $_args[1]; 2112 2117 2113 2118 $args = wp_parse_args( $args, $defaults );
Note: See TracChangeset
for help on using the changeset viewer.