Skip to:
Content

BuddyPress.org

Changeset 12547


Ignore:
Timestamp:
01/29/2020 09:43:16 PM (4 years ago)
Author:
imath
Message:

Core: fix PHP code standards & typos in inline comments

Props passoniate

Fixes #8225
Fixes #8226
Fixes #8227
Fixes #8228
Fixes #8229

Location:
trunk/src/bp-core
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-attachment-avatar.php

    r11447 r12547  
    131131            $original_max_width = $ui_available_width;
    132132
    133             // $original_max_width has to be larger than the avatar's full width
     133            // $original_max_width has to be larger than the avatar's full width.
    134134            if ( $original_max_width < bp_core_avatar_full_width() ) {
    135135                $original_max_width = bp_core_avatar_full_width();
     
    338338
    339339    /**
    340      * Build script datas for the Uploader UI.
     340     * Build script data for the Uploader UI.
    341341     *
    342342     * @since 2.3.0
  • trunk/src/bp-core/classes/class-bp-attachment.php

    r11602 r12547  
    7878        /**
    7979         * Max file size defaults to php ini settings or, in the case of
    80          * a multisite config, the root site fileupload_maxk option
     80         * a multisite config, the root site fileupload_maxk option.
    8181         */
    8282        $this->default_args['original_max_filesize'] = (int) wp_max_upload_size();
  • trunk/src/bp-core/classes/class-bp-component.php

    r12495 r12547  
    462462        add_action( 'bp_generate_rewrite_rules', array( $this, 'generate_rewrite_rules' ), 10 );
    463463
    464         // Register BP REST Endpoints
     464        // Register BP REST Endpoints.
    465465        if ( bp_rest_in_buddypress() && bp_rest_api_is_available() ) {
    466466            add_action( 'bp_rest_api_init', array( $this, 'rest_api_init' ), 10 );
     
    579579                    $pos = $nav['position'];
    580580
    581                     // Reset not set pos to 1
     581                    // Reset not set pos to 1.
    582582                    if ( $pos % 10 === 0 ) {
    583583                        $not_set_pos = 1;
  • trunk/src/bp-core/classes/class-bp-core-nav.php

    r11797 r12547  
    217217    public function delete_nav( $slug = '', $parent_slug = '' ) {
    218218
    219         // Bail if slug is empty
     219        // Bail if slug is empty.
    220220        if ( empty( $slug ) ) {
    221221            return false;
    222222        }
    223223
    224         // We're deleting a child
     224        // We're deleting a child.
    225225        if ( ! empty( $parent_slug ) ) {
    226226
    227             // Validate the subnav
     227            // Validate the subnav.
    228228            $sub_items = $this->get_secondary( array( 'parent_slug' => $parent_slug, 'slug' => $slug ), false );
    229229
     
    238238            }
    239239
    240             // Delete the child
     240            // Delete the child.
    241241            unset( $this->nav[ $this->object_id ][ $parent_slug . '/' . $slug ] );
    242242
    243             // Return the deleted item's screen function
     243            // Return the deleted item's screen function.
    244244            return array( $sub_item->screen_function );
    245245
    246         // We're deleting a parent
     246        // We're deleting a parent.
    247247        } else {
    248             // Validate the nav
     248            // Validate the nav.
    249249            $nav_items = $this->get_primary( array( 'slug' => $slug ), false );
    250250
     
    268268                    $screen_functions[] = $sub_item->screen_function;
    269269
    270                     // Delete the child
     270                    // Delete the child.
    271271                    unset( $this->nav[ $this->object_id ][ $nav_item->slug . '/' . $sub_item->slug ] );
    272272                }
     
    293293
    294294        foreach ( $items as $item ) {
    295             // Default position
     295            // Default position.
    296296            $position = 99;
    297297
     
    300300            }
    301301
    302             // If position is already taken, move to the first next available
     302            // If position is already taken, move to the first next available.
    303303            if ( isset( $sorted[ $position ] ) ) {
    304304                $sorted_keys = array_keys( $sorted );
  • trunk/src/bp-core/classes/class-bp-invitation.php

    r12428 r12547  
    188188        do_action_ref_array( 'bp_invitation_before_save', array( &$this ) );
    189189
    190         // Update
     190        // Update.
    191191        if ( ! empty( $this->id ) ) {
    192192            $result = self::_update( $data, array( 'ID' => $this->id ), $data_format, array( '%d' ) );
    193         // Insert
     193        // Insert.
    194194        } else {
    195195            $result = self::_insert( $data, $data_format );
    196196        }
    197197
    198         // Set the invitation ID if successful
     198        // Set the invitation ID if successful.
    199199        if ( ! empty( $result ) && ! is_wp_error( $result ) ) {
    200200            global $wpdb;
     
    215215        do_action_ref_array( 'bp_invitation_after_save', array( &$this ) );
    216216
    217         // Return the result
     217        // Return the result.
    218218        return $retval;
    219219    }
     
    347347        $where            = '';
    348348
    349         // id
     349        // id.
    350350        if ( false !== $args['id'] ) {
    351351            $id_in = implode( ',', wp_parse_id_list( $args['id'] ) );
     
    353353        }
    354354
    355         // user_id
     355        // user_id.
    356356        if ( ! empty( $args['user_id'] ) ) {
    357357            $user_id_in = implode( ',', wp_parse_id_list( $args['user_id'] ) );
     
    365365        }
    366366
    367         // invitee_email
     367        // invitee_email.
    368368        if ( ! empty( $args['invitee_email'] ) ) {
    369369            if ( ! is_array( $args['invitee_email'] ) ) {
     
    382382        }
    383383
    384         // class
     384        // class.
    385385        if ( ! empty( $args['class'] ) ) {
    386386            if ( ! is_array( $args['class'] ) ) {
     
    399399        }
    400400
    401         // item_id
     401        // item_id.
    402402        if ( ! empty( $args['item_id'] ) ) {
    403403            $item_id_in = implode( ',', wp_parse_id_list( $args['item_id'] ) );
     
    405405        }
    406406
    407         // secondary_item_id
     407        // secondary_item_id.
    408408        if ( ! empty( $args['secondary_item_id'] ) ) {
    409409            $secondary_item_id_in = implode( ',', wp_parse_id_list( $args['secondary_item_id'] ) );
     
    411411        }
    412412
    413         // type
     413        // Type.
    414414        if ( ! empty( $args['type'] ) && 'all' !== $args['type'] ) {
    415415            if ( 'invite' == $args['type'] || 'request' == $args['type'] ) {
     
    432432        }
    433433
    434         // accepted
     434        // Accepted.
    435435        if ( ! empty( $args['accepted'] ) && 'all' !== $args['accepted'] ) {
    436436            if ( $args['accepted'] == 'pending' ) {
     
    441441        }
    442442
    443         // search_terms
     443        // search_terms.
    444444        if ( ! empty( $args['search_terms'] ) ) {
    445445            $search_terms_like = '%' . bp_esc_like( $args['search_terms'] ) . '%';
     
    447447        }
    448448
    449         // Custom WHERE
     449        // Custom WHERE.
    450450        if ( ! empty( $where_conditions ) ) {
    451451            $where = 'WHERE ' . implode( ' AND ', $where_conditions );
     
    468468    protected static function get_order_by_sql( $args = array() ) {
    469469
    470         // Setup local variable
     470        // Setup local variable.
    471471        $conditions = array();
    472472        $retval     = '';
    473473
    474         // Order by
     474        // Order by.
    475475        if ( ! empty( $args['order_by'] ) ) {
    476476            $order_by               = implode( ', ', (array) $args['order_by'] );
     
    478478        }
    479479
    480         // Sort order direction
     480        // Sort order direction.
    481481        if ( ! empty( $args['sort_order'] ) ) {
    482482            $sort_order               = bp_esc_sql_order( $args['sort_order'] );
     
    484484        }
    485485
    486         // Custom ORDER BY
     486        // Custom ORDER BY.
    487487        if ( ! empty( $conditions ) ) {
    488488            $retval = 'ORDER BY ' . implode( ' ', $conditions );
     
    505505        global $wpdb;
    506506
    507         // Setup local variable
     507        // Setup local variable.
    508508        $retval = '';
    509509
    510         // Custom LIMIT
     510        // Custom LIMIT.
    511511        if ( ! empty( $args['page'] ) && ! empty( $args['per_page'] ) ) {
    512512            $page     = absint( $args['page']     );
     
    565565        );
    566566
    567         // id
     567        // id.
    568568        if ( ! empty( $args['id'] ) ) {
    569569            $where_clauses['data']['id'] = absint( $args['id'] );
     
    571571        }
    572572
    573         // user_id
     573        // user_id.
    574574        if ( ! empty( $args['user_id'] ) ) {
    575575            $where_clauses['data']['user_id'] = absint( $args['user_id'] );
     
    577577        }
    578578
    579         // inviter_id
     579        // inviter_id.
    580580        if ( ! empty( $args['inviter_id'] ) ) {
    581581            $where_clauses['data']['inviter_id'] = absint( $args['inviter_id'] );
     
    583583        }
    584584
    585         // invitee_email
     585        // invitee_email.
    586586        if ( ! empty( $args['invitee_email'] ) ) {
    587587            $where_clauses['data']['invitee_email'] = $args['invitee_email'];
     
    589589        }
    590590
    591         // class
     591        // class.
    592592        if ( ! empty( $args['class'] ) ) {
    593593            $where_clauses['data']['class'] = $args['class'];
     
    595595        }
    596596
    597         // item_id
     597        // item_id.
    598598        if ( ! empty( $args['item_id'] ) ) {
    599599            $where_clauses['data']['item_id'] = absint( $args['item_id'] );
     
    601601        }
    602602
    603         // secondary_item_id
     603        // secondary_item_id.
    604604        if ( ! empty( $args['secondary_item_id'] ) ) {
    605605            $where_clauses['data']['secondary_item_id'] = absint( $args['secondary_item_id'] );
     
    607607        }
    608608
    609         // type
     609        // type.
    610610        if ( ! empty( $args['type'] ) && 'all' !== $args['type'] ) {
    611611            if ( 'invite' == $args['type'] || 'request' == $args['type'] ) {
     
    630630        }
    631631
    632         // accepted
     632        // accepted.
    633633        if ( ! empty( $args['accepted'] ) && 'all' !== $args['accepted'] ) {
    634634            if ( $args['accepted'] == 'pending' ) {
     
    700700     * }
    701701     *
    702      * @return array BP_Invitation objects | IDs of found invit.
     702     * @return array BP_Invitation objects | IDs of found invite.
    703703     */
    704704    public static function get( $args = array() ) {
     
    706706        $invites_table_name = BP_Invitation_Manager::get_table_name();
    707707
    708         // Parse the arguments
     708        // Parse the arguments.
    709709        $r  = bp_parse_args( $args, array(
    710710            'id'                => false,
     
    745745        }
    746746
    747         // WHERE
     747        // WHERE.
    748748        $sql['where'] = self::get_where_sql( array(
    749749            'id'                => $r['id'],
     
    760760        ) );
    761761
    762         // ORDER BY
     762        // ORDER BY.
    763763        $sql['orderby'] = self::get_order_by_sql( array(
    764764            'order_by'   => $r['order_by'],
     
    766766        ) );
    767767
    768         // LIMIT %d, %d
     768        // LIMIT %d, %d.
    769769        $sql['pagination'] = self::get_paged_sql( array(
    770770            'page'     => $r['page'],
     
    977977        }
    978978
    979         // Values to be updated
     979        // Values to be updated.
    980980        $update_args = array(
    981981            'invite_sent' => 'sent',
    982982        );
    983983
    984         // WHERE clauses
     984        // WHERE clauses.
    985985        $where_args = array(
    986986            'id' => $id,
     
    10001000    public static function mark_sent_by_data( $args ) {
    10011001
    1002         // Values to be updated
     1002        // Values to be updated.
    10031003        $update_args = array(
    10041004            'invite_sent' => 'sent',
     
    10231023        }
    10241024
    1025         // Values to be updated
     1025        // Values to be updated.
    10261026        $update_args = array(
    10271027            'accepted' => 'accepted',
    10281028        );
    10291029
    1030         // WHERE clauses
     1030        // WHERE clauses.
    10311031        $where_args = array(
    10321032            'id' => $id,
     
    10461046    public static function mark_accepted_by_data( $args ) {
    10471047
    1048         // Values to be updated
     1048        // Values to be updated.
    10491049        $update_args = array(
    10501050            'accepted' => 'accepted',
  • trunk/src/bp-core/classes/class-bp-phpmailer.php

    r11536 r12547  
    77 */
    88
    9 // Exit if accessed directly
     9// Exit if accessed directly.
    1010defined( 'ABSPATH' ) || exit;
    1111
  • trunk/src/bp-core/classes/class-bp-recursive-query.php

    r10417 r12547  
    8585                $relation = $query['relation'];
    8686            } elseif ( is_array( $clause ) ) {
    87                 // This is a first-order clause
     87                // This is a first-order clause.
    8888                if ( $this->is_first_order_clause( $clause ) ) {
    8989                    $clause_sql = $this->get_sql_for_clause( $clause, $query );
     
    9999
    100100                    $sql_chunks['join'] = array_merge( $sql_chunks['join'], $clause_sql['join'] );
    101                 // This is a subquery
     101                // This is a subquery.
    102102                } else {
    103103                    $clause_sql = $this->get_sql_for_query( $clause, $depth + 1 );
     
    109109        }
    110110
    111         // Filter empties
     111        // Filter empties.
    112112        $sql_chunks['join']  = array_filter( $sql_chunks['join'] );
    113113        $sql_chunks['where'] = array_filter( $sql_chunks['where'] );
  • trunk/src/bp-core/classes/class-bp-user-query.php

    r12329 r12547  
    184184            do_action_ref_array( 'bp_pre_user_query_construct', array( &$this ) );
    185185
    186             // Get user ids
     186            // Get user ids.
    187187            // If the user_ids param is present, we skip the query.
    188188            if ( false !== $this->query_vars['user_ids'] ) {
  • trunk/src/bp-core/deprecated/1.2.php

    r11447 r12547  
    2323
    2424    $defaults = array(
    25         'max' => false, // Maximum number of results to return
    26         'page' => 1, // page 1 without a per_page will result in no pagination.
    27         'per_page' => false, // results per page
    28         'sort' => 'DESC', // sort ASC or DESC
    29         'display_comments' => false, // false for no comments. 'stream' for within stream display, 'threaded' for below each activity item
     25        'max'              => false,  // Maximum number of results to return.
     26        'page'             => 1,      // Page 1 without a per_page will result in no pagination.
     27        'per_page'         => false,  // Results per page.
     28        'sort'             => 'DESC', // Sort ASC or DESC.
     29        'display_comments' => false,  // False for no comments. 'stream' for within stream display, 'threaded' for below each activity item.
    3030
    31         'search_terms' => false, // Pass search terms as a string
    32         'show_hidden' => false, // Show activity items that are hidden site-wide?
     31        'search_terms'     => false,  // Pass search terms as a string.
     32        'show_hidden'      => false, // Show activity items that are hidden site-wide?
    3333
    3434        /**
    3535         * Pass filters as an array:
    3636         * array(
    37          *  'user_id' => false, // user_id to filter on
    38          *  'object' => false, // object to filter on e.g. groups, profile, status, friends
    39          *  'action' => false, // action to filter on e.g. new_wire_post, new_forum_post, profile_updated
    40          *  'primary_id' => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
    41          *  'secondary_id' => false, // secondary object ID to filter on e.g. a post_id
     37         *  'user_id'      => false,  // user_id to filter on.
     38         *  'object'       => false,  // Object to filter on e.g. groups, profile, status, friends.
     39         *  'action'       => false,  // Action to filter on e.g. new_wire_post, new_forum_post, profile_updated.
     40         *  'primary_id'   => false,  // Object ID to filter on e.g. a group_id or forum_id or blog_id etc.
     41         *  'secondary_id' => false,  // Secondary object ID to filter on e.g. a post_id.
    4242         * );
    4343         */
  • trunk/src/bp-core/deprecated/1.5.php

    r11763 r12547  
    88 */
    99
    10 // Exit if accessed directly
     10// Exit if accessed directly.
    1111defined( 'ABSPATH' ) || exit;
    1212
     
    7575/**
    7676 * In BuddyPress 1.1 - 1.2.x, this function provided a better version of add_menu_page()
    77  * that allowed positioning of menus. Deprecated in 1.5 in favour of a WP core function.
     77 * that allowed positioning of menus. Deprecated in 1.5 in favor of a WP core function.
    7878 *
    7979 * @deprecated 1.5.0
     
    342342            continue;
    343343
    344         // Now email the user with the contents of the message (if they have enabled email notifications)
     344        // Now email the user with the contents of the message (if they have enabled email notifications).
    345345        if ( 'no' != bp_get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) {
    346346            $poster_name = bp_core_get_user_displayname( $poster_user_id );
     
    353353            $content = bp_groups_filter_kses( stripslashes( $content ) );
    354354
    355             // Set up and send the message
     355            // Set up and send the message.
    356356            $ud = bp_core_get_core_userdata( $receiver_user_id );
    357357            $to = $ud->user_email;
  • trunk/src/bp-core/deprecated/1.6.php

    r11773 r12547  
    88 */
    99
    10 // Exit if accessed directly
     10// Exit if accessed directly.
    1111defined( 'ABSPATH' ) || exit;
    1212
     
    225225
    226226        // This is a list of the BP wp_ajax_ hook suffixes whose associated functions did
    227         // not die properly before BP 1.6
     227        // not die properly before BP 1.6.
    228228        $actions = array(
    229             // Directory template loaders
     229            // Directory template loaders.
    230230            'members_filter',
    231231            'groups_filter',
     
    234234            'messages_filter',
    235235
    236             // Activity
     236            // Activity.
    237237            'activity_widget_filter',
    238238            'activity_get_older_updates',
     
    246246            'activity_mark_unfav',
    247247
    248             // Groups
     248            // Groups.
    249249            'groups_invite_user',
    250250            'joinleave_group',
    251251
    252             // Members
     252            // Members.
    253253            'addremove_friend',
    254254            'accept_friendship',
    255255            'reject_friendship',
    256256
    257             // Messages
     257            // Messages.
    258258            'messages_close_notice',
    259259            'messages_send_reply',
     
    264264        );
    265265
    266         // For each of the problematic hooks, exit at the very end of execution
     266        // For each of the problematic hooks, exit at the very end of execution.
    267267        foreach( $actions as $action ) {
    268268            add_action( 'wp_ajax_' . $action, function() {
  • trunk/src/bp-core/deprecated/1.7.php

    r11447 r12547  
    88 */
    99
    10 // Exit if accessed directly
     10// Exit if accessed directly.
    1111defined( 'ABSPATH' ) || exit;
    1212
     
    154154    }
    155155
    156     // Update and remove the message threads table if it exists
     156    // Update and remove the message threads table if it exists.
    157157    if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$bp_prefix}bp_messages_threads%'" ) ) {
    158158        if ( BP_Messages_Thread::update_tables() ) {
  • trunk/src/bp-core/deprecated/1.9.php

    r11447 r12547  
    1010 */
    1111
    12 // Exit if accessed directly
     12// Exit if accessed directly.
    1313defined( 'ABSPATH' ) || exit;
    1414
     
    3131function bp_core_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = 0, $date_notified = false, $is_new = 1 ) {
    3232
    33     // Bail if notifications is not active
    34     if ( ! bp_is_active( 'notifications' ) ) {
    35         return false;
    36     }
    37 
    38     // Trigger the deprecated function notice
     33    // Bail if notifications is not active.
     34    if ( ! bp_is_active( 'notifications' ) ) {
     35        return false;
     36    }
     37
     38    // Trigger the deprecated function notice.
    3939    _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_add_notification()' );
    4040
    41     // Notifications must always have a time
     41    // Notifications must always have a time.
    4242    if ( false === $date_notified ) {
    4343        $date_notified = bp_core_current_time();
    4444    }
    4545
    46     // Add the notification
     46    // Add the notification.
    4747    return bp_notifications_add_notification( array(
    4848        'item_id'           => $item_id,
     
    6969function bp_core_delete_notification( $id ) {
    7070
    71     // Bail if notifications is not active
    72     if ( ! bp_is_active( 'notifications' ) ) {
    73         return false;
    74     }
    75 
    76     // Trigger the deprecated function notice
     71    // Bail if notifications is not active.
     72    if ( ! bp_is_active( 'notifications' ) ) {
     73        return false;
     74    }
     75
     76    // Trigger the deprecated function notice.
    7777    _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notification()' );
    7878
     
    9292function bp_core_get_notification( $id ) {
    9393
    94     // Bail if notifications is not active
    95     if ( ! bp_is_active( 'notifications' ) ) {
    96         return false;
    97     }
    98 
    99     // Trigger the deprecated function notice
     94    // Bail if notifications is not active.
     95    if ( ! bp_is_active( 'notifications' ) ) {
     96        return false;
     97    }
     98
     99    // Trigger the deprecated function notice.
    100100    _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_get_notification()' );
    101101
     
    116116function bp_core_get_notifications_for_user( $user_id, $format = 'string' ) {
    117117
    118     // Bail if notifications is not active
    119     if ( ! bp_is_active( 'notifications' ) ) {
    120         return false;
    121     }
    122 
    123     // Trigger the deprecated function notice
     118    // Bail if notifications is not active.
     119    if ( ! bp_is_active( 'notifications' ) ) {
     120        return false;
     121    }
     122
     123    // Trigger the deprecated function notice.
    124124    _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_get_notifications_for_user()' );
    125125
     
    146146function bp_core_delete_notifications_by_type( $user_id, $component_name, $component_action ) {
    147147
    148     // Bail if notifications is not active
    149     if ( ! bp_is_active( 'notifications' ) ) {
    150         return false;
    151     }
    152 
    153     // Trigger the deprecated function notice
     148    // Bail if notifications is not active.
     149    if ( ! bp_is_active( 'notifications' ) ) {
     150        return false;
     151    }
     152
     153    // Trigger the deprecated function notice.
    154154    _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_by_type()' );
    155155
     
    175175function bp_core_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {
    176176
    177     // Bail if notifications is not active
    178     if ( ! bp_is_active( 'notifications' ) ) {
    179         return false;
    180     }
    181 
    182     // Trigger the deprecated function notice
     177    // Bail if notifications is not active.
     178    if ( ! bp_is_active( 'notifications' ) ) {
     179        return false;
     180    }
     181
     182    // Trigger the deprecated function notice.
    183183    _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_by_item_id()' );
    184184
     
    201201function bp_core_delete_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false ) {
    202202
    203     // Bail if notifications is not active
    204     if ( ! bp_is_active( 'notifications' ) ) {
    205         return false;
    206     }
    207 
    208     // Trigger the deprecated function notice
     203    // Bail if notifications is not active.
     204    if ( ! bp_is_active( 'notifications' ) ) {
     205        return false;
     206    }
     207
     208    // Trigger the deprecated function notice.
    209209    _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_all_notifications_by_type()' );
    210210
     
    215215 * Delete all notifications for a user.
    216216 *
    217  * Used when clearing out all notifications for a user, when deleted or spammed
     217 * Used when clearing out all notifications for a user, when deleted or spammed.
    218218 *
    219219 * @deprecated Deprecated since BuddyPress 1.9.0. Use
     
    228228function bp_core_delete_notifications_from_user( $user_id, $component_name, $component_action ) {
    229229
    230     // Bail if notifications is not active
    231     if ( ! bp_is_active( 'notifications' ) ) {
    232         return false;
    233     }
    234 
    235     // Trigger the deprecated function notice
     230    // Bail if notifications is not active.
     231    if ( ! bp_is_active( 'notifications' ) ) {
     232        return false;
     233    }
     234
     235    // Trigger the deprecated function notice.
    236236    _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_from_user()' );
    237237
     
    256256function bp_core_check_notification_access( $user_id, $notification_id ) {
    257257
    258     // Bail if notifications is not active
    259     if ( ! bp_is_active( 'notifications' ) ) {
    260         return false;
    261     }
    262 
    263     // Trigger the deprecated function notice
     258    // Bail if notifications is not active.
     259    if ( ! bp_is_active( 'notifications' ) ) {
     260        return false;
     261    }
     262
     263    // Trigger the deprecated function notice.
    264264    _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_check_notification_access()' );
    265265
  • trunk/src/bp-core/deprecated/2.0.php

    r10108 r12547  
    88 */
    99
    10 // Exit if accessed directly
     10// Exit if accessed directly.
    1111defined( 'ABSPATH' ) || exit;
    1212
  • trunk/src/bp-core/deprecated/2.1.php

    r12401 r12547  
    88 */
    99
    10 // Exit if accessed directly
     10// Exit if accessed directly.
    1111defined( 'ABSPATH' ) || exit;
    1212
     
    190190    echo '<li class="bp-login no-arrow"><a href="' . wp_login_url() . '">' . __( 'Log In', 'buddypress' ) . '</a></li>';
    191191
    192     // Show "Sign Up" link if user registrations are allowed
     192    // Show "Sign Up" link if user registrations are allowed.
    193193    if ( bp_get_signup_allowed() ) {
    194194        echo '<li class="bp-signup no-arrow"><a href="' . bp_get_signup_page() . '">' . __( 'Sign Up', 'buddypress' ) . '</a></li>';
     
    214214    echo '<ul>';
    215215
    216     // Loop through each navigation item
     216    // Loop through each navigation item.
    217217    $counter = 0;
    218218    foreach( (array) $bp->bp_nav as $nav_item ) {
     
    327327    $min = bp_core_get_minified_asset_suffix();
    328328
    329     if ( file_exists( get_stylesheet_directory() . '/_inc/css/adminbar.css' ) ) { // Backwards compatibility
     329    if ( file_exists( get_stylesheet_directory() . '/_inc/css/adminbar.css' ) ) { // Backwards compatibility.
    330330        $stylesheet = get_stylesheet_directory_uri() . '/_inc/css/adminbar.css';
    331331    } else {
     
    356356    }
    357357
    358     // Only group admins and site admins can see this menu
     358    // Only group admins and site admins can see this menu.
    359359    if ( !current_user_can( 'edit_users' ) && !bp_current_user_can( 'bp_moderate' ) && !bp_is_item_admin() ) {
    360360        return false;
     
    407407function bp_adminbar_notifications_menu() {
    408408
    409     // Bail if notifications is not active
     409    // Bail if notifications is not active.
    410410    if ( ! bp_is_active( 'notifications' ) ) {
    411411        return false;
     
    424424    global $wpdb;
    425425
    426     // Only for multisite
     426    // Only for multisite.
    427427    if ( ! is_multisite() ) {
    428428        return false;
    429429    }
    430430
    431     // Hide on root blog
     431    // Hide on root blog.
    432432    if ( bp_is_root_blog( $wpdb->blogid ) || ! bp_is_active( 'blogs' ) ) {
    433433        return false;
     
    438438
    439439    if ( !empty( $authors ) ) {
    440         // This is a blog, render a menu with links to all authors
     440        // This is a blog, render a menu with links to all authors.
    441441        echo '<li id="bp-adminbar-authors-menu"><a href="/">';
    442442        _e('Blog Authors', 'buddypress');
     
    479479function bp_members_adminbar_admin_menu() {
    480480
    481     // Only show if viewing a user
     481    // Only show if viewing a user.
    482482    if ( ! bp_displayed_user_id() ) {
    483483        return false;
    484484    }
    485485
    486     // Don't show this menu to non site admins or if you're viewing your own profile
     486    // Don't show this menu to non site admins or if you're viewing your own profile.
    487487    if ( !current_user_can( 'edit_users' ) || bp_is_my_profile() ) {
    488488        return false;
  • trunk/src/bp-core/deprecated/2.2.php

    r10108 r12547  
    88 */
    99
    10 // Exit if accessed directly
     10// Exit if accessed directly.
    1111defined( 'ABSPATH' ) || exit;
    1212
     
    2323 * @deprecated 2.2.0
    2424 *
    25  * @todo Support untrashing better
     25 * @todo Support untrashing better.
    2626 *
    2727 * @param string $new_status New status for the post.
     
    9797
    9898/**
    99  * Add 'bp' to global group of network wide cachable objects.
     99 * Add 'bp' to global group of network wide catchable objects.
    100100 *
    101101 * @since 1.1.0
  • trunk/src/bp-core/deprecated/2.5.php

    r11447 r12547  
    8080
    8181        $value          = array_shift( $original_value );
    82         $recipient_name = $value->get_name();     // Value - name
    83         $value          = $value->get_address();  // Key   - email
     82        $recipient_name = $value->get_name();     // Value - name.
     83        $value          = $value->get_address();  // Key   - email.
    8484    }
    8585
Note: See TracChangeset for help on using the changeset viewer.