Skip to:
Content

BuddyPress.org

Ticket #8581: 8581-c.patch

File 8581-c.patch, 99.0 KB (added by vapvarun, 3 years ago)

revised patch

  • src/bp-activity/bp-activity-filters.php

    diff --git src/bp-activity/bp-activity-filters.php src/bp-activity/bp-activity-filters.php
    index 3367e75f2..453485e30 100644
    add_filter( 'bp_get_total_mention_count_for_user', 'bp_core_number_format' ); 
    108108
    109109add_filter( 'bp_activity_get_embed_excerpt', 'bp_activity_embed_excerpt_onclick_location_filter', 9 );
    110110
     111add_filter( 'bp_get_activity_content_body', 'bp_activity_generate_content_body', 50, 2 );
     112add_filter( 'bp_activity_get_embed_excerpt', 'bp_activity_generate_embed_excerpt', 50, 2 );
     113
    111114// Personal data export.
    112115add_filter( 'wp_privacy_personal_data_exporters', 'bp_activity_register_personal_data_exporter' );
    113116
    function bp_activity_register_personal_data_exporter( $exporters ) { 
    841844
    842845        return $exporters;
    843846}
     847
     848/**
     849 * Generate a content body for specific activity types.
     850 *
     851 * @since 10.0.0
     852 *
     853 * @param string               $content  The content of the activity.
     854 * @param BP_Activity_Activity $activity The activity object.
     855 * @return string                        The content of the activity.
     856 */
     857function bp_activity_generate_content_body( $content = '', $activity = null ) {
     858       
     859        /*
     860         * New Avatar Activity Type
     861         */
     862        if ( isset( $activity->type ) && 'new_avatar' === $activity->type ) {
     863                $historical_avatar = '';               
     864               
     865                $user_url               = bp_core_get_user_domain( $activity->user_id );
     866                $user_displayname       = bp_core_get_user_displayname( $activity->user_id );
     867                $user_mentionname       = bp_activity_get_user_mentionname( $activity->user_id );               
     868                $action_button_text = esc_html__( 'View Profile', 'buddypress');
     869                $user_cover_image       = bp_attachments_get_attachment(
     870                                                                        'url',
     871                                                                        array(
     872                                                                                'object_dir' => 'members',
     873                                                                                'item_id'    => $activity->user_id,
     874                                                                        )
     875                                                                );
     876                $args   = array( 'r' => $user_mentionname );
     877                $url    = add_query_arg( $args, bp_get_activity_directory_permalink() );
     878                $user_mentionname_url = wp_nonce_url( $url );
     879
     880                if ( isset( $activity->historical_avatar ) && $activity->historical_avatar ) {
     881                        $historical_avatar = str_replace('\history','/history',$activity->historical_avatar);
     882                } else {
     883                        $avatars = bp_avatar_get_version_src( $activity->user_id, $activity->date_recorded );
     884
     885                        if ( $avatars && 1 === count( $avatars ) ) {
     886                                $avatar            = reset( $avatars );
     887                                $historical_avatar = trailingslashit( $avatar->parent_dir_url ) . $avatar->name;
     888                        }
     889                }
     890
     891                if ( $historical_avatar ) {
     892                        $content = '<div class="bp-member-activity-preview">';
     893                        $content .= '<a href="' . esc_url( $user_url ) . '">
     894                                                        <div class="bp-member-preview-cover">';
     895                        if ( $user_cover_image != '') {
     896                                $content .= '<img src="' . esc_url( $user_cover_image ) . '" alt="cover-image"/>';
     897                        }
     898                        $content .= '</div></a>';
     899                        $content .= '<div class="bp-member-short-description">';
     900                        $content .= '<div class="bp-member-avatar-content">';
     901                        $content .= '<img src="' . esc_url( $historical_avatar ) . '" class="profile-photo aligncenter">';
     902                        $content .= '</div>';
     903                        $content .= '<p class="bp-member-short-description-title">
     904                                                        <a href="' .esc_url( $user_url ) .'">' . esc_html( $user_displayname ) . '</a>
     905                                                </p>';
     906                        $content .= '<p class="bp-member-nickname">
     907                                                        <a href="' .esc_url( $user_mentionname_url ) . '">@' . esc_html( $user_mentionname ) . '</a>
     908                                                </p>';
     909                                               
     910                        $content .= sprintf(
     911                                        '<div class="bp-profile-button">
     912                                                <a href="%1$s" class="button large primary button-primary" role="button">%2$s</a>
     913                                        </div>',
     914                                        esc_url( $user_url ),
     915                                        $action_button_text
     916                                );
     917                        $content .= '</div>';
     918                        $content .= '</div>';
     919                       
     920                }
     921        }
     922       
     923         /*
     924          * Friendship Created Activity Type
     925          */
     926         
     927         if ( isset( $activity->type ) && 'friendship_created' === $activity->type ) {                         
     928               
     929                $user_url               = bp_core_get_user_domain( $activity->secondary_item_id );
     930                $user_displayname       = bp_core_get_user_displayname( $activity->secondary_item_id );
     931                $user_mentionname       = bp_activity_get_user_mentionname( $activity->secondary_item_id );             
     932                $action_button_text = esc_html__( 'View Profile', 'buddypress');
     933                $user_cover_image       = bp_attachments_get_attachment(
     934                                                                        'url',
     935                                                                        array(
     936                                                                                'object_dir' => 'members',
     937                                                                                'item_id'    => $activity->secondary_item_id,
     938                                                                        )
     939                                                                );
     940                $args   = array( 'r' => $user_mentionname );
     941                $url    = add_query_arg( $args, bp_get_activity_directory_permalink() );
     942                $user_mentionname_url = wp_nonce_url( $url );
     943               
     944                $avatar_url = bp_core_fetch_avatar(
     945                                                                        array(
     946                                                                                'item_id' => $activity->secondary_item_id,
     947                                                                                'type'    => 'full',
     948                                                                                'width'   => 150,
     949                                                                                'height'  => 150,
     950                                                                                'class'   => 'avatar',
     951                                                                                'id'      => false,
     952                                                                                'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), esc_html( $user_displayname ) ),
     953                                                                                'html'    => false
     954                                                                        )
     955                                                                );
     956               
     957
     958                if ( $avatar_url ) {
     959                        $content = '<div class="bp-member-activity-preview">';
     960                        $content .= '<a href="' . esc_url( $user_url ) . '">
     961                                                        <div class="bp-member-preview-cover">';
     962                        if ( $user_cover_image != '') {
     963                                $content .= '<img src="' . esc_url( $user_cover_image ) . '" alt="' . esc_attr__( "cover-image" ) . '"/>';
     964                        }
     965                        $content .= '</div></a>';
     966                        $content .= '<div class="bp-member-short-description">';
     967                        $content .= '<div class="bp-member-avatar-content">';
     968                        $content .= '<img src="' . esc_url( $avatar_url ) . '" class="profile-photo aligncenter">';
     969                        $content .= '</div>';
     970                        $content .= '<p class="bp-member-short-description-title">
     971                                                        <a href="' .esc_url( $user_url ) .'">' . esc_html( $user_displayname ) . '</a>
     972                                                </p>';
     973                        $content .= '<p class="bp-member-nickname">
     974                                                        <a href="' .esc_url( $user_mentionname_url ) . '">@' . esc_html( $user_mentionname ) . '</a>
     975                                                </p>';
     976                                               
     977                        $content .= sprintf(
     978                                        '<div class="bp-profile-button">
     979                                                <a href="%1$s" class="button large primary button-primary" role="button">%2$s</a>
     980                                        </div>',
     981                                        esc_url( $user_url ),
     982                                        $action_button_text
     983                                );
     984                        $content .= '</div>';
     985                        $content .= '</div>';
     986                       
     987                }
     988        }
     989       
     990        /*
     991          * Joined Group Activity Type
     992          */
     993         
     994         if ( isset( $activity->type ) && 'joined_group' === $activity->type ) {       
     995         
     996                $group                          = groups_get_group( array( 'group_id' => $activity->item_id ) );
     997                $group_name                     = $group->name;
     998                $group_url              = bp_get_group_permalink( $group );
     999                $group_cover_image      = bp_get_group_cover_url( $group );             
     1000                $action_button_text = esc_html__( 'Visit Group', 'buddypress');
     1001               
     1002                $group_avatar_url       = bp_core_fetch_avatar(
     1003                                                                array(
     1004                                                                        'item_id'    => $group->id,
     1005                                                                        'avatar_dir' => 'group-avatars',
     1006                                                                        'object'     => 'group',
     1007                                                                        'type'       => 'full',
     1008                                                                        'html'       => false,                                                                 
     1009                                                                        'width'      => 150,
     1010                                                                        'height'     => 150,
     1011                                                                )
     1012                                                        );
     1013               
     1014                if ( $group_avatar_url ) {
     1015                        $content = '<div class="bp-group-activity-preview">';
     1016                        $content .= '<a href="' . esc_url( $group_url ) . '">
     1017                                                        <div class="bp-group-preview-cover">';
     1018                        if ( $group_cover_image != '') {
     1019                                $content .= '<img src="' . esc_url( $group_cover_image ) . '" alt="cover-image"/>';
     1020                        }
     1021                        $content .= '</div></a>';
     1022                        $content .= '<div class="bp-group-short-description">';
     1023                        $content .= '<div class="bp-group-avatar-content">';
     1024                        $content .= '<img src="' . esc_url( $group_avatar_url ) . '" class="group-photo aligncenter" width="150" height="150">';
     1025                        $content .= '</div>';
     1026                        $content .= '<p class="bp-group-short-description-title">
     1027                                                        <a href="' .esc_url( $group_url ) .'">' . esc_html( $group_name ) . '</a>
     1028                                                </p>';                 
     1029                                               
     1030                        $content .= sprintf(
     1031                                        '<div class="bp-profile-button">
     1032                                                <a href="%1$s" class="button large primary button-primary" role="button">%2$s</a>
     1033                                        </div>',
     1034                                        esc_url( $group_url ),
     1035                                        $action_button_text
     1036                                );
     1037                        $content .= '</div>';
     1038                        $content .= '</div>';
     1039                       
     1040                }
     1041         
     1042         }
     1043
     1044        return $content;
     1045}
     1046
     1047
     1048
     1049
     1050/**
     1051 * Generate a embed content body for specific activity types.
     1052 *
     1053 * @since 10.0.0
     1054 *
     1055 * @param string               $content  The content of the activity.
     1056 * @return string                        The content of the activity.
     1057 */
     1058function bp_activity_generate_embed_excerpt( $content = '' ) {
     1059       
     1060        $activity = $GLOBALS['activities_template']->activity;
     1061       
     1062        /*
     1063         * New Avatar Activity Type
     1064         */
     1065        if ( isset( $activity->type ) && 'new_avatar' === $activity->type ) {
     1066                $historical_avatar = '';               
     1067               
     1068                $user_url               = bp_core_get_user_domain( $activity->user_id );
     1069                $user_displayname       = bp_core_get_user_displayname( $activity->user_id );
     1070                $user_mentionname       = bp_activity_get_user_mentionname( $activity->user_id );               
     1071                $action_button_text = esc_html__( 'View Profile', 'buddypress');
     1072                $user_cover_image       = bp_attachments_get_attachment(
     1073                                                                        'url',
     1074                                                                        array(
     1075                                                                                'object_dir' => 'members',
     1076                                                                                'item_id'    => $activity->user_id,
     1077                                                                        )
     1078                                                                );
     1079                $args   = array( 'r' => $user_mentionname );
     1080                $url    = add_query_arg( $args, bp_get_activity_directory_permalink() );
     1081                $user_mentionname_url = wp_nonce_url( $url );
     1082
     1083                if ( isset( $activity->historical_avatar ) && $activity->historical_avatar ) {
     1084                        $historical_avatar = str_replace('\history','/history',$activity->historical_avatar);
     1085                } else {
     1086                        $avatars = bp_avatar_get_version_src( $activity->user_id, $activity->date_recorded );
     1087
     1088                        if ( $avatars && 1 === count( $avatars ) ) {
     1089                                $avatar            = reset( $avatars );                         
     1090                                $historical_avatar = trailingslashit( str_replace('\history', '/history', $avatar->parent_dir_url ) )  . $avatar->name;
     1091                        }
     1092                }
     1093
     1094                if ( $historical_avatar ) {
     1095                        $content = '<div class="bp-member-activity-preview">';
     1096                        $content .= '<a href="' . esc_url( $user_url ) . '">
     1097                                                        <div class="bp-member-preview-cover">';
     1098                        if ( $user_cover_image != '') {
     1099                                $content .= '<img src="' . esc_url( $user_cover_image ) . '" alt="cover-image"/>';
     1100                        }
     1101                        $content .= '</div></a>';
     1102                        $content .= '<div class="bp-member-short-description">';
     1103                        $content .= '<div class="bp-member-avatar-content">';
     1104                        $content .= '<img src="' . esc_url( $historical_avatar ) . '" class="profile-photo aligncenter">';
     1105                        $content .= '</div>';
     1106                        $content .= '<p class="bp-member-short-description-title">
     1107                                                        <a href="' .esc_url( $user_url ) .'">' . esc_html( $user_displayname ) . '</a>
     1108                                                </p>';
     1109                        $content .= '<p class="bp-member-nickname">
     1110                                                        <a href="' .esc_url( $user_mentionname_url ) . '">@' . esc_html( $user_mentionname ) . '</a>
     1111                                                </p>';
     1112                                               
     1113                        $content .= sprintf(
     1114                                        '<div class="bp-profile-button">
     1115                                                <a href="%1$s" class="button large primary button-primary" role="button">%2$s</a>
     1116                                        </div>',
     1117                                        esc_url( $user_url ),
     1118                                        $action_button_text
     1119                                );
     1120                        $content .= '</div>';
     1121                        $content .= '</div>';
     1122                       
     1123                }
     1124        }
     1125       
     1126         /*
     1127          * Friendship Created Activity Type
     1128          */
     1129         
     1130         if ( isset( $activity->type ) && 'friendship_created' === $activity->type ) {                         
     1131               
     1132                $user_url               = bp_core_get_user_domain( $activity->secondary_item_id );
     1133                $user_displayname       = bp_core_get_user_displayname( $activity->secondary_item_id );
     1134                $user_mentionname       = bp_activity_get_user_mentionname( $activity->secondary_item_id );             
     1135                $action_button_text = esc_html__( 'View Profile', 'buddypress');
     1136                $user_cover_image       = bp_attachments_get_attachment(
     1137                                                                        'url',
     1138                                                                        array(
     1139                                                                                'object_dir' => 'members',
     1140                                                                                'item_id'    => $activity->secondary_item_id,
     1141                                                                        )
     1142                                                                );
     1143                $args   = array( 'r' => $user_mentionname );
     1144                $url    = add_query_arg( $args, bp_get_activity_directory_permalink() );
     1145                $user_mentionname_url = wp_nonce_url( $url );
     1146               
     1147                $avatar_url = bp_core_fetch_avatar(
     1148                                                array(
     1149                                                        'item_id' => $activity->secondary_item_id,
     1150                                                        'type'    => 'full',
     1151                                                        'width'   => 150,
     1152                                                        'height'  => 150,
     1153                                                        'class'   => 'avatar',
     1154                                                        'id'      => false,
     1155                                                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), esc_html( $user_displayname ) ),
     1156                                                        'html'    => false
     1157                                                )
     1158                                        );
     1159               
     1160
     1161                if ( $avatar_url ) {
     1162                        $content = '<div class="bp-member-activity-preview">';
     1163                        $content .= '<a href="' . esc_url( $user_url ) . '">
     1164                                                        <div class="bp-member-preview-cover">';
     1165                        if ( $user_cover_image != '') {
     1166                                $content .= '<img src="' . esc_url( $user_cover_image ) . '" alt="cover-image"/>';
     1167                        }
     1168                        $content .= '</div></a>';
     1169                        $content .= '<div class="bp-member-short-description">';
     1170                        $content .= '<div class="bp-member-avatar-content">';
     1171                        $content .= '<img src="' . esc_url( $avatar_url ) . '" class="profile-photo aligncenter">';
     1172                        $content .= '</div>';
     1173                        $content .= '<p class="bp-member-short-description-title">
     1174                                                        <a href="' .esc_url( $user_url ) .'">' . esc_html( $user_displayname ) . '</a>
     1175                                                </p>';
     1176                        $content .= '<p class="bp-member-nickname">
     1177                                                        <a href="' .esc_url( $user_mentionname_url ) . '">@' . esc_html( $user_mentionname ) . '</a>
     1178                                                </p>';
     1179                                               
     1180                        $content .= sprintf(
     1181                                        '<div class="bp-profile-button">
     1182                                                <a href="%1$s" class="button large primary button-primary" role="button">%2$s</a>
     1183                                        </div>',
     1184                                        esc_url( $user_url ),
     1185                                        $action_button_text
     1186                                );
     1187                        $content .= '</div>';
     1188                        $content .= '</div>';
     1189                       
     1190                }
     1191        }
     1192       
     1193        /*
     1194          * Joined Group Activity Type
     1195          */
     1196         
     1197         if ( isset( $activity->type ) && 'joined_group' === $activity->type ) {       
     1198         
     1199                $group                          = groups_get_group( array( 'group_id' => $activity->item_id ) );
     1200                $group_name                     = $group->name;
     1201                $group_url              = bp_get_group_permalink( $group );
     1202                $group_cover_image      = bp_get_group_cover_url( $group );             
     1203                $action_button_text = esc_html__( 'Visit Group', 'buddypress');
     1204               
     1205                $group_avatar_url       = bp_core_fetch_avatar(
     1206                                                                array(
     1207                                                                        'item_id'    => $group->id,
     1208                                                                        'avatar_dir' => 'group-avatars',
     1209                                                                        'object'     => 'group',
     1210                                                                        'type'       => 'full',
     1211                                                                        'html'       => false,                                                                 
     1212                                                                        'width'      => 150,
     1213                                                                        'height'     => 150,
     1214                                                                )
     1215                                                        );
     1216               
     1217                if ( $group_avatar_url ) {
     1218                        $content = '<div class="bp-group-activity-preview">';
     1219                        $content .= '<a href="' . esc_url( $group_url ) . '">
     1220                                                        <div class="bp-group-preview-cover">';
     1221                        if ( $group_cover_image != '') {
     1222                                $content .= '<img src="' . esc_url( $group_cover_image ) . '" alt="cover-image"/>';
     1223                        }
     1224                        $content .= '</div></a>';
     1225                        $content .= '<div class="bp-group-short-description">';
     1226                        $content .= '<div class="bp-group-avatar-content">';
     1227                        $content .= '<img src="' . esc_url( $group_avatar_url ) . '" class="group-photo aligncenter" width="150" height="150">';
     1228                        $content .= '</div>';
     1229                        $content .= '<p class="bp-group-short-description-title">
     1230                                                        <a href="' .esc_url( $group_url ) .'">' . esc_html( $group_name ) . '</a>
     1231                                                </p>';                 
     1232                                               
     1233                        $content .= sprintf(
     1234                                        '<div class="bp-profile-button">
     1235                                                <a href="%1$s" class="button large primary button-primary" role="button">%2$s</a>
     1236                                        </div>',
     1237                                        esc_url( $group_url ),
     1238                                        $action_button_text
     1239                                );
     1240                        $content .= '</div>';
     1241                        $content .= '</div>';
     1242                       
     1243                }
     1244         
     1245         }
     1246        return $content;       
     1247}
  • src/bp-activity/bp-activity-template.php

    diff --git src/bp-activity/bp-activity-template.php src/bp-activity/bp-activity-template.php
    index 16ee47d86..f2ecca6fa 100644
    function bp_activity_content_body() { 
    14301430function bp_activity_has_content() {
    14311431        global $activities_template;
    14321432
    1433         if ( ! empty( $activities_template->activity->content ) ) {
    1434                 return true;
    1435         }
     1433        $has_content = ! empty( $activities_template->activity->content );
     1434        if ( ! $has_content ) {
     1435                if ( 'new_avatar' === bp_get_activity_type() ) {
     1436                       
     1437                        $avatars = bp_avatar_get_version_src( bp_get_activity_user_id(), bp_get_activity_date_recorded() );
     1438
     1439                        if ( $avatars && 1 === count( $avatars ) ) {
     1440                                $avatar            = reset( $avatars );
     1441                                $historical_avatar = trailingslashit( $avatar->parent_dir_url ) . $avatar->name;
     1442
     1443                                // Add historical avatar to the current activity.
     1444                                $activities_template->activity->historical_avatar = $historical_avatar;
     1445
     1446                                // Update the corresponding entry into the activities template global.
     1447                                $activity_id    = $activities_template->activity->id;
     1448                                $activity_index = 0;
     1449                                while ( (int) $activities_template->activities[ $activity_index ]->id !== (int) $activity_id ) {
     1450                                        $activity_index++;
     1451                                }
    14361452
    1437         return false;
     1453                                $activities_template->activities[ $activity_index ]->historical_avatar = $historical_avatar;
     1454
     1455                                // Force the content to be displayed.
     1456                                $has_content = true;
     1457                        }
     1458                }
     1459               
     1460                if ( 'friendship_created' === bp_get_activity_type() ) {                       
     1461                        $has_content = true;
     1462                }
     1463               
     1464                if ( 'joined_group' === bp_get_activity_type() ) {                     
     1465                        $has_content = true;
     1466                }
     1467        }
     1468               
     1469        return $has_content;
    14381470}
    14391471
    14401472/**
  • src/bp-core/bp-core-attachments.php

    diff --git src/bp-core/bp-core-attachments.php src/bp-core/bp-core-attachments.php
    index e99ed0c14..a74069de5 100644
    function bp_attachments_create_item_type( $type = 'avatar', $args = array() ) { 
    409409
    410410        // It's an avatar, we need to crop it.
    411411        if ( 'avatar' === $type ) {
    412                 $created = bp_core_avatar_handle_crop( array(
    413                         'object'        => $r['object'],
    414                         'avatar_dir'    => trim( dirname( $attachment_data['subdir'] ), '/' ),
    415                         'item_id'       => (int) $r['item_id'],
    416                         'original_file' => trailingslashit( $attachment_data['subdir'] ) . $image_file_name,
    417                         'crop_w'        => $r['crop_w'],
    418                         'crop_h'        => $r['crop_h'],
    419                         'crop_x'        => $r['crop_x'],
    420                         'crop_y'        => $r['crop_y']
    421                 ) );
     412                $created = bp_core_avatar_handle_crop(
     413                        array(
     414                                'object'        => $r['object'],
     415                                'avatar_dir'    => trim( dirname( $attachment_data['subdir'] ), '/' ),
     416                                'item_id'       => (int) $r['item_id'],
     417                                'original_file' => trailingslashit( $attachment_data['subdir'] ) . $image_file_name,
     418                                'crop_w'        => $r['crop_w'],
     419                                'crop_h'        => $r['crop_h'],
     420                                'crop_x'        => $r['crop_x'],
     421                                'crop_y'        => $r['crop_y']
     422                        )
     423                );
    422424
    423425        // It's a cover image we need to fit it to feature's dimensions.
    424426        } elseif ( 'cover_image' === $type ) {
    425                 $cover_image = bp_attachments_cover_image_generate_file( array(
    426                         'file'            => $image_file_path,
    427                         'component'       => $r['component'],
    428                         'cover_image_dir' => $attachment_data['path']
    429                 ) );
     427                $cover_image = bp_attachments_cover_image_generate_file(
     428                        array(
     429                                'file'            => $image_file_path,
     430                                'component'       => $r['component'],
     431                                'cover_image_dir' => $attachment_data['path']
     432                        )
     433                );
    430434
    431435                $created = ! empty( $cover_image['cover_file'] );
    432436        }
    function bp_attachments_cover_image_ajax_delete() { 
    15971601        }
    15981602}
    15991603add_action( 'wp_ajax_bp_cover_image_delete', 'bp_attachments_cover_image_ajax_delete' );
     1604
     1605/**
     1606 * List the files of a directory.
     1607 *
     1608 * @since 10.0.0
     1609 *
     1610 * @param string $directory_path Absolute path of a directory.
     1611 * @return array The list of the files inside the directory.
     1612 */
     1613function bp_attachments_list_directory_files( $directory_path = '' ) {
     1614        if ( ! is_dir( $directory_path ) ) {
     1615                return array();
     1616        }
     1617
     1618        $files    = array();
     1619        $iterator = new FilesystemIterator( $directory_path, FilesystemIterator::SKIP_DOTS );
     1620
     1621        foreach ( $iterator as $file ) {
     1622                $_file = new stdClass();
     1623
     1624                $_file->name               = $file->getfilename();
     1625                $_file->path               = $file->getPathname();
     1626                $_file->size               = $file->getSize();
     1627                $_file->type               = $file->getType();
     1628                $_file->mime_type          = mime_content_type( $_file->path );
     1629                $_file->last_modified      = $file->getMTime();
     1630                $_file->latest_access_date = $file->getATime();
     1631                $_file->id                 = pathinfo( $_file->name, PATHINFO_FILENAME );
     1632                $files[ $_file->id ]       = $_file;
     1633        }
     1634
     1635        return $files;
     1636}
     1637
     1638/**
     1639 * List the files of a directory recursively and eventually find a file using its ID.
     1640 *
     1641 * @since 10.0.0
     1642 *
     1643 * @param string $directory_path Absolute path of a directory.
     1644 * @param string $find           The file ID to find into the directory or its children.
     1645 * @return array The list of the files.
     1646 */
     1647function bp_attachments_list_directory_files_recursively( $directory_path = '', $find = '' ) {
     1648        if ( ! is_dir( $directory_path ) ) {
     1649                return array();
     1650        }
     1651
     1652        $files     = array();
     1653        $directory = new RecursiveDirectoryIterator( $directory_path, FilesystemIterator::SKIP_DOTS );
     1654        $iterator  = new RecursiveIteratorIterator( $directory, RecursiveIteratorIterator::CHILD_FIRST );
     1655        $bp_upload = bp_upload_dir();
     1656
     1657        foreach ( $iterator as $file ) {
     1658                $_file = new stdClass();
     1659
     1660                $_file->name               = $file->getfilename();
     1661                $_file->path               = $file->getPathname();
     1662                $_file->size               = $file->getSize();
     1663                $_file->type               = $file->getType();
     1664                $_file->mime_type          = mime_content_type( $_file->path );
     1665                $_file->last_modified      = $file->getMTime();
     1666                $_file->latest_access_date = $file->getATime();
     1667                $_file->parent_dir_path    = dirname( $_file->path );
     1668                $_file->parent_dir_url     = str_replace( $bp_upload['basedir'], $bp_upload['baseurl'], $_file->parent_dir_path );
     1669                $_file->id                 = pathinfo( $_file->name, PATHINFO_FILENAME );
     1670
     1671                // Ensure URL is https if SSL is set/forced.
     1672                if ( is_ssl() ) {
     1673                        $_file->parent_dir_url = str_replace( 'http://', 'https://', $_file->parent_dir_url );
     1674                }
     1675
     1676                $file_id = $_file->id;
     1677                if ( $_file->parent_dir_path !== $directory_path ) {
     1678                        $file_id = trailingslashit( str_replace( trailingslashit( $directory_path ), '', $_file->parent_dir_path ) ) . $file_id;
     1679                }
     1680
     1681                $files[ $file_id ] = $_file;
     1682        }
     1683
     1684        if ( $find ) {
     1685                return wp_filter_object_list( $files, array( 'id' => $find ) );
     1686        }
     1687
     1688        return $files;
     1689}
  • src/bp-core/bp-core-avatars.php

    diff --git src/bp-core/bp-core-avatars.php src/bp-core/bp-core-avatars.php
    index 301c6bfdc..7336c6d3b 100644
    add_action( 'wp_ajax_bp_avatar_upload', 'bp_avatar_ajax_upload' ); 
    11761176 * Handle avatar webcam capture.
    11771177 *
    11781178 * @since 2.3.0
     1179 * @since 10.0.0 Adds the `$return` param to eventually return the crop result.
    11791180 *
    11801181 * @param string $data    Base64 encoded image.
    11811182 * @param int    $item_id Item to associate.
    1182  * @return bool True on success, false on failure.
     1183 * @param string $return  Whether to get the crop `array` or a `boolean`. Defaults to `boolean`.
     1184 * @return array|bool True on success, false on failure.
    11831185 */
    1184 function bp_avatar_handle_capture( $data = '', $item_id = 0 ) {
     1186function bp_avatar_handle_capture( $data = '', $item_id = 0, $return = 'boolean' ) {
    11851187        if ( empty( $data ) || empty( $item_id ) ) {
    11861188                return false;
    11871189        }
    function bp_avatar_handle_capture( $data = '', $item_id = 0 ) { 
    12371239                // Crop to default values.
    12381240                $crop_args = array( 'item_id' => $item_id, 'original_file' => $avatar_to_crop, 'crop_x' => 0, 'crop_y' => 0 );
    12391241
     1242                if ( 'array' === $return ) {
     1243                        return bp_core_avatar_handle_crop( $crop_args, 'array' );
     1244                }
     1245
    12401246                return bp_core_avatar_handle_crop( $crop_args );
    12411247        } else {
    12421248                return false;
    function bp_avatar_handle_capture( $data = '', $item_id = 0 ) { 
    12471253 * Crop an uploaded avatar.
    12481254 *
    12491255 * @since 1.1.0
     1256 * @since 10.0.0 Adds the `$return` param to eventually return the crop result.
    12501257 *
    12511258 * @param array|string $args {
    12521259 *     Array of function parameters.
    function bp_avatar_handle_capture( $data = '', $item_id = 0 ) { 
    12651272 *     @type int         $crop_x        The horizontal starting point of the crop. Default: 0.
    12661273 *     @type int         $crop_y        The vertical starting point of the crop. Default: 0.
    12671274 * }
    1268  * @return bool True on success, false on failure.
     1275 * @param string       $return Whether to get the crop `array` or a `boolean`. Defaults to `boolean`.
     1276 * @return array|bool True or the crop result on success, false on failure.
    12691277 */
    1270 function bp_core_avatar_handle_crop( $args = '' ) {
     1278function bp_core_avatar_handle_crop( $args = '', $return = 'boolean' ) {
    12711279
    12721280        $r = bp_parse_args(
    12731281                $args,
    function bp_core_avatar_handle_crop( $args = '' ) { 
    13061314                return false;
    13071315        }
    13081316
     1317        if ( 'array' === $return ) {
     1318                return $cropped;
     1319        }
     1320
    13091321        return true;
    13101322}
    13111323
    function bp_avatar_ajax_set() { 
    13521364                        $webcam_avatar = base64_decode( $webcam_avatar );
    13531365                }
    13541366
    1355                 if ( ! bp_avatar_handle_capture( $webcam_avatar, $avatar_data['item_id'] ) ) {
     1367                $cropped_webcam_avatar = bp_avatar_handle_capture( $webcam_avatar, $avatar_data['item_id'], 'array' );
     1368
     1369                if ( ! $cropped_webcam_avatar ) {
    13561370                        wp_send_json_error( array(
    13571371                                'feedback_code' => 1
    13581372                        ) );
    13591373
    13601374                } else {
    13611375                        $return = array(
    1362                                 'avatar' => esc_url( bp_core_fetch_avatar( array(
    1363                                         'object'  => $avatar_data['object'],
    1364                                         'item_id' => $avatar_data['item_id'],
    1365                                         'html'    => false,
    1366                                         'type'    => 'full',
    1367                                 ) ) ),
     1376                                'avatar' => esc_url(
     1377                                        bp_core_fetch_avatar(
     1378                                                array(
     1379                                                        'object'  => $avatar_data['object'],
     1380                                                        'item_id' => $avatar_data['item_id'],
     1381                                                        'html'    => false,
     1382                                                        'type'    => 'full',
     1383                                                )
     1384                                        )
     1385                                ),
    13681386                                'feedback_code' => 2,
    13691387                                'item_id'       => $avatar_data['item_id'],
    13701388                        );
    function bp_avatar_ajax_set() { 
    13761394                         * Fires if the new avatar was successfully captured.
    13771395                         *
    13781396                         * @since 6.0.0
     1397                         * @since 10.0.0 Adds a new param: an array containing the full, thumb avatar and the timestamp.
    13791398                         *
    1380                          * @param string $item_id     Inform about the user id the avatar was set for.
    1381                          * @param string $type        Inform about the way the avatar was set ('camera').
    1382                          * @param array  $avatar_data Array of parameters passed to the avatar handler.
     1399                         * @param string $item_id               Inform about the user id the avatar was set for.
     1400                         * @param string $type                  Inform about the way the avatar was set ('camera').
     1401                         * @param array  $avatar_data           Array of parameters passed to the crop handler.
     1402                         * @param array  $cropped_webcam_avatar Array containing the full, thumb avatar and the timestamp.
    13831403                         */
    1384                         do_action( 'bp_members_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $avatar_data );
     1404                        do_action( 'bp_members_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $avatar_data, $cropped_webcam_avatar );
    13851405
    13861406                        wp_send_json_success( $return );
    13871407                }
    function bp_avatar_ajax_set() { 
    14131433        );
    14141434
    14151435        // Handle crop.
    1416         if ( bp_core_avatar_handle_crop( $r ) ) {
     1436        $cropped_avatar = bp_core_avatar_handle_crop( $r, 'array' );
     1437
     1438        if ( $cropped_avatar ) {
    14171439                $return = array(
    1418                         'avatar' => esc_url( bp_core_fetch_avatar( array(
    1419                                 'object'  => $avatar_data['object'],
    1420                                 'item_id' => $avatar_data['item_id'],
    1421                                 'html'    => false,
    1422                                 'type'    => 'full',
    1423                         ) ) ),
     1440                        'avatar' => esc_url(
     1441                                bp_core_fetch_avatar(
     1442                                        array(
     1443                                                'object'  => $avatar_data['object'],
     1444                                                'item_id' => $avatar_data['item_id'],
     1445                                                'html'    => false,
     1446                                                'type'    => 'full',
     1447                                        )
     1448                                )
     1449                        ),
    14241450                        'feedback_code' => 2,
    14251451                        'item_id'       => $avatar_data['item_id'],
    14261452                );
    function bp_avatar_ajax_set() { 
    14301456                        do_action_deprecated( 'xprofile_avatar_uploaded', array( (int) $avatar_data['item_id'], $avatar_data['type'], $r ), '6.0.0', 'bp_members_avatar_uploaded' );
    14311457
    14321458                        /** This action is documented in bp-core/bp-core-avatars.php */
    1433                         do_action( 'bp_members_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $r );
     1459                        do_action( 'bp_members_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $r, $cropped_avatar );
    14341460                } elseif ( 'group' === $avatar_data['object'] ) {
    14351461                        /** This action is documented in bp-groups/bp-groups-screens.php */
    1436                         do_action( 'groups_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $r );
     1462                        do_action( 'groups_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $r, $cropped_avatar );
    14371463                }
    14381464
    14391465                wp_send_json_success( $return );
    function bp_avatar_template_check() { 
    21222148                bp_attachments_get_template_part( 'avatars/index' );
    21232149        }
    21242150}
     2151
     2152/**
     2153 * Get a specific version of an avatar from its history
     2154 *
     2155 * @since 10.0.0
     2156 *
     2157 * @param int        $user_id   The user ID we need the avatar version for.
     2158 * @param int|string $timestamp An integer Unix timestamp or a date string of the format 'Y-m-d h:i:s'.
     2159 * @param string     $type      The type of avatar we need. Possible values are `thumb` and `full`.
     2160 * @return array                A list of matching results, an empty array if no avatars were found.
     2161 */
     2162function bp_avatar_get_version_src( $user_id = 0, $timestamp = '', $type = 'full' ) {
     2163        if ( ! $user_id || ! $timestamp ) {
     2164                return array();
     2165        }
     2166
     2167        if ( ! is_numeric( $timestamp ) ) {
     2168                $timestamp = strtotime( $timestamp );
     2169        }
     2170
     2171        $avatar_id = $timestamp . '-bpfull';
     2172        if ( 'full' !== $type ) {
     2173                $avatar_id = $timestamp . '-bpthumb';
     2174        }
     2175
     2176        // The user avatar directory we are looking into to get the avatar url.
     2177        $user_avatar_dir = trailingslashit( bp_core_avatar_upload_path() ) . 'avatars/' . $user_id;
     2178
     2179        return bp_attachments_list_directory_files_recursively( $user_avatar_dir, $avatar_id );
     2180}
  • src/bp-core/classes/class-bp-attachment-avatar.php

    diff --git src/bp-core/classes/class-bp-attachment-avatar.php src/bp-core/classes/class-bp-attachment-avatar.php
    index d95ad4c4c..f13188bdd 100644
    class BP_Attachment_Avatar extends BP_Attachment { 
    199199         * @see  BP_Attachment::crop for the list of parameters
    200200         *
    201201         * @param array $args Array of arguments for the cropping.
    202          * @return array The cropped avatars (full and thumb).
     202         * @return array The cropped avatars (full, thumb and the timestamp).
    203203         */
    204204        public function crop( $args = array() ) {
    205205                // Bail if the original file is missing.
    class BP_Attachment_Avatar extends BP_Attachment { 
    255255
    256256                /**
    257257                 * Check that the new avatar doesn't have the same name as the
    258                  * old one before deleting
     258                 * old one before moving the previous one into history.
    259259                 */
    260260                if ( ! empty( $existing_avatar ) && $existing_avatar !== $this->url . $relative_path ) {
    261                         bp_core_delete_existing_avatar( array( 'object' => $args['object'], 'item_id' => $args['item_id'], 'avatar_path' => $avatar_folder_dir ) );
     261                        // Add a new revision for the existing avatar.
     262                        $avatars = bp_attachments_list_directory_files( $avatar_folder_dir );
     263
     264                        if ( $avatars ) {
     265                                foreach ( $avatars as $avatar_file ) {
     266                                        if ( ! isset( $avatar_file->name, $avatar_file->id, $avatar_file->path ) ) {
     267                                                continue;
     268                                        }
     269
     270                                        $is_full  = preg_match( "/-bpfull/", $avatar_file->name );
     271                                        $is_thumb = preg_match( "/-bpthumb/", $avatar_file->name );
     272
     273                                        if ( $is_full || $is_thumb ) {
     274                                                $revision = $this->add_revision(
     275                                                        'avatar',
     276                                                        array(
     277                                                                'file_abspath' => $avatar_file->path,
     278                                                                'file_id'      => $avatar_file->id,
     279                                                        )
     280                                                );
     281
     282                                                if ( is_wp_error( $revision ) ) {
     283                                                        error_log( $revision->get_error_message() );
     284                                                }
     285                                        }
     286                                }
     287                        }
    262288                }
    263289
    264290                // Make sure we at least have minimal data for cropping.
    class BP_Attachment_Avatar extends BP_Attachment { 
    272298
    273299                // Get the file extension.
    274300                $data = @getimagesize( $absolute_path );
    275                 $ext  = $data['mime'] == 'image/png' ? 'png' : 'jpg';
     301                $ext  = $data['mime'] === 'image/png' ? 'png' : 'jpg';
    276302
    277303                $args['original_file'] = $absolute_path;
    278304                $args['src_abs']       = false;
    279                 $avatar_types = array( 'full' => '', 'thumb' => '' );
     305
     306                $avatar_types = array(
     307                        'full'  => '',
     308                        'thumb' => '',
     309                );
     310                $timestamp   = bp_core_current_time( false, 'timestamp' );
    280311
    281312                foreach ( $avatar_types as $key_type => $type ) {
    282313                        if ( 'thumb' === $key_type ) {
    class BP_Attachment_Avatar extends BP_Attachment { 
    287318                                $args['dst_h'] = bp_core_avatar_full_height();
    288319                        }
    289320
    290                         $filename         = wp_unique_filename( $avatar_folder_dir, uniqid() . "-bp{$key_type}.{$ext}" );
     321                        $filename         = wp_unique_filename( $avatar_folder_dir, $timestamp . "-bp{$key_type}.{$ext}" );
    291322                        $args['dst_file'] = $avatar_folder_dir . '/' . $filename;
    292323
    293324                        $avatar_types[ $key_type ] = parent::crop( $args );
    class BP_Attachment_Avatar extends BP_Attachment { 
    296327                // Remove the original.
    297328                @unlink( $absolute_path );
    298329
    299                 // Return the full and thumb cropped avatars.
    300                 return $avatar_types;
     330                // Return the full, thumb cropped avatars and the timestamp.
     331                return array_merge(
     332                        $avatar_types,
     333                        array(
     334                                'timestamp' => $timestamp,
     335                        )
     336                );
    301337        }
    302338
    303339        /**
  • src/bp-core/classes/class-bp-attachment.php

    diff --git src/bp-core/classes/class-bp-attachment.php src/bp-core/classes/class-bp-attachment.php
    index 9362a6c12..248c44946 100644
    abstract class BP_Attachment { 
    559559                return $script_data;
    560560        }
    561561
     562        /**
     563         * Adds a new revision of a file.
     564         *
     565         * @since 10.0.0
     566         *
     567         * @param string $attachment_type The attachement type (eg: avatar).
     568         * @param array $args {
     569         *     @type string $file_abspath The source file (absolute path) for the attachment.
     570         *     @type string $file_id      Optional. The file ID to use as a suffix for the revision directory.
     571         * }
     572         * @return object|WP_Error An object informing about the URL an Path to a revision file, a WP_Error object on failure.
     573         */
     574        public function add_revision( $attachment_type, $args = array() ) {
     575                $r = bp_parse_args(
     576                        $args,
     577                        array(
     578                                'file_abspath' => '',
     579                                'file_id'      => '',
     580                        ),
     581                        'attachment_' . $attachment_type . '_add_revision'
     582                );
     583
     584                if ( ! $r['file_abspath'] ) {
     585                        return new WP_Error( 'missing_parameter', __( 'The absolute path to your file is missing.', 'buddypress' ) );
     586
     587                        // Make sure it's coming from an uploaded file.
     588                } elseif ( false === strpos( $r['file_abspath'], $this->upload_path ) ) {
     589                        return new WP_Error( 'forbidden_path', __( 'The absolute path to your file is not allowed.', 'buddypress' ) );
     590
     591                } else {
     592                        $filepath = $r['file_abspath'];
     593                }
     594
     595                $dirname  = trailingslashit( dirname( $filepath ) );
     596                $filename = sanitize_file_name( wp_basename( $filepath ) );
     597
     598                if ( ! $r['file_id'] ) {
     599                        $r['file_id'] = $filename;
     600                }
     601
     602                $file_id = wp_hash( $r['file_id'] );
     603
     604                // Set the revision name & dir.
     605                $revision_name = '';
     606                $revision_dir  = $dirname . '._revisions_' . $file_id;
     607
     608                // Avatars and Cover Images are specific attachments.
     609                if ( 'avatar' === $attachment_type || 'cover_image' === $attachment_type ) {
     610                        $revision_dir  = $dirname . 'history';
     611                }
     612
     613                // Create the revision directory if it doesn't exist yet.
     614                if ( ! is_dir( $revision_dir ) ) {
     615                        mkdir( $revision_dir );
     616                }
     617
     618                $revision_name = wp_unique_filename( $revision_dir, $filename );
     619                $revision_path = trailingslashit( $revision_dir ) . $revision_name;
     620
     621                if ( ! rename( $filepath, $revision_path ) ) {
     622                        return new WP_Error( 'missing_parameter', __( 'An unexpected error occured while adding the revision.', 'buddypress' ) );
     623                }
     624
     625                return (object) array(
     626                        'url'  => str_replace( trailingslashit( $this->upload_path ), trailingslashit( $this->url ), $revision_path ),
     627                        'path' => $revision_path,
     628                );
     629        }
     630
    562631        /**
    563632         * Get full data for an image
    564633         *
  • src/bp-groups/actions/create.php

    diff --git src/bp-groups/actions/create.php src/bp-groups/actions/create.php
    index 132429bd1..54e2cc589 100644
    function groups_action_create_group() { 
    270270                                'crop_h'        => $_POST['h']
    271271                        );
    272272
    273                         if ( ! bp_core_avatar_handle_crop( $args ) ) {
     273                        $cropped_avatar = bp_core_avatar_handle_crop( $args, 'array' );
     274
     275                        if ( ! $cropped_avatar ) {
    274276                                bp_core_add_message( __( 'There was an error saving the group profile photo, please try uploading again.', 'buddypress' ), 'error' );
    275277                        } else {
    276278                                /**
    277279                                 * Fires after a group avatar is uploaded.
    278280                                 *
    279281                                 * @since 2.8.0
     282                                 * @since 10.0.0 Adds a new param: an array containing the full, thumb avatar and the timestamp.
    280283                                 *
    281                                  * @param int    $group_id ID of the group.
    282                                  * @param string $type     Avatar type. 'crop' or 'full'.
    283                                  * @param array  $args     Array of parameters passed to the avatar handler.
     284                                 * @param int    $group_id       ID of the group.
     285                                 * @param string $type           Avatar type. 'crop' or 'camera'.
     286                                 * @param array  $args           Array of parameters passed to the crop handler.
     287                                 * @param array  $cropped_avatar Array containing the full, thumb avatar and the timestamp.
    284288                                 */
    285                                 do_action( 'groups_avatar_uploaded', bp_get_current_group_id(), 'crop', $args );
     289                                do_action( 'groups_avatar_uploaded', bp_get_current_group_id(), 'crop', $args, $cropped_avatar );
    286290
    287291                                bp_core_add_message( __( 'The group profile photo was uploaded successfully.', 'buddypress' ) );
    288292                        }
  • src/bp-groups/screens/single/admin/group-avatar.php

    diff --git src/bp-groups/screens/single/admin/group-avatar.php src/bp-groups/screens/single/admin/group-avatar.php
    index 3e2927a1e..57fc59451 100644
    function groups_screen_group_admin_avatar() { 
    7474                        'crop_h'        => $_POST['h']
    7575                );
    7676
    77                 if ( !bp_core_avatar_handle_crop( $args ) ) {
     77                $cropped_avatar = bp_core_avatar_handle_crop( $args, 'array' );
     78
     79                if ( ! $cropped_avatar ) {
    7880                        bp_core_add_message( __( 'There was a problem cropping the group profile photo.', 'buddypress' ), 'error' );
    7981                } else {
    8082                        /**
    8183                         * Fires after a group avatar is uploaded.
    8284                         *
    8385                         * @since 2.8.0
     86                         * @since 10.0.0 Adds a new param: an array containing the full, thumb avatar and the timestamp.
    8487                         *
    85                          * @param int    $group_id ID of the group.
    86                          * @param string $type     Avatar type. 'crop' or 'full'.
    87                          * @param array  $args     Array of parameters passed to the avatar handler.
     88                         * @param int    $group_id       ID of the group.
     89                         * @param string $type           Avatar type. 'crop' or 'camera'.
     90                         * @param array  $args           Array of parameters passed to the avatar handler.
     91                         * @param array  $cropped_avatar Array containing the full, thumb avatar and the timestamp.
    8892                         */
    89                         do_action( 'groups_avatar_uploaded', bp_get_current_group_id(), 'crop', $args );
     93                        do_action( 'groups_avatar_uploaded', bp_get_current_group_id(), 'crop', $args, $cropped_avatar );
    9094                        bp_core_add_message( __( 'The new group profile photo was uploaded successfully.', 'buddypress' ) );
    9195                }
    9296        }
    function groups_screen_group_admin_avatar() { 
    109113         */
    110114        bp_core_load_template( apply_filters( 'groups_template_group_admin_avatar', 'groups/single/home' ) );
    111115}
    112 add_action( 'bp_screens', 'groups_screen_group_admin_avatar' );
    113  No newline at end of file
     116add_action( 'bp_screens', 'groups_screen_group_admin_avatar' );
  • src/bp-members/bp-members-activity.php

    diff --git src/bp-members/bp-members-activity.php src/bp-members/bp-members-activity.php
    index 890ff2317..1645c1542 100644
    add_action( 'bp_core_activated_user', 'bp_core_new_user_activity' ); 
    166166 * Adds an activity stream item when a user has uploaded a new avatar.
    167167 *
    168168 * @since 8.0.0
     169 * @since 10.0.0 Adds the `$type`, `$crop_data` and `$cropped_avatar` parameters.
    169170 *
    170  * @param int $user_id The user id the avatar was set for.
     171 * @param int    $user_id        The user id the avatar was set for.
     172 * @param string $type           The way the avatar was set ('camera' or `crop`).
     173 * @param array  $crop_data      Array of parameters passed to the crop handler.
     174 * @param array  $cropped_avatar Array containing the full, thumb avatar and the timestamp.
    171175 */
    172 function bp_members_new_avatar_activity( $user_id = 0 ) {
     176function bp_members_new_avatar_activity( $user_id = 0, $type = '', $crop_data = array(), $cropped_avatar = array() ) {
    173177
    174178        // Bail if activity component is not active.
    175179        if ( ! bp_is_active( 'activity' ) ) {
    function bp_members_new_avatar_activity( $user_id = 0 ) { 
    230234                }
    231235        }
    232236
     237        $recorded_time = '';
     238        if ( isset( $cropped_avatar['timestamp'] ) && $cropped_avatar['timestamp'] ) {
     239                $recorded_time = date( 'Y-m-d H:i:s', $cropped_avatar['timestamp'] );
     240        }
     241
    233242        // Add the activity.
    234         bp_activity_add(
     243        $activity_id = bp_activity_add(
    235244                array(
    236                         'user_id'   => $user_id,
    237                         'component' => $bp->members->id,
    238                         'type'      => 'new_avatar',
     245                        'user_id'       => $user_id,
     246                        'component'     => $bp->members->id,
     247                        'type'          => 'new_avatar',
     248                        'recorded_time' => $recorded_time,
    239249                )
    240250        );
    241251}
    242 add_action( 'bp_members_avatar_uploaded', 'bp_members_new_avatar_activity' );
     252add_action( 'bp_members_avatar_uploaded', 'bp_members_new_avatar_activity', 10, 4 );
  • src/bp-members/screens/change-avatar.php

    diff --git src/bp-members/screens/change-avatar.php src/bp-members/screens/change-avatar.php
    index 5c4bcf440..6a421ec77 100644
    function bp_members_screen_change_avatar() { 
    6161                        'crop_h'        => $_POST['h']
    6262                );
    6363
    64                 if ( ! bp_core_avatar_handle_crop( $args ) ) {
     64                // Handle crop.
     65                $cropped_avatar = bp_core_avatar_handle_crop( $r, 'array' );
     66
     67                if ( ! $cropped_avatar ) {
    6568                        bp_core_add_message( __( 'There was a problem cropping your profile photo.', 'buddypress' ), 'error' );
    6669                } else {
    6770
    function bp_members_screen_change_avatar() { 
    7275                         * Fires right before the redirect, after processing a new avatar.
    7376                         *
    7477                         * @since 6.0.0
     78                         * @since 10.0.0 Adds a new param: an array containing the full, thumb avatar and the timestamp.
    7579                         *
    76                          * @param string $item_id Inform about the user id the avatar was set for.
    77                          * @param string $value   Inform about the way the avatar was set ('crop').
     80                         * @param string $item_id        Inform about the user id the avatar was set for.
     81                         * @param string $type           Inform about the way the avatar was set ('camera').
     82                         * @param array  $args           Array of parameters passed to the crop handler.
     83                         * @param array  $cropped_avatar Array containing the full, thumb avatar and the timestamp.
    7884                         */
    79                         do_action( 'bp_members_avatar_uploaded', (int) $args['item_id'], 'crop' );
     85                        do_action( 'bp_members_avatar_uploaded', (int) $args['item_id'], 'crop', $args, $cropped_avatar );
    8086
    8187                        bp_core_add_message( __( 'Your new profile photo was uploaded successfully.', 'buddypress' ) );
    8288                        bp_core_redirect( bp_displayed_user_domain() );
  • src/bp-templates/bp-legacy/css/buddypress-rtl.css

    diff --git src/bp-templates/bp-legacy/css/buddypress-rtl.css src/bp-templates/bp-legacy/css/buddypress-rtl.css
    index d99591d63..f08797e2d 100644
    Hello, this is the BuddyPress Legacy stylesheet. 
    3030        4.1 - Smartphones Landscape
    3131        4.2 - Smartphones Portrait
    3232        4.3 - Smartphones - smaller screen sizes
     335.0 - Activity Types.
    3334--------------------------------------------------------------*/
    3435
    3536/*--------------------------------------------------------------
    body.register #buddypress div.page ul { 
    22812282                margin: 10px 0 20px;
    22822283        }
    22832284}
     2285
     2286/*--------------------------------------------------------------
     22875.0 - Activity Types
     2288--------------------------------------------------------------*/
     2289.bp-member-preview-cover,
     2290.bp-group-preview-cover {
     2291        position: relative;
     2292        min-height: 150px;
     2293        background: #c5c5c5;
     2294}
     2295
     2296.bp-member-preview-cover img,
     2297.bp-group-preview-cover img {
     2298        background: #c5c5c5;
     2299        object-fit: cover;
     2300        border: 0;
     2301        display: block;
     2302        margin: 0;
     2303        padding: 0;
     2304        width: 100%;
     2305        z-index: 1;
     2306        height: 150px;
     2307}
     2308
     2309.bp-member-avatar-content,
     2310.bp-group-avatar-content {
     2311    float: right;
     2312        width: 200px;
     2313        margin-top: -75px;
     2314        position: relative;
     2315        z-index: 2;
     2316}
     2317
     2318.bp-member-avatar-content img.profile-photo,
     2319.bp-group-avatar-content img.group-photo {
     2320        border: solid 2px #fff;
     2321        background: rgba(255, 255, 255, 0.8);
     2322        margin-right: 20px;
     2323}
     2324
     2325.bp-member-short-description-title a,
     2326.bp-group-short-description-title a {
     2327        font-weight: 600;
     2328}
     2329
     2330@media screen and (max-width: 46.8em) {
     2331        .bp-member-short-description,
     2332        .bp-group-short-description {
     2333                text-align: center;
     2334        }
     2335        .bp-member-avatar-content,
     2336        .bp-group-avatar-content {
     2337        float: none;
     2338                width: 100%;
     2339        margin-right: auto;
     2340                margin-left: auto;
     2341                margin-bottom: 15px;
     2342        }
     2343        .bp-member-avatar-content img.profile-photo,
     2344        .bp-group-avatar-content img.group-photo {
     2345                margin: auto;
     2346        }
     2347        .bp-profile-button {
     2348                margin-top: 15px;
     2349        }
     2350}
     2351
     2352@media screen and (min-width: 46.8em) {
     2353        .bp-profile-button {
     2354                text-align: left;
     2355        }
     2356}
  • src/bp-templates/bp-legacy/css/buddypress.css

    diff --git src/bp-templates/bp-legacy/css/buddypress.css src/bp-templates/bp-legacy/css/buddypress.css
    index be7270d71..adaf3146a 100644
    Hello, this is the BuddyPress Legacy stylesheet. 
    3030        4.1 - Smartphones Landscape
    3131        4.2 - Smartphones Portrait
    3232        4.3 - Smartphones - smaller screen sizes
     335.0 - Activity Types.
    3334--------------------------------------------------------------*/
    3435
    3536/*--------------------------------------------------------------
    body.register #buddypress div.page ul { 
    22812282                margin: 10px 0 20px;
    22822283        }
    22832284}
     2285
     2286/*--------------------------------------------------------------
     22875.0 - Activity Types
     2288--------------------------------------------------------------*/
     2289.bp-member-preview-cover,
     2290.bp-group-preview-cover {
     2291        position: relative;
     2292        min-height: 150px;
     2293        background: #c5c5c5;
     2294}
     2295
     2296.bp-member-preview-cover img,
     2297.bp-group-preview-cover img {
     2298        background: #c5c5c5;
     2299        object-fit: cover;
     2300        border: 0;
     2301        display: block;
     2302        margin: 0;
     2303        padding: 0;
     2304        width: 100%;
     2305        z-index: 1;
     2306        height: 150px;
     2307}
     2308
     2309.bp-member-avatar-content,
     2310.bp-group-avatar-content {
     2311    float: left;
     2312        width: 200px;
     2313        margin-top: -75px;
     2314        position: relative;
     2315        z-index: 2;
     2316}
     2317
     2318.bp-member-avatar-content img.profile-photo,
     2319.bp-group-avatar-content img.group-photo {
     2320        border: solid 2px #fff;
     2321        background: rgba(255, 255, 255, 0.8);
     2322        margin-left: 20px;
     2323}
     2324
     2325.bp-member-short-description-title a,
     2326.bp-group-short-description-title a {
     2327        font-weight: 600;
     2328}
     2329
     2330@media screen and (max-width: 46.8em) {
     2331        .bp-member-short-description,
     2332        .bp-group-short-description {
     2333                text-align: center;
     2334        }
     2335        .bp-member-avatar-content,
     2336        .bp-group-avatar-content {
     2337        float: none;
     2338                width: 100%;
     2339        margin-left: auto;
     2340                margin-right: auto;
     2341                margin-bottom: 15px;
     2342        }
     2343        .bp-member-avatar-content img.profile-photo,
     2344        .bp-group-avatar-content img.group-photo {
     2345                margin: auto;
     2346        }
     2347        .bp-profile-button {
     2348                margin-top: 15px;
     2349        }
     2350}
     2351
     2352@media screen and (min-width: 46.8em) {
     2353        .bp-profile-button {
     2354                text-align: right;
     2355        }
     2356}
  • src/bp-templates/bp-legacy/css/embeds-activity-rtl.css

    diff --git src/bp-templates/bp-legacy/css/embeds-activity-rtl.css src/bp-templates/bp-legacy/css/embeds-activity-rtl.css
    index ac6fda0ee..ed6f56efa 100644
    a.play-btn:hover { 
    154154                width: 35px;
    155155        }
    156156}
     157
     158/**
     159*-------------------------------------------------------------------------------
     160* Activity Types
     161*-------------------------------------------------------------------------------
     162*/
     163.bp-member-preview-cover,
     164.bp-group-preview-cover {
     165        position: relative;
     166        min-height: 150px;
     167        background: #c5c5c5;
     168}
     169
     170.bp-member-activity-preview a,
     171.bp-group-activity-preview a {
     172    display: block;
     173    max-width: 100%;
     174}
     175
     176.bp-member-preview-cover img,
     177.bp-group-preview-cover img {
     178        background: #c5c5c5;
     179        object-fit: cover;
     180        border: 0;
     181        display: block;
     182        margin: 0;
     183        padding: 0;
     184        width: 100%;
     185        z-index: 1;
     186        height: 150px;
     187}
     188
     189.bp-member-avatar-content,
     190.bp-group-avatar-content {
     191    float: right;
     192        width: 200px;
     193        margin-top: -75px;
     194        position: relative;
     195        z-index: 2;
     196}
     197
     198.bp-member-avatar-content img.profile-photo,
     199.bp-group-avatar-content img.group-photo {
     200        border: solid 2px #fff;
     201        background: rgba(255, 255, 255, 0.8);
     202        margin-right: 20px;
     203}
     204
     205.bp-member-short-description-title a,
     206.bp-group-short-description-title a {
     207        font-weight: 600;
     208}
     209
     210@media screen and (max-width: 46.8em) {
     211        .bp-member-short-description,
     212        .bp-group-short-description {
     213                text-align: center;
     214        }
     215        .bp-member-avatar-content,
     216        .bp-group-avatar-content {
     217        float: none;
     218                width: 100%;
     219        margin-right: auto;
     220                margin-left: auto;
     221                margin-bottom: 15px;
     222        }
     223        .bp-member-avatar-content img.profile-photo,
     224        .bp-group-avatar-content img.group-photo {
     225                margin: auto;
     226        }
     227        .bp-profile-button {
     228                margin-top: 15px;
     229        }
     230}
     231
     232@media screen and (min-width: 46.8em) {
     233        .bp-profile-button {
     234                text-align: left;
     235        }
     236}
  • src/bp-templates/bp-legacy/css/embeds-activity.css

    diff --git src/bp-templates/bp-legacy/css/embeds-activity.css src/bp-templates/bp-legacy/css/embeds-activity.css
    index 9e0b465d9..ce0aa99c9 100644
    a.play-btn:hover { 
    154154                width: 35px;
    155155        }
    156156}
     157
     158/**
     159*-------------------------------------------------------------------------------
     160* Activity Types
     161*-------------------------------------------------------------------------------
     162*/
     163.bp-member-preview-cover,
     164.bp-group-preview-cover {
     165        position: relative;
     166        min-height: 150px;
     167        background: #c5c5c5;
     168}
     169
     170.bp-member-activity-preview a,
     171.bp-group-activity-preview a {
     172    display: block;
     173    max-width: 100%;
     174}
     175
     176.bp-member-preview-cover img,
     177.bp-group-preview-cover img {
     178        background: #c5c5c5;
     179        object-fit: cover;
     180        border: 0;
     181        display: block;
     182        margin: 0;
     183        padding: 0;
     184        width: 100%;
     185        z-index: 1;
     186        height: 150px;
     187}
     188
     189.bp-member-avatar-content,
     190.bp-group-avatar-content {
     191    float: left;
     192        width: 200px;
     193        margin-top: -75px;
     194        position: relative;
     195        z-index: 2;
     196}
     197
     198.bp-member-avatar-content img.profile-photo,
     199.bp-group-avatar-content img.group-photo {
     200        border: solid 2px #fff;
     201        background: rgba(255, 255, 255, 0.8);
     202        margin-left: 20px;
     203}
     204
     205.bp-member-short-description-title a,
     206.bp-group-short-description-title a {
     207        font-weight: 600;
     208}
     209
     210@media screen and (max-width: 46.8em) {
     211        .bp-member-short-description,
     212        .bp-group-short-description {
     213                text-align: center;
     214        }
     215        .bp-member-avatar-content,
     216        .bp-group-avatar-content {
     217        float: none;
     218                width: 100%;
     219        margin-left: auto;
     220                margin-right: auto;
     221                margin-bottom: 15px;
     222        }
     223        .bp-member-avatar-content img.profile-photo,
     224        .bp-group-avatar-content img.group-photo {
     225                margin: auto;
     226        }
     227        .bp-profile-button {
     228                margin-top: 15px;
     229        }
     230}
     231
     232@media screen and (min-width: 46.8em) {
     233        .bp-profile-button {
     234                text-align: right;
     235        }
     236}
  • src/bp-templates/bp-nouveau/common-styles/_bp_activity_entries.scss

    diff --git src/bp-templates/bp-nouveau/common-styles/_bp_activity_entries.scss src/bp-templates/bp-nouveau/common-styles/_bp_activity_entries.scss
    index edd598f92..5d0edf4fb 100644
    body.activity-permalink { 
    436436
    437437        }
    438438}
     439
     440// Activity Types Entry View
     441.bp-member-preview-cover,
     442.bp-group-preview-cover {
     443        position: relative;
     444        min-height: 150px;
     445        background: #c5c5c5;
     446       
     447        img {
     448                background: #c5c5c5;
     449                object-fit: cover;
     450                border: 0;
     451                display: block;
     452                margin: 0;
     453                padding: 0;
     454                width: 100%;
     455                z-index: 1;
     456                height: 150px;
     457        }
     458}
     459
     460.bp-member-avatar-content,
     461.bp-group-avatar-content {
     462        float: left;
     463        width: 200px;
     464        margin-top: -75px;
     465        position: relative;
     466        z-index: 2;
     467       
     468        img.profile-photo,
     469        img.group-photo {
     470                border: solid 2px #fff;
     471                background: rgba(255,255,255,.8);
     472                margin-left: 20px;
     473        }
     474}
     475
     476.bp-member-short-description-title a,
     477.bp-group-short-description-title a {
     478        font-weight: 600;
     479}
     480
     481@include medium-max() {
     482
     483        .bp-member-short-description,
     484        .bp-group-short-description {
     485                text-align: center;
     486        }
     487       
     488        .bp-member-avatar-content,
     489        .bp-group-avatar-content {
     490                float: none;
     491                width: 100%;
     492                margin-left: auto;
     493                margin-right: auto;
     494                margin-bottom: 15px;
     495               
     496                img.profile-photo,
     497                img.group-photo {
     498                        margin: auto;
     499                }
     500        }
     501       
     502        .bp-profile-button {
     503                margin-top: 15px;
     504        }
     505       
     506} // close @media
     507
     508@include medium-up {
     509
     510        .bp-profile-button {
     511                text-align: right;
     512        }
     513       
     514} // close @media
     515 No newline at end of file
  • src/bp-templates/bp-nouveau/css/buddypress-rtl.css

    diff --git src/bp-templates/bp-nouveau/css/buddypress-rtl.css src/bp-templates/bp-nouveau/css/buddypress-rtl.css
    index e67c2b8f0..30721e319 100644
    body #buddypress select, 
    6969body #buddypress input[type="search"],
    7070body #buddypress input[type="submit"],
    7171body #buddypress input[type="reset"] {
     72        -webkit-border-radius: 2px;
     73        -moz-border-radius: 2px;
     74        -ms-border-radius: 2px;
    7275        border-radius: 2px;
    7376        background-clip: padding-box;
    7477}
    body #buddypress .bp-lists blockquote { 
    7982}
    8083
    8184body #buddypress .bp-list .action {
     85        -webkit-box-sizing: border-box;
     86        -moz-box-sizing: border-box;
    8287        box-sizing: border-box;
    8388}
    8489
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    375380        .buddypress-wrap.bp-dir-hori-nav:not(.bp-vertical-navs) nav:not(.tabbed-links) {
    376381                border-bottom: 1px solid #eee;
    377382                border-top: 1px solid #eee;
     383                -webkit-box-shadow: 0 2px 12px 0 #fafafa;
     384                -moz-box-shadow: 0 2px 12px 0 #fafafa;
    378385                box-shadow: 0 2px 12px 0 #fafafa;
    379386        }
    380387}
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    868875}
    869876
    870877.bp-list {
     878        -webkit-box-sizing: border-box;
     879        -moz-box-sizing: border-box;
    871880        box-sizing: border-box;
    872881        border-top: 1px solid #eaeaea;
    873882        clear: both;
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    10181027.activity-list.bp-list .activity-item {
    10191028        background: #fff;
    10201029        border: 1px solid #b7b7b7;
     1030        -webkit-box-shadow: 0 0 6px #d2d2d2;
     1031        -moz-box-shadow: 0 0 6px #d2d2d2;
    10211032        box-shadow: 0 0 6px #d2d2d2;
    10221033        margin: 20px 0;
    10231034}
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    10381049@media screen and (min-width: 46.8em) {
    10391050        .friends-request-list li,
    10401051        .membership-requests-list li {
     1052                display: -webkit-flex;
    10411053                display: -moz-flex;
    10421054                display: -ms-flex;
    10431055                display: -o-flex;
    10441056                display: flex;
     1057                -webkit-flex-flow: row nowrap;
     1058                -moz-flex-flow: row nowrap;
     1059                -ms-flex-flow: row nowrap;
    10451060                -o-flex-flow: row nowrap;
    10461061                flex-flow: row nowrap;
    10471062        }
    10481063        .friends-request-list li .item,
    10491064        .membership-requests-list li .item {
     1065                -webkit-flex: 1 1 auto;
    10501066                -moz-flex: 1 1 auto;
     1067                -ms-flex: 1 1 auto;
    10511068                -o-flex: 1 1 auto;
    10521069                flex: 1 1 auto;
    10531070        }
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    11031120
    11041121.activity-update-form {
    11051122        border: 1px solid #ccc;
     1123        -webkit-box-shadow: inset 0 0 6px #eee;
     1124        -moz-box-shadow: inset 0 0 6px #eee;
    11061125        box-shadow: inset 0 0 6px #eee;
    11071126        margin: 15px 0;
    11081127}
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    11251144
    11261145.activity-update-form #whats-new-textarea textarea {
    11271146        background: #fff;
     1147        -webkit-box-sizing: border-box;
     1148        -moz-box-sizing: border-box;
    11281149        box-sizing: border-box;
    11291150        color: #333;
    11301151        font-family: inherit;
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    11361157}
    11371158
    11381159.activity-update-form #whats-new-textarea textarea:focus {
     1160        -webkit-box-shadow: 0 0 6px 0 #d6d6d6;
     1161        -moz-box-shadow: 0 0 6px 0 #d6d6d6;
    11391162        box-shadow: 0 0 6px 0 #d6d6d6;
    11401163}
    11411164
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    11641187}
    11651188
    11661189.activity-update-form #whats-new-post-in-box #whats-new-post-in-box-items .bp-activity-object {
     1190        display: -webkit-box;
     1191        display: -ms-flexbox;
     1192        display: -webkit-flex;
    11671193        display: flex;
     1194        -ms-flex-align: center;
     1195        -webkit-align-items: center;
     1196        -webkit-box-align: center;
    11681197        align-items: center;
    11691198        padding: 0.2em;
    11701199}
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    15121541.buddypress-wrap .activity-list .load-newest:focus,
    15131542.buddypress-wrap .activity-list .load-newest:hover {
    15141543        border-color: #e1e1e1;
     1544        -webkit-box-shadow: 0 0 6px 0 #eaeaea;
     1545        -moz-box-shadow: 0 0 6px 0 #eaeaea;
    15151546        box-shadow: 0 0 6px 0 #eaeaea;
    15161547}
    15171548
    body.activity-permalink .activity-list .activity-comments { 
    15771608                top: -20px;
    15781609        }
    15791610        body.activity-permalink .activity-list .activity-avatar img {
     1611                -webkit-box-shadow: 0 0 0 8px #fff;
    15801612                box-shadow: 0 0 0 8px #fff;
    15811613        }
    15821614        body.activity-permalink .activity-list .activity-content {
    body.activity-permalink .activity-list .activity-comments { 
    15871619        }
    15881620}
    15891621
     1622.bp-member-preview-cover,
     1623.bp-group-preview-cover {
     1624        position: relative;
     1625        min-height: 150px;
     1626        background: #c5c5c5;
     1627}
     1628
     1629.bp-member-preview-cover img,
     1630.bp-group-preview-cover img {
     1631        background: #c5c5c5;
     1632        object-fit: cover;
     1633        border: 0;
     1634        display: block;
     1635        margin: 0;
     1636        padding: 0;
     1637        width: 100%;
     1638        z-index: 1;
     1639        height: 150px;
     1640}
     1641
     1642.bp-member-avatar-content,
     1643.bp-group-avatar-content {
     1644        float: right;
     1645        width: 200px;
     1646        margin-top: -75px;
     1647        position: relative;
     1648        z-index: 2;
     1649}
     1650
     1651.bp-member-avatar-content img.profile-photo,
     1652.bp-member-avatar-content img.group-photo,
     1653.bp-group-avatar-content img.profile-photo,
     1654.bp-group-avatar-content img.group-photo {
     1655        border: solid 2px #fff;
     1656        background: rgba(255, 255, 255, 0.8);
     1657        margin-right: 20px;
     1658}
     1659
     1660.bp-member-short-description-title a,
     1661.bp-group-short-description-title a {
     1662        font-weight: 600;
     1663}
     1664
     1665@media screen and (max-width: 46.8em) {
     1666        .bp-member-short-description,
     1667        .bp-group-short-description {
     1668                text-align: center;
     1669        }
     1670        .bp-member-avatar-content,
     1671        .bp-group-avatar-content {
     1672                float: none;
     1673                width: 100%;
     1674                margin-right: auto;
     1675                margin-left: auto;
     1676                margin-bottom: 15px;
     1677        }
     1678        .bp-member-avatar-content img.profile-photo,
     1679        .bp-member-avatar-content img.group-photo,
     1680        .bp-group-avatar-content img.profile-photo,
     1681        .bp-group-avatar-content img.group-photo {
     1682                margin: auto;
     1683        }
     1684        .bp-profile-button {
     1685                margin-top: 15px;
     1686        }
     1687}
     1688
     1689@media screen and (min-width: 46.8em) {
     1690        .bp-profile-button {
     1691                text-align: left;
     1692        }
     1693}
     1694
    15901695/**
    15911696*-----------------------------------------------------
    15921697* @section 3.1.3 - Activity Comments
    form.ac-form .ac-reply-content .ac-textarea textarea { 
    17571862}
    17581863
    17591864form.ac-form .ac-reply-content .ac-textarea textarea:focus {
     1865        -webkit-box-shadow: 0 0 6px #d6d6d6;
     1866        -moz-box-shadow: 0 0 6px #d6d6d6;
    17601867        box-shadow: 0 0 6px #d6d6d6;
    17611868}
    17621869
    form.ac-form .ac-reply-content input { 
    18201927
    18211928.buddypress-wrap .groups-list li .group-desc {
    18221929        border: 1px solid #eaeaea;
     1930        -webkit-border-radius: 10px;
     1931        -moz-border-radius: 10px;
     1932        -ms-border-radius: 10px;
    18231933        border-radius: 10px;
    18241934        background-clip: padding-box;
    18251935        font-size: 13px;
    form.ac-form .ac-reply-content input { 
    18952005
    18962006.buddypress-wrap .members-list li .user-update {
    18972007        border: 1px solid #eaeaea;
     2008        -webkit-border-radius: 10px;
     2009        -moz-border-radius: 10px;
     2010        -ms-border-radius: 10px;
    18982011        border-radius: 10px;
    18992012        background-clip: padding-box;
    19002013        color: #737373;
    form.ac-form .ac-reply-content input { 
    19442057*-------------------------------------------------------------------------------
    19452058*/
    19462059.register-page .register-section {
     2060        -webkit-box-sizing: border-box;
     2061        -moz-box-sizing: border-box;
    19472062        box-sizing: border-box;
    19482063}
    19492064
    body.no-js .single-item-header .js-self-profile-button { 
    23532468}
    23542469
    23552470.groups-header .moderators-lists img.avatar {
     2471        -moz-box-shadow: none;
     2472        -webkit-box-shadow: none;
    23562473        box-shadow: none;
    23572474        float: none;
    23582475        height: 30px;
    body.no-js .single-item-header .js-self-profile-button { 
    23902507
    23912508.groups-header .desc-wrap .group-description {
    23922509        background: #fafafa;
     2510        -webkit-box-shadow: inset 0 0 9px #ccc;
     2511        -moz-box-shadow: inset 0 0 9px #ccc;
    23932512        box-shadow: inset 0 0 9px #ccc;
    23942513        padding: 1em;
    23952514        text-align: right;
    body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 
    26682787}
    26692788
    26702789.buddypress .bp-invites-content ul.item-list li.selected {
     2790        -webkit-box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2);
     2791        -moz-box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2);
    26712792        box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2);
    26722793}
    26732794
    body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 
    27392860
    27402861@media screen and (min-width: 46.8em) {
    27412862        .buddypress .bp-invites-content ul.item-list > li {
     2863                -webkit-box-sizing: border-box;
     2864                -moz-box-sizing: border-box;
    27422865                box-sizing: border-box;
    27432866                border: 1px solid #eaeaea;
    27442867                float: right;
    body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 
    27602883
    27612884@media screen and (min-width: 46.8em) {
    27622885        :not(.vertical) + .item-body #group-invites-container {
     2886                display: -ms-grid;
    27632887                display: grid;
     2888                -ms-grid-columns: 25% auto;
    27642889                grid-template-columns: 25% auto;
    27652890                grid-template-areas: "group-invites-nav group-invites-column";
    27662891        }
    body.register .buddypress-wrap .page ul { 
    30193144}
    30203145
    30213146.bp-messages-content .avatar {
     3147        -moz-box-shadow: none;
     3148        -webkit-box-shadow: none;
    30223149        box-shadow: none;
    30233150}
    30243151
    body.register .buddypress-wrap .page ul { 
    30493176
    30503177#message-threads li {
    30513178        border-bottom: 1px solid #eaeaea;
     3179        display: -webkit-flex;
    30523180        display: -moz-flex;
    30533181        display: -ms-flex;
    30543182        display: -o-flex;
    30553183        display: flex;
     3184        -webkit-flex-flow: row nowrap;
     3185        -moz-flex-flow: row nowrap;
     3186        -ms-flex-flow: row nowrap;
    30563187        -o-flex-flow: row nowrap;
    30573188        flex-flow: row nowrap;
    30583189        margin: 0;
    body.register .buddypress-wrap .page ul { 
    30613192}
    30623193
    30633194#message-threads li .thread-cb {
     3195        display: -webkit-box;
     3196        display: -ms-flexbox;
     3197        display: -webkit-flex;
    30643198        display: flex;
     3199        -ms-flex-align: center;
     3200        -webkit-align-items: center;
     3201        -webkit-box-align: center;
    30653202        align-items: center;
     3203        -webkit-flex: 1 2 5%;
    30663204        -moz-flex: 1 2 5%;
     3205        -ms-flex: 1 2 5%;
    30673206        -o-flex: 1 2 5%;
    30683207        flex: 1 2 5%;
    30693208}
    30703209
    30713210#message-threads li .thread-from,
    30723211#message-threads li .thread-to {
     3212        -webkit-flex: 1 2 20%;
    30733213        -moz-flex: 1 2 20%;
     3214        -ms-flex: 1 2 20%;
    30743215        -o-flex: 1 2 20%;
    30753216        flex: 1 2 20%;
    30763217}
    body.register .buddypress-wrap .page ul { 
    30963237}
    30973238
    30983239#message-threads li .thread-content {
     3240        -webkit-flex: 1 2 60%;
    30993241        -moz-flex: 1 2 60%;
     3242        -ms-flex: 1 2 60%;
    31003243        -o-flex: 1 2 60%;
    31013244        flex: 1 2 60%;
    31023245}
    31033246
    31043247#message-threads li .thread-date {
     3248        -webkit-flex: 1 2 15%;
    31053249        -moz-flex: 1 2 15%;
     3250        -ms-flex: 1 2 15%;
    31063251        -o-flex: 1 2 15%;
    31073252        flex: 1 2 15%;
    31083253}
    body.register .buddypress-wrap .page ul { 
    32043349
    32053350.bp-messages-content #bp-message-thread-list .message-metadata {
    32063351        border-bottom: 1px solid #ccc;
     3352        -webkit-box-shadow: 2px 1px 9px 0 #eee;
     3353        -moz-box-shadow: 2px 1px 9px 0 #eee;
    32073354        box-shadow: 2px 1px 9px 0 #eee;
    32083355        display: table;
    32093356        padding: 0.2em;
    body.buddypress.settings.data #buddypress.buddypress-wrap .item-body p a { 
    34473594.buddypress-wrap input[type="url"]:focus,
    34483595.buddypress-wrap input[type="tel"]:focus,
    34493596.buddypress-wrap input[type="password"]:focus {
     3597        -webkit-box-shadow: 0 0 8px #eaeaea;
     3598        -moz-box-shadow: 0 0 8px #eaeaea;
    34503599        box-shadow: 0 0 8px #eaeaea;
    34513600}
    34523601
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    36863835}
    36873836
    36883837.buddypress-wrap .select-wrap select {
     3838        -moz-appearance: none;
    36893839        -webkit-appearance: none;
    36903840        -o-appearance: none;
    36913841        appearance: none;
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    37803930.buddypress-wrap form#group-members-search button[type="submit"] {
    37813931        background: none;
    37823932        border: 0;
     3933        -webkit-border-radius: 0;
     3934        -moz-border-radius: 0;
     3935        -ms-border-radius: 0;
    37833936        border-radius: 0;
    37843937        background-clip: padding-box;
    37853938}
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    40564209}
    40574210
    40584211.center-vert {
     4212        display: -ms-flexbox;
     4213        display: -webkit-flex;
    40594214        display: flex;
     4215        -ms-flex-align: center;
     4216        -webkit-align-items: center;
     4217        -webkit-box-align: center;
    40604218        align-items: center;
    40614219}
    40624220
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    41704328.buddypress .buddypress-wrap input.text-button {
    41714329        background: none;
    41724330        border: 0;
     4331        -moz-box-shadow: none;
     4332        -webkit-box-shadow: none;
    41734333        box-shadow: none;
    41744334        color: #767676;
    41754335}
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    42654425
    42664426.buddypress #buddypress .create-button a {
    42674427        border: 1px solid #ccc;
     4428        -webkit-border-radius: 5px;
     4429        -moz-border-radius: 5px;
     4430        -ms-border-radius: 5px;
    42684431        border-radius: 5px;
    42694432        background-clip: padding-box;
     4433        -webkit-box-shadow: inset 0 0 6px 0 #eaeaea;
     4434        -moz-box-shadow: inset 0 0 6px 0 #eaeaea;
    42704435        box-shadow: inset 0 0 6px 0 #eaeaea;
    42714436        margin: 0.2em 0;
    42724437        width: auto;
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    42754440.buddypress #buddypress .create-button a:focus, .buddypress #buddypress .create-button a:hover {
    42764441        background: none;
    42774442        border-color: #ccc;
     4443        -webkit-box-shadow: inset 0 0 12px 0 #eaeaea;
     4444        -moz-box-shadow: inset 0 0 12px 0 #eaeaea;
    42784445        box-shadow: inset 0 0 12px 0 #eaeaea;
    42794446}
    42804447
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    42964463.buddypress #buddypress.bp-dir-hori-nav .create-button a:hover {
    42974464        background: none;
    42984465        border: 0;
     4466        -moz-box-shadow: none;
     4467        -webkit-box-shadow: none;
    42994468        box-shadow: none;
    43004469        margin: 0;
    43014470}
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    43964565.buddypress-wrap #group-create-body .bp-cover-image-status p.warning {
    43974566        background: #0b80a4;
    43984567        border: 0;
     4568        -webkit-box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2);
     4569        -moz-box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2);
    43994570        box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2);
    44004571        color: #fff;
    44014572}
    44024573
    44034574.buddypress-wrap .bp-feedback:not(.custom-homepage-info) {
     4575        display: -webkit-flex;
    44044576        display: -moz-flex;
    44054577        display: -ms-flex;
    44064578        display: -o-flex;
    44074579        display: flex;
     4580        -webkit-flex-flow: row nowrap;
     4581        -moz-flex-flow: row nowrap;
     4582        -ms-flex-flow: row nowrap;
    44084583        -o-flex-flow: row nowrap;
    44094584        flex-flow: row nowrap;
     4585        -ms-flex-align: stretch;
     4586        -webkit-align-items: stretch;
     4587        -webkit-box-align: stretch;
    44104588        align-items: stretch;
    44114589        align-items: center;
    44124590}
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    44144592.buddypress-wrap .bp-feedback {
    44154593        background: #fff;
    44164594        color: #807f7f;
     4595        -webkit-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
     4596        -moz-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
    44174597        box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
    44184598        color: #737373;
    44194599        margin: 10px 0;
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    44924672.buddypress-wrap .bp-feedback.loading .bp-icon,
    44934673.buddypress-wrap .bp-feedback.success .bp-icon,
    44944674.buddypress-wrap .bp-feedback.updated .bp-icon {
     4675        display: -webkit-box;
     4676        display: -ms-flexbox;
     4677        display: -webkit-flex;
    44954678        display: flex;
     4679        -ms-flex-align: center;
     4680        -webkit-align-items: center;
     4681        -webkit-box-align: center;
    44964682        align-items: center;
    44974683        align-self: stretch;
    44984684}
    body.create-blog #buddypress .error, 
    46154801body.create-blog #buddypress .success {
    46164802        background: #fff;
    46174803        color: #807f7f;
     4804        -webkit-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
     4805        -moz-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
    46184806        box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
    46194807        color: #737373;
    46204808        padding: 10px 15px;
    body.create-blog #buddypress .success { 
    47344922}
    47354923
    47364924.buddypress.widget .avatar-block {
     4925        display: -webkit-flex;
    47374926        display: -moz-flex;
    47384927        display: -ms-flex;
    47394928        display: -o-flex;
    47404929        display: flex;
     4930        -webkit-flex-flow: row wrap;
     4931        -moz-flex-flow: row wrap;
     4932        -ms-flex-flow: row wrap;
    47414933        -o-flex-flow: row wrap;
    47424934        flex-flow: row wrap;
    47434935}
    body.create-blog #buddypress .success { 
    47844976.buddypress-wrap .buddypress.widget ul#friends-list,
    47854977.buddypress-wrap .buddypress.widget ul#groups-list,
    47864978.buddypress-wrap .buddypress.widget ul#members-list {
     4979        display: -webkit-flex;
    47874980        display: -moz-flex;
    47884981        display: -ms-flex;
    47894982        display: -o-flex;
    47904983        display: flex;
     4984        -webkit-flex-flow: column nowrap;
     4985        -moz-flex-flow: column nowrap;
     4986        -ms-flex-flow: column nowrap;
    47914987        -o-flex-flow: column nowrap;
    47924988        flex-flow: column nowrap;
    47934989}
    body.create-blog #buddypress .success { 
    47964992        .buddypress-wrap .buddypress.widget ul#friends-list,
    47974993        .buddypress-wrap .buddypress.widget ul#groups-list,
    47984994        .buddypress-wrap .buddypress.widget ul#members-list {
     4995                display: -webkit-flex;
    47994996                display: -moz-flex;
    48004997                display: -ms-flex;
    48014998                display: -o-flex;
    48024999                display: flex;
     5000                -webkit-flex-flow: row wrap;
     5001                -moz-flex-flow: row wrap;
     5002                -ms-flex-flow: row wrap;
    48035003                -o-flex-flow: row wrap;
    48045004                flex-flow: row wrap;
    48055005        }
    body.create-blog #buddypress .success { 
    48095009.buddypress-wrap .buddypress.widget ul#groups-list li,
    48105010.buddypress-wrap .buddypress.widget ul#members-list li {
    48115011        border: 1px solid #eee;
     5012        -ms-flex-align: stretch;
     5013        -webkit-align-items: stretch;
     5014        -webkit-box-align: stretch;
    48125015        align-items: stretch;
     5016        -webkit-flex: 1 1 46%;
    48135017        -moz-flex: 1 1 46%;
     5018        -ms-flex: 1 1 46%;
    48145019        -o-flex: 1 1 46%;
    48155020        flex: 1 1 46%;
    48165021        margin: 2%;
    body.create-blog #buddypress .success { 
    48205025        .buddypress-wrap .buddypress.widget ul#friends-list li,
    48215026        .buddypress-wrap .buddypress.widget ul#groups-list li,
    48225027        .buddypress-wrap .buddypress.widget ul#members-list li {
     5028                -webkit-flex: 0 1 20%;
    48235029                -moz-flex: 0 1 20%;
     5030                -ms-flex: 0 1 20%;
    48245031                -o-flex: 0 1 20%;
    48255032                flex: 0 1 20%;
    48265033        }
    body.create-blog #buddypress .success { 
    48565063        .buddypress-wrap .buddypress.widget ul#friends-list li,
    48575064        .buddypress-wrap .buddypress.widget ul#groups-list li,
    48585065        .buddypress-wrap .buddypress.widget ul#members-list li {
     5066                -webkit-flex: 0 1 auto;
    48595067                -moz-flex: 0 1 auto;
     5068                -ms-flex: 0 1 auto;
    48605069                -o-flex: 0 1 auto;
    48615070                flex: 0 1 auto;
    48625071                margin: 10px 2% 1%;
    body.create-blog #buddypress .success { 
    48845093
    48855094.buddypress-wrap a.loading,
    48865095.buddypress-wrap input.loading {
     5096        -moz-animation: loader-pulsate 0.5s infinite ease-in-out alternate;
     5097        -webkit-animation: loader-pulsate 0.5s infinite ease-in-out alternate;
    48875098        animation: loader-pulsate 0.5s infinite ease-in-out alternate;
    48885099        border-color: #aaa;
    48895100}
    48905101
     5102@-webkit-keyframes loader-pulsate {
     5103        from {
     5104                border-color: #aaa;
     5105                -webkit-box-shadow: 0 0 6px #ccc;
     5106                box-shadow: 0 0 6px #ccc;
     5107        }
     5108        to {
     5109                border-color: #ccc;
     5110                -webkit-box-shadow: 0 0 6px #f8f8f8;
     5111                box-shadow: 0 0 6px #f8f8f8;
     5112        }
     5113}
     5114
     5115@-moz-keyframes loader-pulsate {
     5116        from {
     5117                border-color: #aaa;
     5118                -moz-box-shadow: 0 0 6px #ccc;
     5119                box-shadow: 0 0 6px #ccc;
     5120        }
     5121        to {
     5122                border-color: #ccc;
     5123                -moz-box-shadow: 0 0 6px #f8f8f8;
     5124                box-shadow: 0 0 6px #f8f8f8;
     5125        }
     5126}
     5127
    48915128@keyframes loader-pulsate {
    48925129        from {
    48935130                border-color: #aaa;
     5131                -moz-box-shadow: 0 0 6px #ccc;
    48945132                box-shadow: 0 0 6px #ccc;
    48955133        }
    48965134        to {
    48975135                border-color: #ccc;
     5136                -moz-box-shadow: 0 0 6px #f8f8f8;
    48985137                box-shadow: 0 0 6px #f8f8f8;
    48995138        }
    49005139}
    body.create-blog #buddypress .success { 
    49135152        display: none;
    49145153        opacity: 0;
    49155154        position: absolute;
     5155        -webkit-transform: translate3d(0, 0, 0);
     5156        -ms-transform: translate3d(0, 0, 0);
    49165157        transform: translate3d(0, 0, 0);
    49175158        visibility: hidden;
    49185159}
    body.create-blog #buddypress .success { 
    49335174        pointer-events: none;
    49345175        text-shadow: none;
    49355176        text-transform: none;
     5177        -webkit-transition: all 1.5s ease;
     5178        -ms-transition: all 1.5s ease;
    49365179        transition: all 1.5s ease;
    49375180        white-space: nowrap;
    49385181        word-wrap: break-word;
    body.create-blog #buddypress .success { 
    49565199        right: 50%;
    49575200        margin-top: 7px;
    49585201        top: 110%;
     5202        -webkit-transform: translate(50%, 0);
     5203        -ms-transform: translate(50%, 0);
    49595204        transform: translate(50%, 0);
    49605205}
    49615206
    49625207.user-list .bp-tooltip:after {
    49635208        right: 0;
     5209        -webkit-transform: translate(0, 0);
     5210        -ms-transform: translate(0, 0);
    49645211        transform: translate(0, 0);
    49655212}
    49665213
    body.create-blog #buddypress .success { 
    49685215        .user-list .bp-tooltip:after {
    49695216                right: auto;
    49705217                left: 0;
     5218                -webkit-transform: translate(0, 0);
     5219                -ms-transform: translate(0, 0);
    49715220                transform: translate(0, 0);
    49725221        }
    49735222}
    body.create-blog #buddypress .success { 
    49785227.notification-actions .bp-tooltip:after,
    49795228.participants-list .bp-tooltip:after {
    49805229        right: 0;
     5230        -webkit-transform: translate(0, 0);
     5231        -ms-transform: translate(0, 0);
    49815232        transform: translate(0, 0);
    49825233}
    49835234
    body.create-blog #buddypress .success { 
    49865237.single-message-thread-header .actions .bp-tooltip:after {
    49875238        right: auto;
    49885239        left: 0;
     5240        -webkit-transform: translate(0, 0);
     5241        -ms-transform: translate(0, 0);
    49895242        transform: translate(0, 0);
    49905243}
    49915244
    body.create-blog #buddypress .success { 
    50015254*/
    50025255#item-body,
    50035256.single-screen-navs {
     5257        -webkit-box-sizing: border-box;
     5258        -moz-box-sizing: border-box;
    50045259        box-sizing: border-box;
    50055260}
    50065261
    50075262.grid > li,
    50085263.grid > li .generic-button a {
     5264        -webkit-box-sizing: border-box;
     5265        -moz-box-sizing: border-box;
    50095266        box-sizing: border-box;
    50105267}
    50115268
  • src/bp-templates/bp-nouveau/css/buddypress.css

    diff --git src/bp-templates/bp-nouveau/css/buddypress.css src/bp-templates/bp-nouveau/css/buddypress.css
    index 526ff907e..62f87b542 100644
    body #buddypress select, 
    6969body #buddypress input[type="search"],
    7070body #buddypress input[type="submit"],
    7171body #buddypress input[type="reset"] {
     72        -webkit-border-radius: 2px;
     73        -moz-border-radius: 2px;
     74        -ms-border-radius: 2px;
    7275        border-radius: 2px;
    7376        background-clip: padding-box;
    7477}
    body #buddypress .bp-lists blockquote { 
    7982}
    8083
    8184body #buddypress .bp-list .action {
     85        -webkit-box-sizing: border-box;
     86        -moz-box-sizing: border-box;
    8287        box-sizing: border-box;
    8388}
    8489
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    375380        .buddypress-wrap.bp-dir-hori-nav:not(.bp-vertical-navs) nav:not(.tabbed-links) {
    376381                border-bottom: 1px solid #eee;
    377382                border-top: 1px solid #eee;
     383                -webkit-box-shadow: 0 2px 12px 0 #fafafa;
     384                -moz-box-shadow: 0 2px 12px 0 #fafafa;
    378385                box-shadow: 0 2px 12px 0 #fafafa;
    379386        }
    380387}
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    868875}
    869876
    870877.bp-list {
     878        -webkit-box-sizing: border-box;
     879        -moz-box-sizing: border-box;
    871880        box-sizing: border-box;
    872881        border-top: 1px solid #eaeaea;
    873882        clear: both;
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    10181027.activity-list.bp-list .activity-item {
    10191028        background: #fff;
    10201029        border: 1px solid #b7b7b7;
     1030        -webkit-box-shadow: 0 0 6px #d2d2d2;
     1031        -moz-box-shadow: 0 0 6px #d2d2d2;
    10211032        box-shadow: 0 0 6px #d2d2d2;
    10221033        margin: 20px 0;
    10231034}
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    10381049@media screen and (min-width: 46.8em) {
    10391050        .friends-request-list li,
    10401051        .membership-requests-list li {
     1052                display: -webkit-flex;
    10411053                display: -moz-flex;
    10421054                display: -ms-flex;
    10431055                display: -o-flex;
    10441056                display: flex;
     1057                -webkit-flex-flow: row nowrap;
     1058                -moz-flex-flow: row nowrap;
     1059                -ms-flex-flow: row nowrap;
    10451060                -o-flex-flow: row nowrap;
    10461061                flex-flow: row nowrap;
    10471062        }
    10481063        .friends-request-list li .item,
    10491064        .membership-requests-list li .item {
     1065                -webkit-flex: 1 1 auto;
    10501066                -moz-flex: 1 1 auto;
     1067                -ms-flex: 1 1 auto;
    10511068                -o-flex: 1 1 auto;
    10521069                flex: 1 1 auto;
    10531070        }
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    11031120
    11041121.activity-update-form {
    11051122        border: 1px solid #ccc;
     1123        -webkit-box-shadow: inset 0 0 6px #eee;
     1124        -moz-box-shadow: inset 0 0 6px #eee;
    11061125        box-shadow: inset 0 0 6px #eee;
    11071126        margin: 15px 0;
    11081127}
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    11251144
    11261145.activity-update-form #whats-new-textarea textarea {
    11271146        background: #fff;
     1147        -webkit-box-sizing: border-box;
     1148        -moz-box-sizing: border-box;
    11281149        box-sizing: border-box;
    11291150        color: #333;
    11301151        font-family: inherit;
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    11361157}
    11371158
    11381159.activity-update-form #whats-new-textarea textarea:focus {
     1160        -webkit-box-shadow: 0 0 6px 0 #d6d6d6;
     1161        -moz-box-shadow: 0 0 6px 0 #d6d6d6;
    11391162        box-shadow: 0 0 6px 0 #d6d6d6;
    11401163}
    11411164
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    11641187}
    11651188
    11661189.activity-update-form #whats-new-post-in-box #whats-new-post-in-box-items .bp-activity-object {
     1190        display: -webkit-box;
     1191        display: -ms-flexbox;
     1192        display: -webkit-flex;
    11671193        display: flex;
     1194        -ms-flex-align: center;
     1195        -webkit-align-items: center;
     1196        -webkit-box-align: center;
    11681197        align-items: center;
    11691198        padding: 0.2em;
    11701199}
    body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 
    15121541.buddypress-wrap .activity-list .load-newest:focus,
    15131542.buddypress-wrap .activity-list .load-newest:hover {
    15141543        border-color: #e1e1e1;
     1544        -webkit-box-shadow: 0 0 6px 0 #eaeaea;
     1545        -moz-box-shadow: 0 0 6px 0 #eaeaea;
    15151546        box-shadow: 0 0 6px 0 #eaeaea;
    15161547}
    15171548
    body.activity-permalink .activity-list .activity-comments { 
    15771608                top: -20px;
    15781609        }
    15791610        body.activity-permalink .activity-list .activity-avatar img {
     1611                -webkit-box-shadow: 0 0 0 8px #fff;
    15801612                box-shadow: 0 0 0 8px #fff;
    15811613        }
    15821614        body.activity-permalink .activity-list .activity-content {
    body.activity-permalink .activity-list .activity-comments { 
    15871619        }
    15881620}
    15891621
     1622.bp-member-preview-cover,
     1623.bp-group-preview-cover {
     1624        position: relative;
     1625        min-height: 150px;
     1626        background: #c5c5c5;
     1627}
     1628
     1629.bp-member-preview-cover img,
     1630.bp-group-preview-cover img {
     1631        background: #c5c5c5;
     1632        object-fit: cover;
     1633        border: 0;
     1634        display: block;
     1635        margin: 0;
     1636        padding: 0;
     1637        width: 100%;
     1638        z-index: 1;
     1639        height: 150px;
     1640}
     1641
     1642.bp-member-avatar-content,
     1643.bp-group-avatar-content {
     1644        float: left;
     1645        width: 200px;
     1646        margin-top: -75px;
     1647        position: relative;
     1648        z-index: 2;
     1649}
     1650
     1651.bp-member-avatar-content img.profile-photo,
     1652.bp-member-avatar-content img.group-photo,
     1653.bp-group-avatar-content img.profile-photo,
     1654.bp-group-avatar-content img.group-photo {
     1655        border: solid 2px #fff;
     1656        background: rgba(255, 255, 255, 0.8);
     1657        margin-left: 20px;
     1658}
     1659
     1660.bp-member-short-description-title a,
     1661.bp-group-short-description-title a {
     1662        font-weight: 600;
     1663}
     1664
     1665@media screen and (max-width: 46.8em) {
     1666        .bp-member-short-description,
     1667        .bp-group-short-description {
     1668                text-align: center;
     1669        }
     1670        .bp-member-avatar-content,
     1671        .bp-group-avatar-content {
     1672                float: none;
     1673                width: 100%;
     1674                margin-left: auto;
     1675                margin-right: auto;
     1676                margin-bottom: 15px;
     1677        }
     1678        .bp-member-avatar-content img.profile-photo,
     1679        .bp-member-avatar-content img.group-photo,
     1680        .bp-group-avatar-content img.profile-photo,
     1681        .bp-group-avatar-content img.group-photo {
     1682                margin: auto;
     1683        }
     1684        .bp-profile-button {
     1685                margin-top: 15px;
     1686        }
     1687}
     1688
     1689@media screen and (min-width: 46.8em) {
     1690        .bp-profile-button {
     1691                text-align: right;
     1692        }
     1693}
     1694
    15901695/**
    15911696*-----------------------------------------------------
    15921697* @section 3.1.3 - Activity Comments
    form.ac-form .ac-reply-content .ac-textarea textarea { 
    17571862}
    17581863
    17591864form.ac-form .ac-reply-content .ac-textarea textarea:focus {
     1865        -webkit-box-shadow: 0 0 6px #d6d6d6;
     1866        -moz-box-shadow: 0 0 6px #d6d6d6;
    17601867        box-shadow: 0 0 6px #d6d6d6;
    17611868}
    17621869
    form.ac-form .ac-reply-content input { 
    18201927
    18211928.buddypress-wrap .groups-list li .group-desc {
    18221929        border: 1px solid #eaeaea;
     1930        -webkit-border-radius: 10px;
     1931        -moz-border-radius: 10px;
     1932        -ms-border-radius: 10px;
    18231933        border-radius: 10px;
    18241934        background-clip: padding-box;
    18251935        font-size: 13px;
    form.ac-form .ac-reply-content input { 
    18952005
    18962006.buddypress-wrap .members-list li .user-update {
    18972007        border: 1px solid #eaeaea;
     2008        -webkit-border-radius: 10px;
     2009        -moz-border-radius: 10px;
     2010        -ms-border-radius: 10px;
    18982011        border-radius: 10px;
    18992012        background-clip: padding-box;
    19002013        color: #737373;
    form.ac-form .ac-reply-content input { 
    19442057*-------------------------------------------------------------------------------
    19452058*/
    19462059.register-page .register-section {
     2060        -webkit-box-sizing: border-box;
     2061        -moz-box-sizing: border-box;
    19472062        box-sizing: border-box;
    19482063}
    19492064
    body.no-js .single-item-header .js-self-profile-button { 
    23532468}
    23542469
    23552470.groups-header .moderators-lists img.avatar {
     2471        -moz-box-shadow: none;
     2472        -webkit-box-shadow: none;
    23562473        box-shadow: none;
    23572474        float: none;
    23582475        height: 30px;
    body.no-js .single-item-header .js-self-profile-button { 
    23902507
    23912508.groups-header .desc-wrap .group-description {
    23922509        background: #fafafa;
     2510        -webkit-box-shadow: inset 0 0 9px #ccc;
     2511        -moz-box-shadow: inset 0 0 9px #ccc;
    23932512        box-shadow: inset 0 0 9px #ccc;
    23942513        padding: 1em;
    23952514        text-align: left;
    body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 
    26682787}
    26692788
    26702789.buddypress .bp-invites-content ul.item-list li.selected {
     2790        -webkit-box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2);
     2791        -moz-box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2);
    26712792        box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2);
    26722793}
    26732794
    body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 
    27392860
    27402861@media screen and (min-width: 46.8em) {
    27412862        .buddypress .bp-invites-content ul.item-list > li {
     2863                -webkit-box-sizing: border-box;
     2864                -moz-box-sizing: border-box;
    27422865                box-sizing: border-box;
    27432866                border: 1px solid #eaeaea;
    27442867                float: left;
    body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 
    27602883
    27612884@media screen and (min-width: 46.8em) {
    27622885        :not(.vertical) + .item-body #group-invites-container {
     2886                display: -ms-grid;
    27632887                display: grid;
     2888                -ms-grid-columns: 25% auto;
    27642889                grid-template-columns: 25% auto;
    27652890                grid-template-areas: "group-invites-nav group-invites-column";
    27662891        }
    body.register .buddypress-wrap .page ul { 
    30193144}
    30203145
    30213146.bp-messages-content .avatar {
     3147        -moz-box-shadow: none;
     3148        -webkit-box-shadow: none;
    30223149        box-shadow: none;
    30233150}
    30243151
    body.register .buddypress-wrap .page ul { 
    30493176
    30503177#message-threads li {
    30513178        border-bottom: 1px solid #eaeaea;
     3179        display: -webkit-flex;
    30523180        display: -moz-flex;
    30533181        display: -ms-flex;
    30543182        display: -o-flex;
    30553183        display: flex;
     3184        -webkit-flex-flow: row nowrap;
     3185        -moz-flex-flow: row nowrap;
     3186        -ms-flex-flow: row nowrap;
    30563187        -o-flex-flow: row nowrap;
    30573188        flex-flow: row nowrap;
    30583189        margin: 0;
    body.register .buddypress-wrap .page ul { 
    30613192}
    30623193
    30633194#message-threads li .thread-cb {
     3195        display: -webkit-box;
     3196        display: -ms-flexbox;
     3197        display: -webkit-flex;
    30643198        display: flex;
     3199        -ms-flex-align: center;
     3200        -webkit-align-items: center;
     3201        -webkit-box-align: center;
    30653202        align-items: center;
     3203        -webkit-flex: 1 2 5%;
    30663204        -moz-flex: 1 2 5%;
     3205        -ms-flex: 1 2 5%;
    30673206        -o-flex: 1 2 5%;
    30683207        flex: 1 2 5%;
    30693208}
    30703209
    30713210#message-threads li .thread-from,
    30723211#message-threads li .thread-to {
     3212        -webkit-flex: 1 2 20%;
    30733213        -moz-flex: 1 2 20%;
     3214        -ms-flex: 1 2 20%;
    30743215        -o-flex: 1 2 20%;
    30753216        flex: 1 2 20%;
    30763217}
    body.register .buddypress-wrap .page ul { 
    30963237}
    30973238
    30983239#message-threads li .thread-content {
     3240        -webkit-flex: 1 2 60%;
    30993241        -moz-flex: 1 2 60%;
     3242        -ms-flex: 1 2 60%;
    31003243        -o-flex: 1 2 60%;
    31013244        flex: 1 2 60%;
    31023245}
    31033246
    31043247#message-threads li .thread-date {
     3248        -webkit-flex: 1 2 15%;
    31053249        -moz-flex: 1 2 15%;
     3250        -ms-flex: 1 2 15%;
    31063251        -o-flex: 1 2 15%;
    31073252        flex: 1 2 15%;
    31083253}
    body.register .buddypress-wrap .page ul { 
    32043349
    32053350.bp-messages-content #bp-message-thread-list .message-metadata {
    32063351        border-bottom: 1px solid #ccc;
     3352        -webkit-box-shadow: -2px 1px 9px 0 #eee;
     3353        -moz-box-shadow: -2px 1px 9px 0 #eee;
    32073354        box-shadow: -2px 1px 9px 0 #eee;
    32083355        display: table;
    32093356        padding: 0.2em;
    body.buddypress.settings.data #buddypress.buddypress-wrap .item-body p a { 
    34473594.buddypress-wrap input[type="url"]:focus,
    34483595.buddypress-wrap input[type="tel"]:focus,
    34493596.buddypress-wrap input[type="password"]:focus {
     3597        -webkit-box-shadow: 0 0 8px #eaeaea;
     3598        -moz-box-shadow: 0 0 8px #eaeaea;
    34503599        box-shadow: 0 0 8px #eaeaea;
    34513600}
    34523601
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    36863835}
    36873836
    36883837.buddypress-wrap .select-wrap select {
     3838        -moz-appearance: none;
    36893839        -webkit-appearance: none;
    36903840        -o-appearance: none;
    36913841        appearance: none;
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    37803930.buddypress-wrap form#group-members-search button[type="submit"] {
    37813931        background: none;
    37823932        border: 0;
     3933        -webkit-border-radius: 0;
     3934        -moz-border-radius: 0;
     3935        -ms-border-radius: 0;
    37833936        border-radius: 0;
    37843937        background-clip: padding-box;
    37853938}
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    40564209}
    40574210
    40584211.center-vert {
     4212        display: -ms-flexbox;
     4213        display: -webkit-flex;
    40594214        display: flex;
     4215        -ms-flex-align: center;
     4216        -webkit-align-items: center;
     4217        -webkit-box-align: center;
    40604218        align-items: center;
    40614219}
    40624220
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    41704328.buddypress .buddypress-wrap input.text-button {
    41714329        background: none;
    41724330        border: 0;
     4331        -moz-box-shadow: none;
     4332        -webkit-box-shadow: none;
    41734333        box-shadow: none;
    41744334        color: #767676;
    41754335}
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    42654425
    42664426.buddypress #buddypress .create-button a {
    42674427        border: 1px solid #ccc;
     4428        -webkit-border-radius: 5px;
     4429        -moz-border-radius: 5px;
     4430        -ms-border-radius: 5px;
    42684431        border-radius: 5px;
    42694432        background-clip: padding-box;
     4433        -webkit-box-shadow: inset 0 0 6px 0 #eaeaea;
     4434        -moz-box-shadow: inset 0 0 6px 0 #eaeaea;
    42704435        box-shadow: inset 0 0 6px 0 #eaeaea;
    42714436        margin: 0.2em 0;
    42724437        width: auto;
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    42754440.buddypress #buddypress .create-button a:focus, .buddypress #buddypress .create-button a:hover {
    42764441        background: none;
    42774442        border-color: #ccc;
     4443        -webkit-box-shadow: inset 0 0 12px 0 #eaeaea;
     4444        -moz-box-shadow: inset 0 0 12px 0 #eaeaea;
    42784445        box-shadow: inset 0 0 12px 0 #eaeaea;
    42794446}
    42804447
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    42964463.buddypress #buddypress.bp-dir-hori-nav .create-button a:hover {
    42974464        background: none;
    42984465        border: 0;
     4466        -moz-box-shadow: none;
     4467        -webkit-box-shadow: none;
    42994468        box-shadow: none;
    43004469        margin: 0;
    43014470}
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    43964565.buddypress-wrap #group-create-body .bp-cover-image-status p.warning {
    43974566        background: #0b80a4;
    43984567        border: 0;
     4568        -webkit-box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2);
     4569        -moz-box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2);
    43994570        box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2);
    44004571        color: #fff;
    44014572}
    44024573
    44034574.buddypress-wrap .bp-feedback:not(.custom-homepage-info) {
     4575        display: -webkit-flex;
    44044576        display: -moz-flex;
    44054577        display: -ms-flex;
    44064578        display: -o-flex;
    44074579        display: flex;
     4580        -webkit-flex-flow: row nowrap;
     4581        -moz-flex-flow: row nowrap;
     4582        -ms-flex-flow: row nowrap;
    44084583        -o-flex-flow: row nowrap;
    44094584        flex-flow: row nowrap;
     4585        -ms-flex-align: stretch;
     4586        -webkit-align-items: stretch;
     4587        -webkit-box-align: stretch;
    44104588        align-items: stretch;
    44114589        align-items: center;
    44124590}
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    44144592.buddypress-wrap .bp-feedback {
    44154593        background: #fff;
    44164594        color: #807f7f;
     4595        -webkit-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
     4596        -moz-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
    44174597        box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
    44184598        color: #737373;
    44194599        margin: 10px 0;
    body.no-js .buddypress #messages-bulk-management #select-all-messages { 
    44924672.buddypress-wrap .bp-feedback.loading .bp-icon,
    44934673.buddypress-wrap .bp-feedback.success .bp-icon,
    44944674.buddypress-wrap .bp-feedback.updated .bp-icon {
     4675        display: -webkit-box;
     4676        display: -ms-flexbox;
     4677        display: -webkit-flex;
    44954678        display: flex;
     4679        -ms-flex-align: center;
     4680        -webkit-align-items: center;
     4681        -webkit-box-align: center;
    44964682        align-items: center;
    44974683        align-self: stretch;
    44984684}
    body.create-blog #buddypress .error, 
    46154801body.create-blog #buddypress .success {
    46164802        background: #fff;
    46174803        color: #807f7f;
     4804        -webkit-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
     4805        -moz-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
    46184806        box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
    46194807        color: #737373;
    46204808        padding: 10px 15px;
    body.create-blog #buddypress .success { 
    47344922}
    47354923
    47364924.buddypress.widget .avatar-block {
     4925        display: -webkit-flex;
    47374926        display: -moz-flex;
    47384927        display: -ms-flex;
    47394928        display: -o-flex;
    47404929        display: flex;
     4930        -webkit-flex-flow: row wrap;
     4931        -moz-flex-flow: row wrap;
     4932        -ms-flex-flow: row wrap;
    47414933        -o-flex-flow: row wrap;
    47424934        flex-flow: row wrap;
    47434935}
    body.create-blog #buddypress .success { 
    47844976.buddypress-wrap .buddypress.widget ul#friends-list,
    47854977.buddypress-wrap .buddypress.widget ul#groups-list,
    47864978.buddypress-wrap .buddypress.widget ul#members-list {
     4979        display: -webkit-flex;
    47874980        display: -moz-flex;
    47884981        display: -ms-flex;
    47894982        display: -o-flex;
    47904983        display: flex;
     4984        -webkit-flex-flow: column nowrap;
     4985        -moz-flex-flow: column nowrap;
     4986        -ms-flex-flow: column nowrap;
    47914987        -o-flex-flow: column nowrap;
    47924988        flex-flow: column nowrap;
    47934989}
    body.create-blog #buddypress .success { 
    47964992        .buddypress-wrap .buddypress.widget ul#friends-list,
    47974993        .buddypress-wrap .buddypress.widget ul#groups-list,
    47984994        .buddypress-wrap .buddypress.widget ul#members-list {
     4995                display: -webkit-flex;
    47994996                display: -moz-flex;
    48004997                display: -ms-flex;
    48014998                display: -o-flex;
    48024999                display: flex;
     5000                -webkit-flex-flow: row wrap;
     5001                -moz-flex-flow: row wrap;
     5002                -ms-flex-flow: row wrap;
    48035003                -o-flex-flow: row wrap;
    48045004                flex-flow: row wrap;
    48055005        }
    body.create-blog #buddypress .success { 
    48095009.buddypress-wrap .buddypress.widget ul#groups-list li,
    48105010.buddypress-wrap .buddypress.widget ul#members-list li {
    48115011        border: 1px solid #eee;
     5012        -ms-flex-align: stretch;
     5013        -webkit-align-items: stretch;
     5014        -webkit-box-align: stretch;
    48125015        align-items: stretch;
     5016        -webkit-flex: 1 1 46%;
    48135017        -moz-flex: 1 1 46%;
     5018        -ms-flex: 1 1 46%;
    48145019        -o-flex: 1 1 46%;
    48155020        flex: 1 1 46%;
    48165021        margin: 2%;
    body.create-blog #buddypress .success { 
    48205025        .buddypress-wrap .buddypress.widget ul#friends-list li,
    48215026        .buddypress-wrap .buddypress.widget ul#groups-list li,
    48225027        .buddypress-wrap .buddypress.widget ul#members-list li {
     5028                -webkit-flex: 0 1 20%;
    48235029                -moz-flex: 0 1 20%;
     5030                -ms-flex: 0 1 20%;
    48245031                -o-flex: 0 1 20%;
    48255032                flex: 0 1 20%;
    48265033        }
    body.create-blog #buddypress .success { 
    48565063        .buddypress-wrap .buddypress.widget ul#friends-list li,
    48575064        .buddypress-wrap .buddypress.widget ul#groups-list li,
    48585065        .buddypress-wrap .buddypress.widget ul#members-list li {
     5066                -webkit-flex: 0 1 auto;
    48595067                -moz-flex: 0 1 auto;
     5068                -ms-flex: 0 1 auto;
    48605069                -o-flex: 0 1 auto;
    48615070                flex: 0 1 auto;
    48625071                margin: 10px 2% 1%;
    body.create-blog #buddypress .success { 
    48845093
    48855094.buddypress-wrap a.loading,
    48865095.buddypress-wrap input.loading {
     5096        -moz-animation: loader-pulsate 0.5s infinite ease-in-out alternate;
     5097        -webkit-animation: loader-pulsate 0.5s infinite ease-in-out alternate;
    48875098        animation: loader-pulsate 0.5s infinite ease-in-out alternate;
    48885099        border-color: #aaa;
    48895100}
    48905101
     5102@-webkit-keyframes loader-pulsate {
     5103        from {
     5104                border-color: #aaa;
     5105                -webkit-box-shadow: 0 0 6px #ccc;
     5106                box-shadow: 0 0 6px #ccc;
     5107        }
     5108        to {
     5109                border-color: #ccc;
     5110                -webkit-box-shadow: 0 0 6px #f8f8f8;
     5111                box-shadow: 0 0 6px #f8f8f8;
     5112        }
     5113}
     5114
     5115@-moz-keyframes loader-pulsate {
     5116        from {
     5117                border-color: #aaa;
     5118                -moz-box-shadow: 0 0 6px #ccc;
     5119                box-shadow: 0 0 6px #ccc;
     5120        }
     5121        to {
     5122                border-color: #ccc;
     5123                -moz-box-shadow: 0 0 6px #f8f8f8;
     5124                box-shadow: 0 0 6px #f8f8f8;
     5125        }
     5126}
     5127
    48915128@keyframes loader-pulsate {
    48925129        from {
    48935130                border-color: #aaa;
     5131                -moz-box-shadow: 0 0 6px #ccc;
    48945132                box-shadow: 0 0 6px #ccc;
    48955133        }
    48965134        to {
    48975135                border-color: #ccc;
     5136                -moz-box-shadow: 0 0 6px #f8f8f8;
    48985137                box-shadow: 0 0 6px #f8f8f8;
    48995138        }
    49005139}
    body.create-blog #buddypress .success { 
    49135152        display: none;
    49145153        opacity: 0;
    49155154        position: absolute;
     5155        -webkit-transform: translate3d(0, 0, 0);
     5156        -ms-transform: translate3d(0, 0, 0);
    49165157        transform: translate3d(0, 0, 0);
    49175158        visibility: hidden;
    49185159}
    body.create-blog #buddypress .success { 
    49335174        pointer-events: none;
    49345175        text-shadow: none;
    49355176        text-transform: none;
     5177        -webkit-transition: all 1.5s ease;
     5178        -ms-transition: all 1.5s ease;
    49365179        transition: all 1.5s ease;
    49375180        white-space: nowrap;
    49385181        word-wrap: break-word;
    body.create-blog #buddypress .success { 
    49565199        left: 50%;
    49575200        margin-top: 7px;
    49585201        top: 110%;
     5202        -webkit-transform: translate(-50%, 0);
     5203        -ms-transform: translate(-50%, 0);
    49595204        transform: translate(-50%, 0);
    49605205}
    49615206
    49625207.user-list .bp-tooltip:after {
    49635208        left: 0;
     5209        -webkit-transform: translate(0, 0);
     5210        -ms-transform: translate(0, 0);
    49645211        transform: translate(0, 0);
    49655212}
    49665213
    body.create-blog #buddypress .success { 
    49685215        .user-list .bp-tooltip:after {
    49695216                left: auto;
    49705217                right: 0;
     5218                -webkit-transform: translate(0, 0);
     5219                -ms-transform: translate(0, 0);
    49715220                transform: translate(0, 0);
    49725221        }
    49735222}
    body.create-blog #buddypress .success { 
    49785227.notification-actions .bp-tooltip:after,
    49795228.participants-list .bp-tooltip:after {
    49805229        left: 0;
     5230        -webkit-transform: translate(0, 0);
     5231        -ms-transform: translate(0, 0);
    49815232        transform: translate(0, 0);
    49825233}
    49835234
    body.create-blog #buddypress .success { 
    49865237.single-message-thread-header .actions .bp-tooltip:after {
    49875238        left: auto;
    49885239        right: 0;
     5240        -webkit-transform: translate(0, 0);
     5241        -ms-transform: translate(0, 0);
    49895242        transform: translate(0, 0);
    49905243}
    49915244
    body.create-blog #buddypress .success { 
    50015254*/
    50025255#item-body,
    50035256.single-screen-navs {
     5257        -webkit-box-sizing: border-box;
     5258        -moz-box-sizing: border-box;
    50045259        box-sizing: border-box;
    50055260}
    50065261
    50075262.grid > li,
    50085263.grid > li .generic-button a {
     5264        -webkit-box-sizing: border-box;
     5265        -moz-box-sizing: border-box;
    50095266        box-sizing: border-box;
    50105267}
    50115268
  • src/bp-templates/bp-nouveau/css/embeds-activity-rtl.css

    diff --git src/bp-templates/bp-nouveau/css/embeds-activity-rtl.css src/bp-templates/bp-nouveau/css/embeds-activity-rtl.css
    index a548db7d4..17073f077 100644
    a.play-btn:hover { 
    156156                width: 35px;
    157157        }
    158158}
     159
     160/**
     161*-------------------------------------------------------------------------------
     162* Activity Types
     163*-------------------------------------------------------------------------------
     164*/
     165.bp-member-preview-cover,
     166.bp-group-preview-cover {
     167        position: relative;
     168        min-height: 150px;
     169        background: #c5c5c5;
     170}
     171
     172.bp-member-activity-preview a,
     173.bp-group-activity-preview a {
     174    display: block;
     175    max-width: 100%;
     176}
     177
     178.bp-member-preview-cover img,
     179.bp-group-preview-cover img {
     180        background: #c5c5c5;
     181        object-fit: cover;
     182        border: 0;
     183        display: block;
     184        margin: 0;
     185        padding: 0;
     186        width: 100%;
     187        z-index: 1;
     188        height: 150px;
     189}
     190
     191.bp-member-avatar-content,
     192.bp-group-avatar-content {
     193    float: right;
     194        width: 200px;
     195        margin-top: -75px;
     196        position: relative;
     197        z-index: 2;
     198}
     199
     200.bp-member-avatar-content img.profile-photo,
     201.bp-group-avatar-content img.group-photo {
     202        border: solid 2px #fff;
     203        background: rgba(255, 255, 255, 0.8);
     204        margin-right: 20px;
     205}
     206
     207.bp-member-short-description-title a,
     208.bp-group-short-description-title a {
     209        font-weight: 600;
     210}
     211
     212@media screen and (max-width: 46.8em) {
     213        .bp-member-short-description,
     214        .bp-group-short-description {
     215                text-align: center;
     216        }
     217        .bp-member-avatar-content,
     218        .bp-group-avatar-content {
     219        float: none;
     220                width: 100%;
     221        margin-right: auto;
     222                margin-left: auto;
     223                margin-bottom: 15px;
     224        }
     225        .bp-member-avatar-content img.profile-photo,
     226        .bp-group-avatar-content img.group-photo {
     227                margin: auto;
     228        }
     229        .bp-profile-button {
     230                margin-top: 15px;
     231        }
     232}
     233
     234@media screen and (min-width: 46.8em) {
     235        .bp-profile-button {
     236                text-align: left;
     237        }
     238}
  • src/bp-templates/bp-nouveau/css/embeds-activity.css

    diff --git src/bp-templates/bp-nouveau/css/embeds-activity.css src/bp-templates/bp-nouveau/css/embeds-activity.css
    index dafc770be..3e79a0d4f 100644
    a.play-btn:hover { 
    156156                width: 35px;
    157157        }
    158158}
     159
     160/**
     161*-------------------------------------------------------------------------------
     162* Activity Types
     163*-------------------------------------------------------------------------------
     164*/
     165.bp-member-preview-cover,
     166.bp-group-preview-cover {
     167        position: relative;
     168        min-height: 150px;
     169        background: #c5c5c5;
     170}
     171
     172.bp-member-activity-preview a,
     173.bp-group-activity-preview a {
     174    display: block;
     175    max-width: 100%;
     176}
     177
     178.bp-member-preview-cover img,
     179.bp-group-preview-cover img {
     180        background: #c5c5c5;
     181        object-fit: cover;
     182        border: 0;
     183        display: block;
     184        margin: 0;
     185        padding: 0;
     186        width: 100%;
     187        z-index: 1;
     188        height: 150px;
     189}
     190
     191.bp-member-avatar-content,
     192.bp-group-avatar-content {
     193    float: left;
     194        width: 200px;
     195        margin-top: -75px;
     196        position: relative;
     197        z-index: 2;
     198}
     199
     200.bp-member-avatar-content img.profile-photo,
     201.bp-group-avatar-content img.group-photo {
     202        border: solid 2px #fff;
     203        background: rgba(255, 255, 255, 0.8);
     204        margin-left: 20px;
     205}
     206
     207.bp-member-short-description-title a,
     208.bp-group-short-description-title a {
     209        font-weight: 600;
     210}
     211
     212@media screen and (max-width: 46.8em) {
     213        .bp-member-short-description,
     214        .bp-group-short-description {
     215                text-align: center;
     216        }
     217        .bp-member-avatar-content,
     218        .bp-group-avatar-content {
     219        float: none;
     220                width: 100%;
     221        margin-left: auto;
     222                margin-right: auto;
     223                margin-bottom: 15px;
     224        }
     225        .bp-member-avatar-content img.profile-photo,
     226        .bp-group-avatar-content img.group-photo {
     227                margin: auto;
     228        }
     229        .bp-profile-button {
     230                margin-top: 15px;
     231        }
     232}
     233
     234@media screen and (min-width: 46.8em) {
     235        .bp-profile-button {
     236                text-align: right;
     237        }
     238}
  • tests/phpunit/testcases/core/class-bp-attachment.php

    diff --git tests/phpunit/testcases/core/class-bp-attachment.php tests/phpunit/testcases/core/class-bp-attachment.php
    index fae4e150d..6bb1c308b 100644
    class BP_Tests_BP_Attachment_TestCases extends BP_UnitTestCase { 
    406406                $this->clean_files( 'shrink' );
    407407        }
    408408
     409        /**
     410         * @group add_revision
     411         */
     412        public function test_bp_attachment_add_revision() {
     413                if ( false === _wp_image_editor_choose() || version_compare( phpversion(), '7.0' , '<' ) ) {
     414                        $this->markTestSkipped( 'This test requires PHP >= 7.0 and to have a valid image editor that is compatible with WordPress.' );
     415                }
     416
     417                $image = BP_TESTS_DIR . 'assets/upside-down.jpg';
     418
     419                $attachment = new BPTest_Attachment_Extension(
     420                        array(
     421                                'base_dir'   => 'add_revision',
     422                                'action'     => 'attachment_action',
     423                                'file_input' => 'attachment_file_input',
     424                        )
     425                );
     426
     427                $abs_path_copy = $attachment->upload_path . '/upside-down.jpg';
     428                copy( $image, $abs_path_copy );
     429
     430                $revision = $attachment->add_revision(
     431                        'media',
     432                        array(
     433                                'file_abspath' => $abs_path_copy,
     434                                'file_id'      => 'media',
     435                        )
     436                );
     437
     438                $this->assertFalse( file_exists( $abs_path_copy ) );
     439                $this->assertTrue( file_exists( $revision->path ) );
     440
     441                // Cleanup
     442                @unlink( $revision->path );
     443                @rmdir( dirname( $revision->path ) );
     444                $this->clean_files( 'add_revision' );
     445        }
     446
     447        /**
     448         * @group add_revision
     449         * @group avatars
     450         */
     451        public function test_bp_attachment_add_avatar_history() {
     452                if ( false === _wp_image_editor_choose() || version_compare( phpversion(), '7.0' , '<' ) ) {
     453                        $this->markTestSkipped( 'This test requires PHP >= 7.0 and to have a valid image editor that is compatible with WordPress.' );
     454                }
     455
     456                $image = BP_TESTS_DIR . 'assets/upside-down.jpg';
     457
     458                $attachment = new BPTest_Attachment_Extension(
     459                        array(
     460                                'base_dir'   => 'add_history',
     461                                'action'     => 'attachment_action',
     462                                'file_input' => 'attachment_file_input',
     463                        )
     464                );
     465
     466                $abs_path_copy = $attachment->upload_path . '/upside-down.jpg';
     467                copy( $image, $abs_path_copy );
     468
     469                $revision = $attachment->add_revision(
     470                        'avatar',
     471                        array(
     472                                'file_abspath' => $abs_path_copy,
     473                                'file_id'      => 'avatar',
     474                        )
     475                );
     476
     477                $this->assertFalse( file_exists( $abs_path_copy ) );
     478                $this->assertTrue( file_exists( $revision->path ) );
     479                $this->assertSame( $attachment->url . '/history/upside-down.jpg', $revision->url );
     480
     481                // Cleanup
     482                @unlink( $revision->path );
     483                @rmdir( dirname( $revision->path ) );
     484                $this->clean_files( 'add_history' );
     485        }
     486
    409487        public function limit_to_50px( $max_width ) {
    410488                return 50;
    411489        }