Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/12/2021 08:43:39 PM (4 years ago)
Author:
espellcaste
Message:

Update all references from wp_parse_args to bp_parse_args.

Also, add WPCS improvements to align bp_parse_args correctly.

Props imath
Fixes #8564

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php

    r12931 r13108  
    6666        }
    6767
    68         $day_r = bp_parse_args( $raw_properties, array(
    69             'id'   => bp_get_the_profile_field_input_name() . '_day',
    70             'name' => bp_get_the_profile_field_input_name() . '_day'
    71         ) );
    72 
    73         $month_r = bp_parse_args( $raw_properties, array(
    74             'id'   => bp_get_the_profile_field_input_name() . '_month',
    75             'name' => bp_get_the_profile_field_input_name() . '_month'
    76         ) );
    77 
    78         $year_r = bp_parse_args( $raw_properties, array(
    79             'id'   => bp_get_the_profile_field_input_name() . '_year',
    80             'name' => bp_get_the_profile_field_input_name() . '_year'
    81         ) ); ?>
     68        $day_r = bp_parse_args(
     69            $raw_properties,
     70            array(
     71                'id'   => bp_get_the_profile_field_input_name() . '_day',
     72                'name' => bp_get_the_profile_field_input_name() . '_day',
     73            )
     74        );
     75
     76        $month_r = bp_parse_args(
     77            $raw_properties,
     78            array(
     79                'id'   => bp_get_the_profile_field_input_name() . '_month',
     80                'name' => bp_get_the_profile_field_input_name() . '_month',
     81            )
     82        );
     83
     84        $year_r = bp_parse_args(
     85            $raw_properties,
     86            array(
     87                'id'   => bp_get_the_profile_field_input_name() . '_year',
     88                'name' => bp_get_the_profile_field_input_name() . '_year',
     89            )
     90        );
     91        ?>
    8292
    8393            <legend>
     
    283293    public function admin_field_html( array $raw_properties = array() ) {
    284294
    285         $day_r = bp_parse_args( $raw_properties, array(
    286             'id'   => bp_get_the_profile_field_input_name() . '_day',
    287             'name' => bp_get_the_profile_field_input_name() . '_day'
    288         ) );
    289 
    290         $month_r = bp_parse_args( $raw_properties, array(
    291             'id'   => bp_get_the_profile_field_input_name() . '_month',
    292             'name' => bp_get_the_profile_field_input_name() . '_month'
    293         ) );
    294 
    295         $year_r = bp_parse_args( $raw_properties, array(
    296             'id'   => bp_get_the_profile_field_input_name() . '_year',
    297             'name' => bp_get_the_profile_field_input_name() . '_year'
    298         ) ); ?>
     295        $day_r = bp_parse_args(
     296            $raw_properties,
     297            array(
     298                'id'   => bp_get_the_profile_field_input_name() . '_day',
     299                'name' => bp_get_the_profile_field_input_name() . '_day',
     300            )
     301        );
     302
     303        $month_r = bp_parse_args(
     304            $raw_properties,
     305            array(
     306                'id'   => bp_get_the_profile_field_input_name() . '_month',
     307                'name' => bp_get_the_profile_field_input_name() . '_month',
     308            )
     309        );
     310
     311        $year_r = bp_parse_args(
     312            $raw_properties,
     313            array(
     314                'id'   => bp_get_the_profile_field_input_name() . '_year',
     315                'name' => bp_get_the_profile_field_input_name() . '_year',
     316            )
     317        );
     318        ?>
    299319
    300320        <label for="<?php bp_the_profile_field_input_name(); ?>_day" class="xprofile-field-label"><?php
Note: See TracChangeset for help on using the changeset viewer.