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/template.php

    r5563 r5676  
    11911191 * @since bbPress (r2815)
    11921192 *
    1193  * @param mixed $args This function supports these arguments:
     1193 * @param array $args This function supports these arguments:
    11941194 *  - action: The action being taken
    11951195 *  - context: The context the action is being taken from
     
    11981198 * @uses apply_filters() Calls 'bbp_wp_login_action' with the url and args
    11991199 */
    1200 function bbp_wp_login_action( $args = '' ) {
     1200function bbp_wp_login_action( $args = array() ) {
    12011201
    12021202    // Parse arguments against default values
     
    13631363 * @since bbPress (r2746)
    13641364 *
    1365  * @param mixed $args See {@link bbp_get_dropdown()} for arguments
    1366  */
    1367 function bbp_dropdown( $args = '' ) {
     1365 * @param array $args See {@link bbp_get_dropdown()} for arguments
     1366 */
     1367function bbp_dropdown( $args = array() ) {
    13681368    echo bbp_get_dropdown( $args );
    13691369}
     
    13741374     * @since bbPress (r2746)
    13751375     *
    1376      * @param mixed $args The function supports these args:
     1376     * @param array $args The function supports these args:
    13771377     *  - post_type: Post type, defaults to bbp_get_forum_post_type() (bbp_forum)
    13781378     *  - selected: Selected ID, to not have any value as selected, pass
     
    14091409     * @return string The dropdown
    14101410     */
    1411     function bbp_get_dropdown( $args = '' ) {
     1411    function bbp_get_dropdown( $args = array() ) {
    14121412
    14131413        // Setup return value
Note: See TracChangeset for help on using the changeset viewer.