Skip to:
Content

bbPress.org


Ignore:
Timestamp:
04/15/2015 02:33:11 AM (11 years ago)
Author:
johnjamesjacoby
Message:

All: Update default values for $args parameters from empty strings to empty arrays.

This is a micro-optimization to avoid unnecessary calls to wp_parse_str() inside bbp_parse_args().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/functions.php

    r5642 r5676  
    418418 * @since bbPress (r2769)
    419419 *
    420  * @param mixed $args Optional. The function supports these arguments (all
     420 * @param array $args Optional. The function supports these arguments (all
    421421 *                     default to true):
    422422 *  - count_users: Count users?
     
    451451 * @return object Walked forum tree
    452452 */
    453 function bbp_get_statistics( $args = '' ) {
     453function bbp_get_statistics( $args = array() ) {
    454454
    455455    // Parse arguments against default values
     
    607607 * @since bbPress (r2734)
    608608 *
    609  * @param mixed $args Optional. If no args are there, then $_POST values are
     609 * @param array $args Optional. If no args are there, then $_POST values are
    610610 *                     used.
    611611 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_name' with the
     
    617617 * @return bool|array False on errors, values in an array on success
    618618 */
    619 function bbp_filter_anonymous_post_data( $args = '' ) {
     619function bbp_filter_anonymous_post_data( $args = array() ) {
    620620
    621621    // Parse arguments against default values
Note: See TracChangeset for help on using the changeset viewer.