Skip to:
Content

BuddyPress.org

Changeset 11033


Ignore:
Timestamp:
08/24/2016 11:25:35 AM (5 years ago)
Author:
djpaul
Message:

Core, Groups, Members, XProfile: improve code readability

This grab bag of misc. improvements improves code readability across a handful of places identified by Scrutinizer-CI

See #5891

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-template.php

    r11019 r11033  
    19911991        return apply_filters( 'bp_get_loggedin_user_username', $username );
    19921992    }
     1993
    19931994/**
    19941995 * Echo the current member type message.
  • trunk/src/bp-members/classes/class-bp-core-members-widget.php

    r11017 r11033  
    8989
    9090        // Output before widget HTMl, title (and maybe content before & after it).
    91         echo $args['before_widget']
    92            . $args['before_title']
    93            . $title
    94            . $args['after_title'];
     91        echo $args['before_widget'] . $args['before_title'] . $title . $args['after_title'];
    9592
    9693        // Setup args for querying members.
  • trunk/src/bp-members/classes/class-bp-core-recently-active-widget.php

    r10825 r11033  
    6262
    6363        echo $args['before_widget'];
    64         echo $args['before_title']
    65            . $title
    66            . $args['after_title'];
     64        echo $args['before_title'] . $title . $args['after_title'];
    6765
    6866        // Setup args for querying members.
  • trunk/src/bp-members/classes/class-bp-core-whos-online-widget.php

    r10825 r11033  
    6161        $title = apply_filters( 'widget_title', $settings['title'], $settings, $this->id_base );
    6262
    63         echo $args['before_widget']
    64            . $args['before_title']
    65            . $title
    66            . $args['after_title'];
     63        echo $args['before_widget'] . $args['before_title'] . $title . $args['after_title'];
    6764
    6865        // Setup args for querying members.
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-url.php

    r10882 r11033  
    145145
    146146        // Run some checks on the submitted value.
    147         if ( false === strpos( $submitted_value, ':'  )
    148              && substr( $submitted_value, 0, 1 ) !== '/'
    149              && substr( $submitted_value, 0, 1 ) !== '#'
    150              && ! preg_match( '/^[a-z0-9-]+?\.php/i', $submitted_value )
     147        if ( false === strpos( $submitted_value, ':'  ) &&
     148            substr( $submitted_value, 0, 1 ) !== '/' &&
     149            substr( $submitted_value, 0, 1 ) !== '#' &&
     150            ! preg_match( '/^[a-z0-9-]+?\.php/i', $submitted_value )
    151151        ) {
    152152            $submitted_value = 'http://' . $submitted_value;
Note: See TracChangeset for help on using the changeset viewer.