Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/06/2023 11:35:55 PM (2 years ago)
Author:
espellcaste
Message:

PHPCS: adding a little bit of space between brackets.

Closes https://github.com/buddypress/buddypress/pull/44
See #7228

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-functions.php

    r13121 r13392  
    193193
    194194    $field = bp_xprofile_get_field_types();
    195     $class = isset( $field[$type] ) ? $field[$type] : '';
     195    $class = isset( $field[ $type ] ) ? $field[ $type ] : '';
    196196
    197197    /**
     
    558558    }
    559559
    560     $current_visibility_levels[$field_id] = $visibility_level;
     560    $current_visibility_levels[ $field_id ] = $visibility_level;
    561561
    562562    return bp_update_user_meta( $user_id, 'bp_xprofile_visibility_levels', $current_visibility_levels );
     
    13611361        // the user-provided setting with the default specified by the admin.
    13621362        if ( isset( $defaults['allow_custom'] ) && isset( $defaults['default'] ) && 'disabled' == $defaults['allow_custom'] ) {
    1363             $user_visibility_levels[$d_field_id] = $defaults['default'];
     1363            $user_visibility_levels[ $d_field_id ] = $defaults['default'];
    13641364        }
    13651365    }
     
    13751375    if ( in_array( 1, $field_ids ) ) {
    13761376        $key = array_search( 1, $field_ids );
    1377         unset( $field_ids[$key] );
     1377        unset( $field_ids[ $key ] );
    13781378    }
    13791379
     
    13911391 */
    13921392function bp_xprofile_maybe_format_datebox_post_data( $field_id ) {
    1393     if ( ! isset( $_POST['field_' . $field_id] ) ) {
    1394         if ( ! empty( $_POST['field_' . $field_id . '_day'] ) && ! empty( $_POST['field_' . $field_id . '_month'] ) && ! empty( $_POST['field_' . $field_id . '_year'] ) ) {
     1393    if ( ! isset( $_POST[ 'field_' . $field_id ] ) ) {
     1394        if ( ! empty( $_POST[ 'field_' . $field_id . '_day' ] ) && ! empty( $_POST[ 'field_' . $field_id . '_month' ] ) && ! empty( $_POST[ 'field_' . $field_id . '_year' ] ) ) {
    13951395            // Concatenate the values.
    1396             $date_value = $_POST['field_' . $field_id . '_day'] . ' ' . $_POST['field_' . $field_id . '_month'] . ' ' . $_POST['field_' . $field_id . '_year'];
     1396            $date_value = $_POST[ 'field_' . $field_id . '_day' ] . ' ' . $_POST[ 'field_' . $field_id . '_month' ] . ' ' . $_POST[ 'field_' . $field_id . '_year' ];
    13971397
    13981398            // Check that the concatenated value can be turned into a timestamp.
    13991399            if ( $timestamp = strtotime( $date_value ) ) {
    14001400                // Add the timestamp to the global $_POST that should contain the datebox data.
    1401                 $_POST['field_' . $field_id] = date( 'Y-m-d H:i:s', $timestamp );
     1401                $_POST[ 'field_' . $field_id ] = date( 'Y-m-d H:i:s', $timestamp );
    14021402            }
    14031403        }
Note: See TracChangeset for help on using the changeset viewer.