Skip to:
Content

BuddyPress.org

Changeset 11856


Ignore:
Timestamp:
02/12/2018 08:52:21 PM (6 years ago)
Author:
djpaul
Message:

Templates, Nouveau: function argument indentation tweaks, and minor code standards.

Location:
trunk/src/bp-templates/bp-nouveau
Files:
41 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/buddypress/activity/activity-loop.php

    r11825 r11856  
    1919
    2020        <li class="load-more">
    21             <a href="<?php bp_activity_load_more_link() ?>"><?php _e( 'Load More', 'buddypress' ); ?></a>
     21            <a href="<?php bp_activity_load_more_link(); ?>"><?php _e( 'Load More', 'buddypress' ); ?></a>
    2222        </li>
    2323
  • trunk/src/bp-templates/bp-nouveau/buddypress/activity/comment-form.php

    r11686 r11856  
    66 */
    77
    8 if ( ! bp_nouveau_current_user_can( 'comment_activity' ) || ! bp_activity_can_comment() ) return; ?>
     8if ( ! bp_nouveau_current_user_can( 'comment_activity' ) || ! bp_activity_can_comment() ) {
     9    return;
     10} ?>
    911
    1012<form action="<?php bp_activity_comment_form_action(); ?>" method="post" id="ac-form-<?php bp_activity_id(); ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display(); ?>>
  • trunk/src/bp-templates/bp-nouveau/buddypress/activity/comment.php

    r11855 r11856  
    1212    <div class="acomment-avatar item-avatar">
    1313        <a href="<?php bp_activity_comment_user_link(); ?>">
    14             <?php bp_activity_avatar( array( 'type' => 'thumb', 'user_id' => bp_get_activity_comment_user_id() ) ); ?>
     14            <?php
     15            bp_activity_avatar(
     16                array(
     17                    'type'    => 'thumb',
     18                    'user_id' => bp_get_activity_comment_user_id(),
     19                )
     20            );
     21            ?>
    1522        </a>
    1623    </div>
  • trunk/src/bp-templates/bp-nouveau/buddypress/activity/entry.php

    r11686 r11856  
    6363</li>
    6464
    65 <?php bp_nouveau_activity_hook( 'after', 'entry' );
     65<?php
     66bp_nouveau_activity_hook( 'after', 'entry' );
  • trunk/src/bp-templates/bp-nouveau/buddypress/activity/post-form.php

    r11686 r11856  
    1111 * checks capability and enqueue needed scripts.
    1212 */
    13 bp_nouveau_before_activity_post_form(); ?>
     13bp_nouveau_before_activity_post_form();
     14?>
    1415
    1516<div id="bp-nouveau-activity-form" class="activity-update-form"></div>
  • trunk/src/bp-templates/bp-nouveau/buddypress/activity/widget.php

    r11855 r11856  
    2323                            <cite>
    2424                                <a href="<?php bp_activity_user_link(); ?>">
    25                                     <?php bp_activity_avatar( array(
    26                                         'type'   => 'thumb',
    27                                         'width'  => '40px',
    28                                         'height' => '40px',
    29                                     ) ); ?>
     25                                    <?php
     26                                    bp_activity_avatar(
     27                                        array(
     28                                            'type'   => 'thumb',
     29                                            'width'  => '40px',
     30                                            'height' => '40px',
     31                                        )
     32                                    );
     33                                    ?>
    3034                                </a>
    3135                            </cite>
  • trunk/src/bp-templates/bp-nouveau/buddypress/assets/emails/single-bp-email.php

    r11786 r11856  
    187187                        <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
    188188                            <tr>
    189                                 <td style="padding: 20px; font-family: sans-serif; mso-height-rule: exactly; line-height: <?php echo esc_attr( floor( $settings['body_text_size'] * 1.618 ) . 'px' ) ?>; color: <?php echo esc_attr( $settings['body_text_color'] ); ?>; font-size: <?php echo esc_attr( $settings['body_text_size'] . 'px' ); ?>" class="body_text_color body_text_size">
     189                                <td style="padding: 20px; font-family: sans-serif; mso-height-rule: exactly; line-height: <?php echo esc_attr( floor( $settings['body_text_size'] * 1.618 ) . 'px' ); ?>; color: <?php echo esc_attr( $settings['body_text_color'] ); ?>; font-size: <?php echo esc_attr( $settings['body_text_size'] . 'px' ); ?>" class="body_text_color body_text_size">
    190190                                    <span style="font-weight: bold; font-size: <?php echo esc_attr( floor( $settings['body_text_size'] * 1.35 ) . 'px' ); ?>" class="welcome"><?php bp_email_the_salutation( $settings ); ?></span>
    191191                                    <hr color="<?php echo esc_attr( $settings['email_bg'] ); ?>"><br>
     
    205205            <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="<?php echo esc_attr( $settings['direction'] ); ?>" width="100%" style="max-width: 600px; border-radius: 5px;" bgcolor="<?php echo esc_attr( $settings['footer_bg'] ); ?>" class="footer_bg">
    206206                <tr>
    207                     <td style="padding: 20px; width: 100%; font-size: <?php echo esc_attr( $settings['footer_text_size'] . 'px' ); ?>; font-family: sans-serif; mso-height-rule: exactly; line-height: <?php echo esc_attr( floor( $settings['footer_text_size'] * 1.618 ) . 'px' ) ?>; text-align: <?php echo esc_attr( $settings['direction'] ); ?>; color: <?php echo esc_attr( $settings['footer_text_color'] ); ?>;" class="footer_text_color footer_text_size">
     207                    <td style="padding: 20px; width: 100%; font-size: <?php echo esc_attr( $settings['footer_text_size'] . 'px' ); ?>; font-family: sans-serif; mso-height-rule: exactly; line-height: <?php echo esc_attr( floor( $settings['footer_text_size'] * 1.618 ) . 'px' ); ?>; text-align: <?php echo esc_attr( $settings['direction'] ); ?>; color: <?php echo esc_attr( $settings['footer_text_color'] ); ?>;" class="footer_text_color footer_text_size">
    208208                        <?php
    209209                        /**
     
    240240    </center>
    241241</td></tr></table>
    242 <?php if ( function_exists( 'is_customize_preview' ) && is_customize_preview() ) wp_footer(); ?>
     242<?php
     243if ( function_exists( 'is_customize_preview' ) && is_customize_preview() ) {
     244    wp_footer();
     245}
     246?>
    243247</body>
    244248</html>
  • trunk/src/bp-templates/bp-nouveau/buddypress/assets/embeds/footer.php

    r11686 r11856  
    11            <div class="wp-embed-footer">
    2                 <?php the_embed_site_title() ?>
     2                <?php the_embed_site_title(); ?>
    33
    44                <div class="wp-embed-meta">
    55                    <?php
    66                    /** This action is documented in wp-includes/theme-compat/embed-content.php */
    7                     do_action( 'embed_content_meta' ); ?>
     7                    do_action( 'embed_content_meta' );
     8                    ?>
    89                </div>
    910            </div>
  • trunk/src/bp-templates/bp-nouveau/buddypress/common/js-templates/messages/index.php

    r11855 r11856  
    9898        <div class="bulk-actions select-wrap">
    9999            <label for="user-messages-bulk-actions" class="bp-screen-reader-text">
    100                 <?php esc_html_e( 'Select bulk action', 'buddypress' )  ?>
     100                <?php esc_html_e( 'Select bulk action', 'buddypress' ); ?>
    101101            </label>
    102102            <select id="user-messages-bulk-actions">
  • trunk/src/bp-templates/bp-nouveau/buddypress/groups/create-invites.php

    r11807 r11856  
    1111<?php bp_nouveau_user_feedback( 'create-invite-friends' ); ?>
    1212
    13 <?php bp_new_group_invite_friend_list(); ?>
     13<?php
     14bp_new_group_invite_friend_list();
  • trunk/src/bp-templates/bp-nouveau/buddypress/groups/create.php

    r11855 r11856  
    3636    <?php bp_nouveau_groups_create_hook( 'after', 'content_template' ); ?>
    3737
    38 <?php bp_nouveau_groups_create_hook( 'after', 'page' );
     38<?php
     39bp_nouveau_groups_create_hook( 'after', 'page' );
  • trunk/src/bp-templates/bp-nouveau/buddypress/groups/single/activity.php

    r11686 r11856  
    3535</div><!-- .activity -->
    3636
    37 <?php bp_nouveau_group_hook( 'after', 'activity_content' );
     37<?php
     38bp_nouveau_group_hook( 'after', 'activity_content' );
  • trunk/src/bp-templates/bp-nouveau/buddypress/groups/single/admin/group-avatar.php

    r11855 r11856  
    4949        <p><?php _e( "If you'd like to remove the existing group profile photo but not upload a new one, please use the delete group profile photo button.", 'buddypress' ); ?></p>
    5050
    51         <?php bp_button( array( 'id' => 'delete_group_avatar', 'component' => 'groups', 'wrapper_id' => 'delete-group-avatar-button', 'link_class' => 'edit', 'link_href' => bp_get_group_avatar_delete_link(), 'link_title' => __( 'Delete Group Profile Photo', 'buddypress' ), 'link_text' => __( 'Delete Group Profile Photo', 'buddypress' ) ) ); ?>
    52 
    53     <?php endif; ?>
     51        <?php
     52        bp_button(
     53            array(
     54                'id'         => 'delete_group_avatar',
     55                'component'  => 'groups',
     56                'wrapper_id' => 'delete-group-avatar-button',
     57                'link_class' => 'edit',
     58                'link_href'  => bp_get_group_avatar_delete_link(),
     59                'link_title' => __( 'Delete Group Profile Photo', 'buddypress' ),
     60                'link_text'  => __( 'Delete Group Profile Photo', 'buddypress' ),
     61            )
     62        );
     63        ?>
    5464
    5565    <?php
     66    endif;
     67
    5668    /**
    5769     * Load the Avatar UI templates
     
    5971     * @since 2.3.0
    6072     */
    61     bp_avatar_get_templates(); ?>
     73    bp_avatar_get_templates();
    6274
    63     <?php if ( ! bp_is_group_create() ) wp_nonce_field( 'bp_avatar_upload' ); ?>
     75    if ( ! bp_is_group_create() ) {
     76        wp_nonce_field( 'bp_avatar_upload' );
     77    }
     78    ?>
    6479
    65 <?php endif;
     80<?php
     81endif;
    6682
    67 if ( 'crop-image' === bp_get_avatar_admin_step() ) : ?>
     83if ( 'crop-image' === bp_get_avatar_admin_step() ) :
     84?>
    6885
    6986    <h4><?php _e( 'Crop Group Profile Photo', 'buddypress' ); ?></h4>
  • trunk/src/bp-templates/bp-nouveau/buddypress/groups/single/admin/group-cover-image.php

    r11855 r11856  
    2323<p><?php _e( 'The Cover Image will be used to customize the header of your group.', 'buddypress' ); ?></p>
    2424
    25 <?php bp_attachments_get_template_part( 'cover-images/index' );
     25<?php
     26bp_attachments_get_template_part( 'cover-images/index' );
  • trunk/src/bp-templates/bp-nouveau/buddypress/groups/single/default-front.php

    r11855 r11856  
    1616
    1717                <p>
    18                 <?php printf(
    19                     esc_html__( 'You can set your preferences for the %s or add %s to it.', 'buddypress' ),
     18                <?php
     19                printf(
     20                    esc_html__( 'You can set your preferences for the %1$s or add %2$s to it.', 'buddypress' ),
    2021                    bp_nouveau_groups_get_customizer_option_link(),
    2122                    bp_nouveau_groups_get_customizer_widgets_link()
    22                 ); ?>
     23                );
     24                ?>
    2325                </p>
    2426
  • trunk/src/bp-templates/bp-nouveau/buddypress/members/members-loop.php

    r11855 r11856  
    4343                        <?php endif; ?>
    4444
    45                         <?php bp_nouveau_members_loop_buttons( array( 'container' => 'ul', 'button_element' => 'button' ) ); ?>
     45                        <?php
     46                        bp_nouveau_members_loop_buttons(
     47                            array(
     48                                'container'      => 'ul',
     49                                'button_element' => 'button',
     50                            )
     51                        );
     52?>
    4653
    4754                    </div>
  • trunk/src/bp-templates/bp-nouveau/buddypress/members/single/blogs.php

    r11855 r11856  
    3636
    3737    // Any other
    38     default :
     38    default:
    3939        bp_get_template_part( 'members/single/plugins' );
    4040        break;
  • trunk/src/bp-templates/bp-nouveau/buddypress/members/single/cover-image-header.php

    r11855 r11856  
    2525            <?php endif; ?>
    2626
    27             <?php bp_nouveau_member_header_buttons( array( 'container' => 'ul', 'button_element' => 'button', 'container_classes' => array( 'member-header-actions' ) ) ); ?>
     27            <?php
     28            bp_nouveau_member_header_buttons(
     29                array(
     30                    'container'         => 'ul',
     31                    'button_element'    => 'button',
     32                    'container_classes' => array( 'member-header-actions' ),
     33                )
     34            );
     35?>
    2836
    2937            <?php bp_nouveau_member_hook( 'before', 'header_meta' ); ?>
  • trunk/src/bp-templates/bp-nouveau/buddypress/members/single/default-front.php

    r11855 r11856  
    3535            <?php endif; ?>
    3636
    37             <?php if ( bp_is_my_profile() ) :
     37            <?php
     38            if ( bp_is_my_profile() ) :
    3839
    3940                bp_nouveau_member_description_edit_link();
  • trunk/src/bp-templates/bp-nouveau/buddypress/members/single/groups.php

    r11855 r11856  
    4141        </div>
    4242
    43         <?php bp_nouveau_member_hook( 'after', 'groups_content' );
     43        <?php
     44        bp_nouveau_member_hook( 'after', 'groups_content' );
    4445        break;
    4546
    4647    // Group Invitations
    47     case 'invites' :
     48    case 'invites':
    4849        bp_get_template_part( 'members/single/groups/invites' );
    4950        break;
    5051
    5152    // Any other
    52     default :
     53    default:
    5354        bp_get_template_part( 'members/single/plugins' );
    5455        break;
  • trunk/src/bp-templates/bp-nouveau/buddypress/members/single/groups/invites.php

    r11855 r11856  
    3636                        <?php bp_nouveau_group_hook( '', 'invites_item' ); ?>
    3737
    38                         <?php bp_nouveau_groups_invite_buttons( array( 'container' => 'ul', 'button_element' => 'button' ) ); ?>
     38                        <?php
     39                        bp_nouveau_groups_invite_buttons(
     40                            array(
     41                                'container'      => 'ul',
     42                                'button_element' => 'button',
     43                            )
     44                        );
     45                        ?>
    3946                    </div>
    4047
  • trunk/src/bp-templates/bp-nouveau/buddypress/members/single/notifications.php

    r11855 r11856  
    3434
    3535    // Any other actions.
    36     default :
     36    default:
    3737        bp_get_template_part( 'members/single/plugins' );
    3838        break;
  • trunk/src/bp-templates/bp-nouveau/buddypress/members/single/profile.php

    r11855 r11856  
    2323
    2424    // Edit
    25     case 'edit'   :
     25    case 'edit':
    2626        bp_get_template_part( 'members/single/profile/edit' );
    2727        break;
    2828
    2929    // Change Avatar
    30     case 'change-avatar' :
     30    case 'change-avatar':
    3131        bp_get_template_part( 'members/single/profile/change-avatar' );
    3232        break;
    3333
    3434    // Change Cover Image
    35     case 'change-cover-image' :
     35    case 'change-cover-image':
    3636        bp_get_template_part( 'members/single/profile/change-cover-image' );
    3737        break;
    3838
    3939    // Compose
    40     case 'public' :
    41 
     40    case 'public':
    4241        // Display XProfile
    43         if ( bp_is_active( 'xprofile' ) )
     42        if ( bp_is_active( 'xprofile' ) ) {
    4443            bp_get_template_part( 'members/single/profile/profile-loop' );
    4544
    4645        // Display WordPress profile (fallback)
    47         else
     46        } else {
    4847            bp_get_template_part( 'members/single/profile/profile-wp' );
     48        }
    4949
    5050        break;
    5151
    5252    // Any other
    53     default :
     53    default:
    5454        bp_get_template_part( 'members/single/plugins' );
    5555        break;
  • trunk/src/bp-templates/bp-nouveau/includes/activity/ajax.php

    r11855 r11856  
    1313 * @todo this funciton CANNOT be run when the file is included (like it is now). Move to a function and hook to something.
    1414 */
    15 bp_nouveau_register_ajax_actions( array(
    16     array( 'activity_filter'                 => array( 'function' => 'bp_nouveau_ajax_object_template_loader',      'nopriv' => true ) ),
    17     array( 'get_single_activity_content'     => array( 'function' => 'bp_nouveau_ajax_get_single_activity_content', 'nopriv' => true ) ),
    18     array( 'activity_mark_fav'               => array( 'function' => 'bp_nouveau_ajax_mark_activity_favorite',      'nopriv' => false ) ),
    19     array( 'activity_mark_unfav'             => array( 'function' => 'bp_nouveau_ajax_unmark_activity_favorite',    'nopriv' => false ) ),
    20     array( 'activity_clear_new_mentions'     => array( 'function' => 'bp_nouveau_ajax_clear_new_mentions',          'nopriv' => false ) ),
    21     array( 'delete_activity'                 => array( 'function' => 'bp_nouveau_ajax_delete_activity',             'nopriv' => false ) ),
    22     array( 'new_activity_comment'            => array( 'function' => 'bp_nouveau_ajax_new_activity_comment',        'nopriv' => false ) ),
    23     array( 'bp_nouveau_get_activity_objects' => array( 'function' => 'bp_nouveau_ajax_get_activity_objects',        'nopriv' => false ) ),
    24     array( 'post_update'                     => array( 'function' => 'bp_nouveau_ajax_post_update',                 'nopriv' => false ) ),
    25     array( 'bp_spam_activity'                => array( 'function' => 'bp_nouveau_ajax_spam_activity',               'nopriv' => false ) ),
    26 ) );
     15bp_nouveau_register_ajax_actions(
     16    array(
     17        array(
     18            'activity_filter' => array(
     19                'function' => 'bp_nouveau_ajax_object_template_loader',
     20                'nopriv'   => true,
     21            ),
     22        ),
     23        array(
     24            'get_single_activity_content' => array(
     25                'function' => 'bp_nouveau_ajax_get_single_activity_content',
     26                'nopriv'   => true,
     27            ),
     28        ),
     29        array(
     30            'activity_mark_fav' => array(
     31                'function' => 'bp_nouveau_ajax_mark_activity_favorite',
     32                'nopriv'   => false,
     33            ),
     34        ),
     35        array(
     36            'activity_mark_unfav' => array(
     37                'function' => 'bp_nouveau_ajax_unmark_activity_favorite',
     38                'nopriv'   => false,
     39            ),
     40        ),
     41        array(
     42            'activity_clear_new_mentions' => array(
     43                'function' => 'bp_nouveau_ajax_clear_new_mentions',
     44                'nopriv'   => false,
     45            ),
     46        ),
     47        array(
     48            'delete_activity' => array(
     49                'function' => 'bp_nouveau_ajax_delete_activity',
     50                'nopriv'   => false,
     51            ),
     52        ),
     53        array(
     54            'new_activity_comment' => array(
     55                'function' => 'bp_nouveau_ajax_new_activity_comment',
     56                'nopriv'   => false,
     57            ),
     58        ),
     59        array(
     60            'bp_nouveau_get_activity_objects' => array(
     61                'function' => 'bp_nouveau_ajax_get_activity_objects',
     62                'nopriv'   => false,
     63            ),
     64        ),
     65        array(
     66            'post_update' => array(
     67                'function' => 'bp_nouveau_ajax_post_update',
     68                'nopriv'   => false,
     69            ),
     70        ),
     71        array(
     72            'bp_spam_activity' => array(
     73                'function' => 'bp_nouveau_ajax_spam_activity',
     74                'nopriv'   => false,
     75            ),
     76        ),
     77    )
     78);
    2779
    2880/**
     
    210262            '<div class="bp-feedback bp-messages error">%s</div>',
    211263            esc_html__( 'There was a problem displaying the content. Please try again.', 'buddypress' )
     264        ),
     265    );
     266
     267    // Bail if not a POST action.
     268    if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
     269        wp_send_json_error( $response );
     270    }
     271
     272    // Nonce check!
     273    if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'bp_nouveau_activity' ) ) {
     274        wp_send_json_error( $response );
     275    }
     276
     277    $activity_array = bp_activity_get_specific(
     278        array(
     279            'activity_ids'     => $_POST['id'],
     280            'display_comments' => 'stream',
    212281        )
    213282    );
    214 
    215     // Bail if not a POST action.
    216     if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
    217         wp_send_json_error( $response );
    218     }
    219 
    220     // Nonce check!
    221     if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'bp_nouveau_activity' ) ) {
    222         wp_send_json_error( $response );
    223     }
    224 
    225     $activity_array = bp_activity_get_specific( array(
    226         'activity_ids'     => $_POST['id'],
    227         'display_comments' => 'stream'
    228     ) );
    229283
    230284    if ( empty( $activity_array['activities'][0] ) ) {
     
    269323            '<div class="bp-feedback bp-messages error">%s</div>',
    270324            esc_html__( 'There was an error posting your reply. Please try again.', 'buddypress' )
    271         )
     325        ),
    272326    );
    273327
     
    316370
    317371    // Load the new activity item into the $activities_template global.
    318     bp_has_activities( array(
    319         'display_comments' => 'stream',
    320         'hide_spam'        => false,
    321         'show_hidden'      => true,
    322         'include'          => $comment_id,
    323     ) );
     372    bp_has_activities(
     373        array(
     374            'display_comments' => 'stream',
     375            'hide_spam'        => false,
     376            'show_hidden'      => true,
     377            'include'          => $comment_id,
     378        )
     379    );
    324380
    325381    // Swap the current comment with the activity item we just loaded.
     
    369425
    370426    if ( 'group' === $_POST['type'] ) {
    371         $groups = groups_get_groups( array(
    372             'user_id'           => bp_loggedin_user_id(),
    373             'search_terms'      => $_POST['search'],
    374             'show_hidden'       => true,
    375             'per_page'          => 2,
    376         ) );
     427        $groups = groups_get_groups(
     428            array(
     429                'user_id'      => bp_loggedin_user_id(),
     430                'search_terms' => $_POST['search'],
     431                'show_hidden'  => true,
     432                'per_page'     => 2,
     433            )
     434        );
    377435
    378436        wp_send_json_success( array_map( 'bp_nouveau_prepare_group_for_js', $groups['groups'] ) );
     
    403461
    404462    if ( empty( $_POST['content'] ) ) {
    405         wp_send_json_error( array(
    406             'message' => __( 'Please enter some content to post.', 'buddypress' ),
    407         ) );
     463        wp_send_json_error(
     464            array(
     465                'message' => __( 'Please enter some content to post.', 'buddypress' ),
     466            )
     467        );
    408468    }
    409469
     
    435495        if ( $item_id && bp_is_active( 'groups' ) ) {
    436496            // This function is setting the current group!
    437             $activity_id = groups_post_update( array( 'content' => $_POST['content'], 'group_id' => $item_id ) );
     497            $activity_id = groups_post_update(
     498                array(
     499                    'content'  => $_POST['content'],
     500                    'group_id' => $item_id,
     501                )
     502            );
    438503
    439504            if ( empty( $status ) ) {
     
    455520
    456521    if ( empty( $activity_id ) ) {
    457         wp_send_json_error( array(
    458             'message' => __( 'There was a problem posting your update. Please try again.', 'buddypress' ),
    459         ) );
     522        wp_send_json_error(
     523            array(
     524                'message' => __( 'There was a problem posting your update. Please try again.', 'buddypress' ),
     525            )
     526        );
    460527    }
    461528
     
    493560            '<div class="bp-feedback bp-messages error">%s</div>',
    494561            esc_html__( 'There was a problem spamming this item. Please try again.', 'buddypress' )
    495         )
     562        ),
    496563    );
    497564
  • trunk/src/bp-templates/bp-nouveau/includes/activity/functions.php

    r11855 r11856  
    155155
    156156    if ( bp_is_group() ) {
    157         $activity_params = array_merge( $activity_params,
    158             array( 'object' => 'group', 'item_id' => bp_get_current_group_id() )
     157        $activity_params = array_merge(
     158            $activity_params,
     159            array(
     160                'object'  => 'group',
     161                'item_id' => bp_get_current_group_id(),
     162            )
    159163        );
    160164    }
     
    186190    // deprecated hooks
    187191    $deprecated_hooks = array(
    188         array( 'bp_before_activity_type_tab_all', 'activity',  0 ),
    189         array( 'bp_activity_type_tabs',           'activity', 46 ),
     192        array( 'bp_before_activity_type_tab_all', 'activity', 0 ),
     193        array( 'bp_activity_type_tabs', 'activity', 46 ),
    190194    );
    191195
     
    194198            $deprecated_hooks,
    195199            array(
    196                 array( 'bp_before_activity_type_tab_friends',   'activity', 6 ),
    197                 array( 'bp_before_activity_type_tab_groups',    'activity', 16 ),
     200                array( 'bp_before_activity_type_tab_friends', 'activity', 6 ),
     201                array( 'bp_before_activity_type_tab_groups', 'activity', 16 ),
    198202                array( 'bp_before_activity_type_tab_favorites', 'activity', 26 ),
    199         ) );
    200 
     203            )
     204        );
    201205
    202206        // If the user has favorite create a nav item
     
    293297 */
    294298function bp_nouveau_get_activity_filters_array( $output = '', $filters = array(), $context = '' ) {
    295     return array( 'filters' => $filters, 'context' => $context );
     299    return array(
     300        'filters' => $filters,
     301        'context' => $context,
     302    );
    296303}
    297304
     
    333340function bp_nouveau_activity_secondary_avatars( $action, $activity ) {
    334341    switch ( $activity->component ) {
    335         case 'groups' :
    336         case 'friends' :
     342        case 'groups':
     343        case 'friends':
    337344            // Only insert avatar if one exists.
    338345            if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) {
  • trunk/src/bp-templates/bp-nouveau/includes/activity/widgets.php

    r11855 r11856  
    2121     */
    2222    public function __construct() {
    23         $widget_ops = apply_filters( 'bp_latest_activities', array(
    24             'classname'                   => 'bp-latest-activities buddypress',
    25             'description'                 => __( 'Display the latest updates of your community having the type(s) of your choice.', 'buddypress' ),
    26             'customize_selective_refresh' => true,
    27         ) );
     23        $widget_ops = apply_filters(
     24            'bp_latest_activities', array(
     25                'classname'                   => 'bp-latest-activities buddypress',
     26                'description'                 => __( 'Display the latest updates of your community having the type(s) of your choice.', 'buddypress' ),
     27                'customize_selective_refresh' => true,
     28            )
     29        );
    2830
    2931        parent::__construct( false, __( '(BuddyPress) Latest Activities', 'buddypress' ), $widget_ops );
  • trunk/src/bp-templates/bp-nouveau/includes/blogs/ajax.php

    r11686 r11856  
    1414 * @todo this funciton CANNOT be run when the file is included (like it is now). Move to a function and hook to something.
    1515 */
    16 bp_nouveau_register_ajax_actions( array(
    17     array( 'blogs_filter' => array( 'function' => 'bp_nouveau_ajax_object_template_loader', 'nopriv' => true ) ),
    18 ) );
     16bp_nouveau_register_ajax_actions(
     17    array(
     18        array(
     19            'blogs_filter' => array(
     20                'function' => 'bp_nouveau_ajax_object_template_loader',
     21                'nopriv'   => true,
     22            ),
     23        ),
     24    )
     25);
  • trunk/src/bp-templates/bp-nouveau/includes/classes.php

    r11855 r11856  
    299299
    300300        <p>
    301             <input class="checkbox" type="checkbox" <?php checked( $bp_nouveau_widget_title, true ) ?> id="<?php echo $this->get_field_id( 'bp_nouveau_widget_title' ); ?>" name="<?php echo $this->get_field_name( 'bp_nouveau_widget_title' ); ?>" />
     301            <input class="checkbox" type="checkbox" <?php checked( $bp_nouveau_widget_title, true ); ?> id="<?php echo $this->get_field_id( 'bp_nouveau_widget_title' ); ?>" name="<?php echo $this->get_field_name( 'bp_nouveau_widget_title' ); ?>" />
    302302            <label for="<?php echo $this->get_field_id( 'bp_nouveau_widget_title' ); ?>"><?php esc_html_e( 'Include navigation title', 'buddypress' ); ?></label>
    303303        </p>
  • trunk/src/bp-templates/bp-nouveau/includes/customizer-controls.php

    r11855 r11856  
    4040
    4141            // Try to fetch any random group:
    42             $random = groups_get_groups( array( 'type' => 'random', 'per_page' => 1, 'show_hidden' => true ) );
     42            $random = groups_get_groups(
     43                array(
     44                    'type'        => 'random',
     45                    'per_page'    => 1,
     46                    'show_hidden' => true,
     47                )
     48            );
    4349
    4450            if ( ! empty( $random['groups'] ) ) {
  • trunk/src/bp-templates/bp-nouveau/includes/friends/ajax.php

    r11686 r11856  
    1212 * Registers friends AJAX actions.
    1313 */
    14 bp_nouveau_register_ajax_actions( array(
    15     array( 'friends_remove_friend'       => array( 'function' => 'bp_nouveau_ajax_addremove_friend', 'nopriv' => false ) ),
    16     array( 'friends_add_friend'          => array( 'function' => 'bp_nouveau_ajax_addremove_friend', 'nopriv' => false ) ),
    17     array( 'friends_withdraw_friendship' => array( 'function' => 'bp_nouveau_ajax_addremove_friend', 'nopriv' => false ) ),
    18     array( 'friends_accept_friendship'   => array( 'function' => 'bp_nouveau_ajax_addremove_friend', 'nopriv' => false ) ),
    19     array( 'friends_reject_friendship'   => array( 'function' => 'bp_nouveau_ajax_addremove_friend', 'nopriv' => false ) ),
    20 ) );
     14bp_nouveau_register_ajax_actions(
     15    array(
     16        array(
     17            'friends_remove_friend' => array(
     18                'function' => 'bp_nouveau_ajax_addremove_friend',
     19                'nopriv'   => false,
     20            ),
     21        ),
     22        array(
     23            'friends_add_friend' => array(
     24                'function' => 'bp_nouveau_ajax_addremove_friend',
     25                'nopriv'   => false,
     26            ),
     27        ),
     28        array(
     29            'friends_withdraw_friendship' => array(
     30                'function' => 'bp_nouveau_ajax_addremove_friend',
     31                'nopriv'   => false,
     32            ),
     33        ),
     34        array(
     35            'friends_accept_friendship' => array(
     36                'function' => 'bp_nouveau_ajax_addremove_friend',
     37                'nopriv'   => false,
     38            ),
     39        ),
     40        array(
     41            'friends_reject_friendship' => array(
     42                'function' => 'bp_nouveau_ajax_addremove_friend',
     43                'nopriv'   => false,
     44            ),
     45        ),
     46    )
     47);
    2148
    2249/**
     
    3259            '<div class="bp-feedback error bp-ajax-message"><p>%s</p></div>',
    3360            esc_html__( 'There was a problem performing this action. Please try again.', 'buddypress' )
    34         )
     61        ),
    3562    );
    3663
     
    6592    if ( ! empty( $_POST['action'] ) && 'friends_accept_friendship' === $_POST['action'] ) {
    6693        if ( ! friends_accept_friendship( $friend_id ) ) {
    67             wp_send_json_error( array( 'feedback' => sprintf(
    68                 '<div class="bp-feedback error">%s</div>',
    69                 esc_html__( 'There was a problem accepting that request. Please try again.', 'buddypress' )
    70             ) ) );
    71         } else {
    72             wp_send_json_success( array(
    73                 'feedback' => sprintf(
    74                     '<div class="bp-feedback success">%s</div>',
    75                     esc_html__( 'Friendship accepted.', 'buddypress' )
    76                 ),
    77                 'type'     => 'success',
    78                 'is_user'  => true,
    79             ) );
     94            wp_send_json_error(
     95                array(
     96                    'feedback' => sprintf(
     97                        '<div class="bp-feedback error">%s</div>',
     98                        esc_html__( 'There was a problem accepting that request. Please try again.', 'buddypress' )
     99                    ),
     100                )
     101            );
     102        } else {
     103            wp_send_json_success(
     104                array(
     105                    'feedback' => sprintf(
     106                        '<div class="bp-feedback success">%s</div>',
     107                        esc_html__( 'Friendship accepted.', 'buddypress' )
     108                    ),
     109                    'type'     => 'success',
     110                    'is_user'  => true,
     111                )
     112            );
    80113        }
    81114
     
    83116    } elseif ( ! empty( $_POST['action'] ) && 'friends_reject_friendship' === $_POST['action'] ) {
    84117        if ( ! friends_reject_friendship( $friend_id ) ) {
    85             wp_send_json_error( array( 'feedback' => sprintf(
    86                 '<div class="bp-feedback error">%s</div>',
    87                 esc_html__( 'There was a problem rejecting that request. Please try again.', 'buddypress' )
    88             ) ) );
    89         } else {
    90             wp_send_json_success( array(
    91                 'feedback' => sprintf(
    92                     '<div class="bp-feedback success">%s</div>',
    93                     esc_html__( 'Friendship rejected.', 'buddypress' )
    94                 ),
    95                 'type'     => 'success',
    96                 'is_user'  => true,
    97             ) );
     118            wp_send_json_error(
     119                array(
     120                    'feedback' => sprintf(
     121                        '<div class="bp-feedback error">%s</div>',
     122                        esc_html__( 'There was a problem rejecting that request. Please try again.', 'buddypress' )
     123                    ),
     124                )
     125            );
     126        } else {
     127            wp_send_json_success(
     128                array(
     129                    'feedback' => sprintf(
     130                        '<div class="bp-feedback success">%s</div>',
     131                        esc_html__( 'Friendship rejected.', 'buddypress' )
     132                    ),
     133                    'type'     => 'success',
     134                    'is_user'  => true,
     135                )
     136            );
    98137        }
    99138
  • trunk/src/bp-templates/bp-nouveau/includes/groups/ajax.php

    r11855 r11856  
    3636            '<div class="bp-feedback error"><span class="bp-icon" aria-hidden="true"></span><p>%s</p></div>',
    3737            esc_html__( 'There was a problem performing this action. Please try again.', 'buddypress' )
    38         )
     38        ),
    3939    );
    4040
     
    8787    switch ( $_POST['action'] ) {
    8888
    89         case 'groups_accept_invite' :
     89        case 'groups_accept_invite':
    9090            if ( ! groups_accept_invite( bp_loggedin_user_id(), $group_id ) ) {
    9191                $response = array(
     
    9494                        esc_html__( 'Group invite could not be accepted.', 'buddypress' )
    9595                    ),
    96                     'type'     => 'error'
     96                    'type'     => 'error',
    9797                );
    9898
    9999            } else {
    100                 groups_record_activity( array(
    101                     'type'    => 'joined_group',
    102                     'item_id' => $group->id
    103                 ) );
     100                groups_record_activity(
     101                    array(
     102                        'type'    => 'joined_group',
     103                        'item_id' => $group->id,
     104                    )
     105                );
    104106
    105107                // User is now a member of the group
     
    114116                    'is_user'  => bp_is_user(),
    115117                    'contents' => bp_get_group_join_button( $group ),
    116                     'is_group' => bp_is_group()
     118                    'is_group' => bp_is_group(),
    117119                );
    118120            }
    119121            break;
    120122
    121         case 'groups_reject_invite' :
     123        case 'groups_reject_invite':
    122124            if ( ! groups_reject_invite( bp_loggedin_user_id(), $group_id ) ) {
    123125                $response = array(
     
    126128                        esc_html__( 'Group invite could not be rejected', 'buddypress' )
    127129                    ),
    128                     'type'     => 'error'
     130                    'type'     => 'error',
    129131                );
    130132            } else {
     
    140142            break;
    141143
    142         case 'groups_join_group' :
     144        case 'groups_join_group':
    143145            if ( groups_is_user_member( bp_loggedin_user_id(), $group->id ) ) {
    144146                $response = array(
     
    338340
    339341    $response = array(
    340         'feedback' =>  bp_nouveau_message_markup_wrapper( __( 'Invites could not be sent, please try again.', 'buddypress' ), 'error' ),
     342        'feedback' => bp_nouveau_message_markup_wrapper( __( 'Invites could not be sent, please try again.', 'buddypress' ), 'error' ),
    341343    );
    342344
    343345    // Verify nonce
    344346    if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'groups_send_invites' ) ) {
    345         wp_send_json_error( array(
    346             'feedback' => bp_nouveau_message_markup_wrapper( __( 'Invites could not be sent, please try again.', 'buddypress' ), 'error' ),
    347             'type'     => 'error',
    348         ) );
     347        wp_send_json_error(
     348            array(
     349                'feedback' => bp_nouveau_message_markup_wrapper( __( 'Invites could not be sent, please try again.', 'buddypress' ), 'error' ),
     350                'type'     => 'error',
     351            )
     352        );
    349353    }
    350354
     
    356360
    357361    if ( ! bp_groups_user_can_send_invites( $group_id ) ) {
    358         wp_send_json_error( array(
    359             'feedback' => bp_nouveau_message_markup_wrapper( __( 'You are not allowed to send invites for this group.', 'buddypress' ), 'error' ),
    360             'type'     => 'error',
    361         ) );
     362        wp_send_json_error(
     363            array(
     364                'feedback' => bp_nouveau_message_markup_wrapper( __( 'You are not allowed to send invites for this group.', 'buddypress' ), 'error' ),
     365                'type'     => 'error',
     366            )
     367        );
    362368    }
    363369
     
    370376
    371377    foreach ( (array) $_POST['users'] as $user_id ) {
    372         $invited[ $user_id ] = groups_invite_user( array( 'user_id' => $user_id, 'group_id' => $group_id ) );
     378        $invited[ $user_id ] = groups_invite_user(
     379            array(
     380                'user_id'  => $user_id,
     381                'group_id' => $group_id,
     382            )
     383        );
    373384    }
    374385
     
    391402        $errors = array_keys( $invited, false );
    392403
    393         wp_send_json_error( array(
    394             'feedback' =>  bp_nouveau_message_markup_wrapper( sprintf( __( 'Invites failed for %d user(s).', 'buddypress' ), count( $errors ) ), 'error' ),
    395             'users'    => $errors,
    396             'type'     => 'error',
    397         ) );
    398     }
    399 
    400     wp_send_json_success( array(
    401         'feedback' => bp_nouveau_message_markup_wrapper( __( 'Invites sent.', 'buddypress' ), 'success' ),
    402     ) );
     404        wp_send_json_error(
     405            array(
     406                'feedback' => bp_nouveau_message_markup_wrapper( sprintf( __( 'Invites failed for %d user(s).', 'buddypress' ), count( $errors ) ), 'error' ),
     407                'users'    => $errors,
     408                'type'     => 'error',
     409            )
     410        );
     411    }
     412
     413    wp_send_json_success(
     414        array(
     415            'feedback' => bp_nouveau_message_markup_wrapper( __( 'Invites sent.', 'buddypress' ), 'success' ),
     416        )
     417    );
    403418}
    404419
     
    412427    // Verify nonce
    413428    if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'groups_invite_uninvite_user' ) ) {
    414         wp_send_json_error( array(
    415             'feedback' => bp_nouveau_message_markup_wrapper( __( 'Invites could not be removed, please try again.', 'buddypress' ), 'error' ),
    416         ) );
     429        wp_send_json_error(
     430            array(
     431                'feedback' => bp_nouveau_message_markup_wrapper( __( 'Invites could not be removed, please try again.', 'buddypress' ), 'error' ),
     432            )
     433        );
    417434    }
    418435
    419436    if ( BP_Groups_Member::check_for_membership_request( $user_id, $group_id ) ) {
    420         wp_send_json_error( array(
    421             'feedback' => bp_nouveau_message_markup_wrapper(  __( 'Too late, the user is now a member of the group.', 'buddypress' ), 'warning' ),
    422             'code'     => 1,
    423         ) );
     437        wp_send_json_error(
     438            array(
     439                'feedback' => bp_nouveau_message_markup_wrapper( __( 'Too late, the user is now a member of the group.', 'buddypress' ), 'warning' ),
     440                'code'     => 1,
     441            )
     442        );
    424443    }
    425444
    426445    // Remove the unsent invitation.
    427446    if ( ! groups_uninvite_user( $user_id, $group_id ) ) {
    428         wp_send_json_error( array(
    429             'feedback' => bp_nouveau_message_markup_wrapper( __( 'Removing the invite for the user failed.', 'buddypress' ), 'error' ),
    430             'code'     => 0,
    431         ) );
    432     }
    433 
    434     wp_send_json_success( array(
    435         'feedback'    => bp_nouveau_message_markup_wrapper( __( 'No more pending invites for the group.', 'buddypress' ), 'info' ),
    436         'has_invites' => bp_group_has_invites( array( 'user_id' => 'any' ) ),
    437     ) );
     447        wp_send_json_error(
     448            array(
     449                'feedback' => bp_nouveau_message_markup_wrapper( __( 'Removing the invite for the user failed.', 'buddypress' ), 'error' ),
     450                'code'     => 0,
     451            )
     452        );
     453    }
     454
     455    wp_send_json_success(
     456        array(
     457            'feedback'    => bp_nouveau_message_markup_wrapper( __( 'No more pending invites for the group.', 'buddypress' ), 'info' ),
     458            'has_invites' => bp_group_has_invites( array( 'user_id' => 'any' ) ),
     459        )
     460    );
    438461}
  • trunk/src/bp-templates/bp-nouveau/includes/groups/classes.php

    r11855 r11856  
    225225    protected function setup_nav() {
    226226        $nav_items = array(
    227             'root' => array(
     227            'root'    => array(
    228228                'name'                => __( 'Memberships', 'buddypress' ),
    229229                'slug'                => $this->group->slug,
     
    231231                'default_subnav_slug' => apply_filters( 'bp_groups_default_extension', defined( 'BP_GROUPS_DEFAULT_EXTENSION' ) ? BP_GROUPS_DEFAULT_EXTENSION : 'home' ),
    232232            ),
    233             'home' => array(
    234                 'name'            => _x( 'Home', 'Group screen navigation title', 'buddypress' ),
    235                 'slug'            => 'home',
    236                 'parent_slug'     => $this->group->slug,
    237                 'position'        => 10,
     233            'home'    => array(
     234                'name'        => _x( 'Home', 'Group screen navigation title', 'buddypress' ),
     235                'slug'        => 'home',
     236                'parent_slug' => $this->group->slug,
     237                'position'    => 10,
    238238            ),
    239239            'invites' => array(
    240                 'name'            => _x( 'Invite', 'My Group screen nav', 'buddypress' ),
    241                 'slug'            => 'send-invites',
    242                 'parent_slug'     => $this->group->slug,
    243                 'position'        => 70,
     240                'name'        => _x( 'Invite', 'My Group screen nav', 'buddypress' ),
     241                'slug'        => 'send-invites',
     242                'parent_slug' => $this->group->slug,
     243                'position'    => 70,
    244244            ),
    245             'manage' => array(
    246                 'name'            => _x( 'Manage', 'My Group screen nav', 'buddypress' ),
    247                 'slug'            => 'admin',
    248                 'parent_slug'     => $this->group->slug,
    249                 'position'        => 1000,
     245            'manage'  => array(
     246                'name'        => _x( 'Manage', 'My Group screen nav', 'buddypress' ),
     247                'slug'        => 'admin',
     248                'parent_slug' => $this->group->slug,
     249                'position'    => 1000,
    250250            ),
    251251        );
     
    267267            if ( bp_is_active( 'activity' ) ) {
    268268                $nav_items['activity'] = array(
    269                     'name'            => _x( 'Activity', 'My Group screen nav', 'buddypress' ),
    270                     'slug'            => 'activity',
    271                     'parent_slug'     => $this->group->slug,
    272                     'position'        => 11,
     269                    'name'        => _x( 'Activity', 'My Group screen nav', 'buddypress' ),
     270                    'slug'        => 'activity',
     271                    'parent_slug' => $this->group->slug,
     272                    'position'    => 11,
    273273                );
    274274            }
     
    276276            // Add the members one
    277277            $nav_items['members'] = array(
    278                 'name'            => _x( 'Members', 'My Group screen nav', 'buddypress' ),
    279                 'slug'            => 'members',
    280                 'parent_slug'     => $this->group->slug,
    281                 'position'        => 60,
     278                'name'        => _x( 'Members', 'My Group screen nav', 'buddypress' ),
     279                'slug'        => 'members',
     280                'parent_slug' => $this->group->slug,
     281                'position'    => 60,
    282282            );
    283283        }
    284284
    285285        // Required params
    286         $required_params = array( 'slug' => true, 'name' => true, 'nav_item_position' => true );
     286        $required_params = array(
     287            'slug'              => true,
     288            'name'              => true,
     289            'nav_item_position' => true,
     290        );
    287291
    288292        // Now find nav items plugins are creating within their Group extensions!
  • trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php

    r11855 r11856  
    226226            <?php if ( $is_enabled ) : ?>
    227227                <a href="<?php echo esc_url( bp_groups_directory_permalink() . 'create/step/' . $slug . '/' ); ?>">
    228                     <?php echo (int) $counter ?> <?php echo esc_html( $step['name'] ); ?>
     228                    <?php echo (int) $counter; ?> <?php echo esc_html( $step['name'] ); ?>
    229229                </a>
    230             <?php else: ?>
    231                 <a disabled="disabled"><?php echo (int) $counter ?>. <?php echo esc_html( $step['name'] ); ?></a>
     230            <?php else : ?>
     231                <a disabled="disabled"><?php echo (int) $counter; ?>. <?php echo esc_html( $step['name'] ); ?></a>
    232232            <?php endif ?>
    233233        </li>
     
    350350                // Specific case for the delete group screen
    351351                if ( 'delete-group' === $screen_id ) {
    352                     $output = sprintf( '<div class="submit">
     352                    $output = sprintf(
     353                        '<div class="submit">
    353354                            <input type="submit" disabled="disabled" value="%s" id="delete-group-button" name="delete-group-button" />
    354355                        </div>',
     
    374375
    375376            if ( ! bp_is_first_group_creation_step() ) {
    376                 $creation_step_buttons .= sprintf( '<input type="button" value="%1$s" id="group-creation-previous" name="previous" onclick="%2$s" />',
     377                $creation_step_buttons .= sprintf(
     378                    '<input type="button" value="%1$s" id="group-creation-previous" name="previous" onclick="%2$s" />',
    377379                    esc_attr__( 'Back to Previous Step', 'buddypress' ),
    378                     "location.href='" . esc_js( esc_url_raw( bp_get_group_creation_previous_link() ) )  . "'"
     380                    "location.href='" . esc_js( esc_url_raw( bp_get_group_creation_previous_link() ) ) . "'"
    379381                );
    380382            }
    381383
    382384            if ( ! bp_is_last_group_creation_step() && ! bp_is_first_group_creation_step() ) {
    383                 $creation_step_buttons .= sprintf( '<input type="submit" value="%s" id="group-creation-next" name="save" />',
     385                $creation_step_buttons .= sprintf(
     386                    '<input type="submit" value="%s" id="group-creation-next" name="save" />',
    384387                    esc_attr__( 'Next Step', 'buddypress' )
    385388                );
     
    387390
    388391            if ( bp_is_first_group_creation_step() ) {
    389                 $creation_step_buttons .= sprintf( '<input type="submit" value="%s" id="group-creation-create" name="save" />',
     392                $creation_step_buttons .= sprintf(
     393                    '<input type="submit" value="%s" id="group-creation-create" name="save" />',
    390394                    esc_attr__( 'Create Group and Continue', 'buddypress' )
    391395                );
     
    393397
    394398            if ( bp_is_last_group_creation_step() ) {
    395                 $creation_step_buttons .= sprintf( '<input type="submit" value="%s" id="group-creation-finish" name="save" />',
     399                $creation_step_buttons .= sprintf(
     400                    '<input type="submit" value="%s" id="group-creation-finish" name="save" />',
    396401                    esc_attr__( 'Finish', 'buddypress' )
    397402                );
     
    599604
    600605    if ( ! $args ) {
    601         $args = array( 'wrapper' => 'span', 'classes' => array( 'small' ) );
     606        $args = array(
     607            'wrapper' => 'span',
     608            'classes' => array( 'small' ),
     609        );
    602610    }
    603611
     
    12491257 */
    12501258function bp_nouveau_groups_get_customizer_option_link() {
    1251     return bp_nouveau_get_customizer_link( array(
    1252         'object'    => 'group',
    1253         'autofocus' => 'bp_nouveau_group_front_page',
    1254         'text'      => __( 'Groups default front page', 'buddypress' ),
    1255     ) );
     1259    return bp_nouveau_get_customizer_link(
     1260        array(
     1261            'object'    => 'group',
     1262            'autofocus' => 'bp_nouveau_group_front_page',
     1263            'text'      => __( 'Groups default front page', 'buddypress' ),
     1264        )
     1265    );
    12561266}
    12571267
     
    12651275 */
    12661276function bp_nouveau_groups_get_customizer_widgets_link() {
    1267     return bp_nouveau_get_customizer_link( array(
    1268         'object'    => 'group',
    1269         'autofocus' => 'sidebar-widgets-sidebar-buddypress-groups',
    1270         'text'      => __( '(BuddyPress) Widgets', 'buddypress' ),
    1271     ) );
     1277    return bp_nouveau_get_customizer_link(
     1278        array(
     1279            'object'    => 'group',
     1280            'autofocus' => 'sidebar-widgets-sidebar-buddypress-groups',
     1281            'text'      => __( '(BuddyPress) Widgets', 'buddypress' ),
     1282        )
     1283    );
    12721284}
    12731285
  • trunk/src/bp-templates/bp-nouveau/includes/members/functions.php

    r11855 r11856  
    2020    }
    2121
    22     wp_add_inline_style( 'bp-nouveau', '
     22    wp_add_inline_style(
     23        'bp-nouveau', '
    2324        #member-front-widgets #groups-list-options,
    2425        #member-front-widgets #members-list-options,
     
    2627            display: none;
    2728        }
    28     ' );
     29    '
     30    );
    2931}
    3032
     
    448450
    449451    if ( bp_displayed_user_get_front_template( buddypress()->loggedin_user ) ) {
    450         buddypress()->members->nav->add_nav( array(
    451             'name'                => _x( 'Home', 'Member Home page', 'buddypress' ),
    452             'slug'                => 'front',
    453             'position'            => 5,
    454         ) );
     452        buddypress()->members->nav->add_nav(
     453            array(
     454                'name'     => _x( 'Home', 'Member Home page', 'buddypress' ),
     455                'slug'     => 'front',
     456                'position' => 5,
     457            )
     458        );
    455459    }
    456460
  • trunk/src/bp-templates/bp-nouveau/includes/members/loader.php

    r11855 r11856  
    5454    protected function setup_actions() {
    5555        $ajax_actions = array(
    56             array( 'members_filter' => array( 'function' => 'bp_nouveau_ajax_object_template_loader', 'nopriv' => true ) ),
     56            array(
     57                'members_filter' => array(
     58                    'function' => 'bp_nouveau_ajax_object_template_loader',
     59                    'nopriv'   => true,
     60                ),
     61            ),
    5762        );
    5863
  • trunk/src/bp-templates/bp-nouveau/includes/members/template-tags.php

    r11855 r11856  
    164164
    165165    if ( ! $args ) {
    166         $args = array( 'id' => 'item-buttons', 'classes' => false );
     166        $args = array(
     167            'id'      => 'item-buttons',
     168            'classes' => false,
     169        );
    167170    }
    168171
     
    688691 */
    689692function bp_nouveau_members_get_customizer_option_link() {
    690     return bp_nouveau_get_customizer_link( array(
    691         'object'    => 'user',
    692         'autofocus' => 'bp_nouveau_user_front_page',
    693         'text'      => __( 'Members default front page', 'buddypress' ),
    694     ) );
     693    return bp_nouveau_get_customizer_link(
     694        array(
     695            'object'    => 'user',
     696            'autofocus' => 'bp_nouveau_user_front_page',
     697            'text'      => __( 'Members default front page', 'buddypress' ),
     698        )
     699    );
    695700}
    696701
     
    704709 */
    705710function bp_nouveau_members_get_customizer_widgets_link() {
    706     return bp_nouveau_get_customizer_link( array(
    707         'object'    => 'user',
    708         'autofocus' => 'sidebar-widgets-sidebar-buddypress-members',
    709         'text'      => __( '(BuddyPress) Widgets', 'buddypress' ),
    710     ) );
     711    return bp_nouveau_get_customizer_link(
     712        array(
     713            'object'    => 'user',
     714            'autofocus' => 'sidebar-widgets-sidebar-buddypress-members',
     715            'text'      => __( '(BuddyPress) Widgets', 'buddypress' ),
     716        )
     717    );
    711718}
    712719
     
    857864        }
    858865
    859         $user_profile_fields[] = (object) array( 'id' => 'wp_' . $key, 'label' => $field, 'data' => $user->{$key} );
     866        $user_profile_fields[] = (object) array(
     867            'id'    => 'wp_' . $key,
     868            'label' => $field,
     869            'data'  => $user->{$key},
     870        );
    860871    }
    861872
     
    961972         */
    962973        apply_filters( 'bp_nouveau_get_wp_profile_field_data', $data ),
    963         array( 'a' => array( 'href' => true, 'rel' => true ) )
     974        array(
     975            'a' => array(
     976                'href' => true,
     977                'rel'  => true,
     978            ),
     979        )
    964980    );
    965981}
  • trunk/src/bp-templates/bp-nouveau/includes/messages/classes.php

    r11855 r11856  
    1313    class BP_Nouveau_Notices_List_Table extends WP_List_Table {
    1414        public function __construct( $args = array() ) {
    15             parent::__construct( array(
    16                 'plural' => 'notices',
    17                 'singular' => 'notice',
    18                 'ajax' => true,
    19                 'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
    20             ) );
     15            parent::__construct(
     16                array(
     17                    'plural'   => 'notices',
     18                    'singular' => 'notice',
     19                    'ajax'     => true,
     20                    'screen'   => isset( $args['screen'] ) ? $args['screen'] : null,
     21                )
     22            );
    2123        }
    2224
  • trunk/src/bp-templates/bp-nouveau/includes/messages/functions.php

    r11855 r11856  
    287287
    288288        if ( empty( $bp->template_message ) ) {
    289             $message = sprintf( '<strong class="subject">%s</strong>
     289            $message = sprintf(
     290                '<strong class="subject">%s</strong>
    290291                %s',
    291292                stripslashes( $notice->subject ),
     
    386387
    387388            if ( isset( $match[1] ) && isset( $match[2] ) ) {
    388                 $bulk_actions[] = array( 'value' => trim( $match[1] ), 'label' => trim( $match[2] ) );
     389                $bulk_actions[] = array(
     390                    'value' => trim( $match[1] ),
     391                    'label' => trim( $match[2] ),
     392                );
    389393            }
    390394        }
     
    400404 */
    401405function bp_nouveau_messages_notification_filters() {
    402     bp_nouveau_notifications_register_filter( array(
    403         'id'       => 'new_message',
    404         'label'    => __( 'New private messages', 'buddypress' ),
    405         'position' => 115,
    406     ) );
    407 }
     406    bp_nouveau_notifications_register_filter(
     407        array(
     408            'id'       => 'new_message',
     409            'label'    => __( 'New private messages', 'buddypress' ),
     410            'position' => 115,
     411        )
     412    );
     413}
  • trunk/src/bp-templates/bp-nouveau/includes/notifications/loader.php

    r11855 r11856  
    5858
    5959        $ajax_actions = array(
    60             array( 'notifications_filter' => array( 'function' => 'bp_nouveau_ajax_object_template_loader', 'nopriv' => false ) ),
     60            array(
     61                'notifications_filter' => array(
     62                    'function' => 'bp_nouveau_ajax_object_template_loader',
     63                    'nopriv'   => false,
     64                ),
     65            ),
    6166        );
    6267
  • trunk/src/bp-templates/bp-nouveau/includes/template-tags.php

    r11855 r11856  
    4343    }
    4444
    45     bp_nouveau_hook( array(
    46         'bp',
    47         'template',
    48         $suffix,
    49     ) );
     45    bp_nouveau_hook(
     46        array(
     47            'bp',
     48            'template',
     49            $suffix,
     50        )
     51    );
    5052}
    5153
     
    6567    }
    6668
    67     bp_nouveau_hook( array(
    68         'bp',
    69         'friend',
    70         $suffix,
    71     ) );
     69    bp_nouveau_hook(
     70        array(
     71            'bp',
     72            'friend',
     73            $suffix,
     74        )
     75    );
    7276}
    7377
     
    377381    }
    378382
    379     switch( $pagination_type ) {
    380         case 'blogs' :
     383    switch ( $pagination_type ) {
     384        case 'blogs':
    381385            $pag_count   = bp_get_blogs_pagination_count();
    382386            $pag_links   = bp_get_blogs_pagination_links();
     
    384388            $bottom_hook = 'bp_after_directory_blogs_list';
    385389            $page_arg    = $GLOBALS['blogs_template']->pag_arg;
    386         break;
    387 
    388         case 'members'        :
    389         case 'friends'        :
    390         case 'manage-members' :
     390            break;
     391
     392        case 'members':
     393        case 'friends':
     394        case 'manage-members':
    391395            $pag_count = bp_get_members_pagination_count();
    392396            $pag_links = bp_get_members_pagination_links();
     
    399403
    400404            $page_arg = $GLOBALS['members_template']->pag_arg;
    401         break;
    402 
    403         case 'groups' :
     405            break;
     406
     407        case 'groups':
    404408            $pag_count   = bp_get_groups_pagination_count();
    405409            $pag_links   = bp_get_groups_pagination_links();
     
    407411            $bottom_hook = 'bp_after_directory_groups_list';
    408412            $page_arg    = $GLOBALS['groups_template']->pag_arg;
    409         break;
    410 
    411         case 'notifications' :
     413            break;
     414
     415        case 'notifications':
    412416            $pag_count   = bp_get_notifications_pagination_count();
    413417            $pag_links   = bp_get_notifications_pagination_links();
     
    415419            $bottom_hook = '';
    416420            $page_arg    = buddypress()->notifications->query_loop->pag_arg;
    417         break;
    418 
    419         case 'membership-requests' :
     421            break;
     422
     423        case 'membership-requests':
    420424            $pag_count   = bp_get_group_requests_pagination_count();
    421425            $pag_links   = bp_get_group_requests_pagination_links();
     
    423427            $bottom_hook = '';
    424428            $page_arg    = $GLOBALS['requests_template']->pag_arg;
    425         break;
     429            break;
    426430    }
    427431
     
    430434    ?>
    431435
    432     <?php if ( 'bottom' === $position && isset( $bottom_hook ) ) {
     436    <?php
     437    if ( 'bottom' === $position && isset( $bottom_hook ) ) {
    433438        /**
    434439         * Fires after the component directory list.
     
    464469    </div>
    465470
    466     <?php if ( 'top' === $position && isset( $top_hook ) ) {
     471    <?php
     472    if ( 'top' === $position && isset( $top_hook ) ) {
    467473        /**
    468474         * Fires before the component directory list.
     
    710716        }
    711717
    712         $nav = $group_nav->get_secondary( array(
    713             'parent_slug'     => $parent_slug,
    714             'user_has_access' => (bool) $n['user_has_access'],
    715         ) );
     718        $nav = $group_nav->get_secondary(
     719            array(
     720                'parent_slug'     => $parent_slug,
     721                'user_has_access' => (bool) $n['user_has_access'],
     722            )
     723        );
    716724
    717725    // Build the nav for the displayed user
     
    721729
    722730        if ( 'secondary' === $n['type'] ) {
    723             $nav = $user_nav->get_secondary( array(
    724                 'parent_slug'     => bp_current_component(),
    725                 'user_has_access' => (bool) $n['user_has_access'],
    726             ) );
     731            $nav = $user_nav->get_secondary(
     732                array(
     733                    'parent_slug'     => bp_current_component(),
     734                    'user_has_access' => (bool) $n['user_has_access'],
     735                )
     736            );
    727737
    728738        } else {
     
    21342144        // Specific case for Site's privacy
    21352145        if ( 'signup_blog_privacy_public' === $name || 'signup_blog_privacy_private' === $name ) {
    2136             $name           = 'signup_blog_privacy';
    2137             $submitted      = bp_get_signup_blog_privacy_value();
     2146            $name      = 'signup_blog_privacy';
     2147            $submitted = bp_get_signup_blog_privacy_value();
    21382148
    21392149            if ( ! $submitted ) {
     
    22492259
    22502260    // Output the submit button.
    2251     printf( '
    2252         <div class="submit">
     2261    printf(
     2262        '<div class="submit">
    22532263            <input type="submit" %s/>
    22542264        </div>',
  • trunk/src/bp-templates/bp-nouveau/includes/xprofile/template-tags.php

    r11686 r11856  
    6565 */
    6666function bp_nouveau_base_account_has_xprofile() {
    67     return (bool) bp_has_profile( array( 'profile_group_id' => 1, 'fetch_field_data' => false ) );
     67    return (bool) bp_has_profile(
     68        array(
     69            'profile_group_id' => 1,
     70            'fetch_field_data' => false,
     71        )
     72    );
    6873}
Note: See TracChangeset for help on using the changeset viewer.