Ticket #8581: 8581-d.patch
File 8581-d.patch, 97.5 KB (added by , 3 years ago) |
---|
-
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' ); 108 108 109 109 add_filter( 'bp_activity_get_embed_excerpt', 'bp_activity_embed_excerpt_onclick_location_filter', 9 ); 110 110 111 add_filter( 'bp_get_activity_content_body', 'bp_activity_generate_content_body', 50, 2 ); 112 add_filter( 'bp_activity_get_embed_excerpt', 'bp_activity_generate_embed_excerpt', 50, 2 ); 113 111 114 // Personal data export. 112 115 add_filter( 'wp_privacy_personal_data_exporters', 'bp_activity_register_personal_data_exporter' ); 113 116 … … function bp_activity_register_personal_data_exporter( $exporters ) { 841 844 842 845 return $exporters; 843 846 } 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 */ 857 function 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 */ 1058 function 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..d6a38cb96 100644
function bp_activity_content_body() { 1430 1430 function bp_activity_has_content() { 1431 1431 global $activities_template; 1432 1432 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 } 1436 1452 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 if ( 'created_group' === bp_get_activity_type() ) { 1469 $has_content = true; 1470 } 1471 1472 if ( 'new_member' === bp_get_activity_type() ) { 1473 $has_content = true; 1474 } 1475 1476 if ( 'updated_profile' === bp_get_activity_type() ) { 1477 $has_content = true; 1478 } 1479 } 1480 1481 /** 1482 * Filter here to set activity content. 1483 * 1484 * @since 10.0.0 1485 * 1486 * @param boolean $has_content The activity content. 1487 * @param array $activities_template->activiy The current activity array. 1488 */ 1489 return apply_filters( 'bp_activity_has_content', $has_content, $activities_template->activity ); 1438 1490 } 1439 1491 1440 1492 /** -
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() ) { 409 409 410 410 // It's an avatar, we need to crop it. 411 411 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 ); 422 424 423 425 // It's a cover image we need to fit it to feature's dimensions. 424 426 } 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 ); 430 434 431 435 $created = ! empty( $cover_image['cover_file'] ); 432 436 } … … function bp_attachments_cover_image_ajax_delete() { 1597 1601 } 1598 1602 } 1599 1603 add_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 */ 1613 function 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 */ 1647 function 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' ); 1176 1176 * Handle avatar webcam capture. 1177 1177 * 1178 1178 * @since 2.3.0 1179 * @since 10.0.0 Adds the `$return` param to eventually return the crop result. 1179 1180 * 1180 1181 * @param string $data Base64 encoded image. 1181 1182 * @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. 1183 1185 */ 1184 function bp_avatar_handle_capture( $data = '', $item_id = 0 ) {1186 function bp_avatar_handle_capture( $data = '', $item_id = 0, $return = 'boolean' ) { 1185 1187 if ( empty( $data ) || empty( $item_id ) ) { 1186 1188 return false; 1187 1189 } … … function bp_avatar_handle_capture( $data = '', $item_id = 0 ) { 1237 1239 // Crop to default values. 1238 1240 $crop_args = array( 'item_id' => $item_id, 'original_file' => $avatar_to_crop, 'crop_x' => 0, 'crop_y' => 0 ); 1239 1241 1242 if ( 'array' === $return ) { 1243 return bp_core_avatar_handle_crop( $crop_args, 'array' ); 1244 } 1245 1240 1246 return bp_core_avatar_handle_crop( $crop_args ); 1241 1247 } else { 1242 1248 return false; … … function bp_avatar_handle_capture( $data = '', $item_id = 0 ) { 1247 1253 * Crop an uploaded avatar. 1248 1254 * 1249 1255 * @since 1.1.0 1256 * @since 10.0.0 Adds the `$return` param to eventually return the crop result. 1250 1257 * 1251 1258 * @param array|string $args { 1252 1259 * Array of function parameters. … … function bp_avatar_handle_capture( $data = '', $item_id = 0 ) { 1265 1272 * @type int $crop_x The horizontal starting point of the crop. Default: 0. 1266 1273 * @type int $crop_y The vertical starting point of the crop. Default: 0. 1267 1274 * } 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. 1269 1277 */ 1270 function bp_core_avatar_handle_crop( $args = '' ) {1278 function bp_core_avatar_handle_crop( $args = '', $return = 'boolean' ) { 1271 1279 1272 1280 $r = bp_parse_args( 1273 1281 $args, … … function bp_core_avatar_handle_crop( $args = '' ) { 1306 1314 return false; 1307 1315 } 1308 1316 1317 if ( 'array' === $return ) { 1318 return $cropped; 1319 } 1320 1309 1321 return true; 1310 1322 } 1311 1323 … … function bp_avatar_ajax_set() { 1352 1364 $webcam_avatar = base64_decode( $webcam_avatar ); 1353 1365 } 1354 1366 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 ) { 1356 1370 wp_send_json_error( array( 1357 1371 'feedback_code' => 1 1358 1372 ) ); 1359 1373 1360 1374 } else { 1361 1375 $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 ), 1368 1386 'feedback_code' => 2, 1369 1387 'item_id' => $avatar_data['item_id'], 1370 1388 ); … … function bp_avatar_ajax_set() { 1376 1394 * Fires if the new avatar was successfully captured. 1377 1395 * 1378 1396 * @since 6.0.0 1397 * @since 10.0.0 Adds a new param: an array containing the full, thumb avatar and the timestamp. 1379 1398 * 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. 1383 1403 */ 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 ); 1385 1405 1386 1406 wp_send_json_success( $return ); 1387 1407 } … … function bp_avatar_ajax_set() { 1413 1433 ); 1414 1434 1415 1435 // 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 ) { 1417 1439 $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 ), 1424 1450 'feedback_code' => 2, 1425 1451 'item_id' => $avatar_data['item_id'], 1426 1452 ); … … function bp_avatar_ajax_set() { 1430 1456 do_action_deprecated( 'xprofile_avatar_uploaded', array( (int) $avatar_data['item_id'], $avatar_data['type'], $r ), '6.0.0', 'bp_members_avatar_uploaded' ); 1431 1457 1432 1458 /** 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 ); 1434 1460 } elseif ( 'group' === $avatar_data['object'] ) { 1435 1461 /** 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 ); 1437 1463 } 1438 1464 1439 1465 wp_send_json_success( $return ); … … function bp_avatar_template_check() { 2122 2148 bp_attachments_get_template_part( 'avatars/index' ); 2123 2149 } 2124 2150 } 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 */ 2162 function 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 { 199 199 * @see BP_Attachment::crop for the list of parameters 200 200 * 201 201 * @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). 203 203 */ 204 204 public function crop( $args = array() ) { 205 205 // Bail if the original file is missing. … … class BP_Attachment_Avatar extends BP_Attachment { 255 255 256 256 /** 257 257 * Check that the new avatar doesn't have the same name as the 258 * old one before deleting258 * old one before moving the previous one into history. 259 259 */ 260 260 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 } 262 288 } 263 289 264 290 // Make sure we at least have minimal data for cropping. … … class BP_Attachment_Avatar extends BP_Attachment { 272 298 273 299 // Get the file extension. 274 300 $data = @getimagesize( $absolute_path ); 275 $ext = $data['mime'] == 'image/png' ? 'png' : 'jpg';301 $ext = $data['mime'] === 'image/png' ? 'png' : 'jpg'; 276 302 277 303 $args['original_file'] = $absolute_path; 278 304 $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' ); 280 311 281 312 foreach ( $avatar_types as $key_type => $type ) { 282 313 if ( 'thumb' === $key_type ) { … … class BP_Attachment_Avatar extends BP_Attachment { 287 318 $args['dst_h'] = bp_core_avatar_full_height(); 288 319 } 289 320 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}" ); 291 322 $args['dst_file'] = $avatar_folder_dir . '/' . $filename; 292 323 293 324 $avatar_types[ $key_type ] = parent::crop( $args ); … … class BP_Attachment_Avatar extends BP_Attachment { 296 327 // Remove the original. 297 328 @unlink( $absolute_path ); 298 329 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 ); 301 337 } 302 338 303 339 /** -
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 { 559 559 return $script_data; 560 560 } 561 561 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 562 631 /** 563 632 * Get full data for an image 564 633 * -
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() { 270 270 'crop_h' => $_POST['h'] 271 271 ); 272 272 273 if ( ! bp_core_avatar_handle_crop( $args ) ) { 273 $cropped_avatar = bp_core_avatar_handle_crop( $args, 'array' ); 274 275 if ( ! $cropped_avatar ) { 274 276 bp_core_add_message( __( 'There was an error saving the group profile photo, please try uploading again.', 'buddypress' ), 'error' ); 275 277 } else { 276 278 /** 277 279 * Fires after a group avatar is uploaded. 278 280 * 279 281 * @since 2.8.0 282 * @since 10.0.0 Adds a new param: an array containing the full, thumb avatar and the timestamp. 280 283 * 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. 284 288 */ 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 ); 286 290 287 291 bp_core_add_message( __( 'The group profile photo was uploaded successfully.', 'buddypress' ) ); 288 292 } -
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() { 74 74 'crop_h' => $_POST['h'] 75 75 ); 76 76 77 if ( !bp_core_avatar_handle_crop( $args ) ) { 77 $cropped_avatar = bp_core_avatar_handle_crop( $args, 'array' ); 78 79 if ( ! $cropped_avatar ) { 78 80 bp_core_add_message( __( 'There was a problem cropping the group profile photo.', 'buddypress' ), 'error' ); 79 81 } else { 80 82 /** 81 83 * Fires after a group avatar is uploaded. 82 84 * 83 85 * @since 2.8.0 86 * @since 10.0.0 Adds a new param: an array containing the full, thumb avatar and the timestamp. 84 87 * 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. 88 92 */ 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 ); 90 94 bp_core_add_message( __( 'The new group profile photo was uploaded successfully.', 'buddypress' ) ); 91 95 } 92 96 } … … function groups_screen_group_admin_avatar() { 109 113 */ 110 114 bp_core_load_template( apply_filters( 'groups_template_group_admin_avatar', 'groups/single/home' ) ); 111 115 } 112 add_action( 'bp_screens', 'groups_screen_group_admin_avatar' ); 113 No newline at end of file 116 add_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' ); 166 166 * Adds an activity stream item when a user has uploaded a new avatar. 167 167 * 168 168 * @since 8.0.0 169 * @since 10.0.0 Adds the `$type`, `$crop_data` and `$cropped_avatar` parameters. 169 170 * 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. 171 175 */ 172 function bp_members_new_avatar_activity( $user_id = 0 ) {176 function bp_members_new_avatar_activity( $user_id = 0, $type = '', $crop_data = array(), $cropped_avatar = array() ) { 173 177 174 178 // Bail if activity component is not active. 175 179 if ( ! bp_is_active( 'activity' ) ) { … … function bp_members_new_avatar_activity( $user_id = 0 ) { 230 234 } 231 235 } 232 236 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 233 242 // Add the activity. 234 bp_activity_add(243 $activity_id = bp_activity_add( 235 244 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, 239 249 ) 240 250 ); 241 251 } 242 add_action( 'bp_members_avatar_uploaded', 'bp_members_new_avatar_activity' );252 add_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() { 61 61 'crop_h' => $_POST['h'] 62 62 ); 63 63 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 ) { 65 68 bp_core_add_message( __( 'There was a problem cropping your profile photo.', 'buddypress' ), 'error' ); 66 69 } else { 67 70 … … function bp_members_screen_change_avatar() { 72 75 * Fires right before the redirect, after processing a new avatar. 73 76 * 74 77 * @since 6.0.0 78 * @since 10.0.0 Adds a new param: an array containing the full, thumb avatar and the timestamp. 75 79 * 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. 78 84 */ 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 ); 80 86 81 87 bp_core_add_message( __( 'Your new profile photo was uploaded successfully.', 'buddypress' ) ); 82 88 bp_core_redirect( bp_displayed_user_domain() ); -
src/bp-templates/bp-legacy/buddypress/activity/entry.php
diff --git src/bp-templates/bp-legacy/buddypress/activity/entry.php src/bp-templates/bp-legacy/buddypress/activity/entry.php index 6386939a2..3d46d6dcd 100644
do_action( 'bp_before_activity_entry' ); ?> 37 37 <?php if ( bp_activity_has_content() ) : ?> 38 38 39 39 <div class="activity-inner"> 40 41 <?php bp_ activity_content_body(); ?>40 41 <?php bp_get_template_part( 'activity/type-parts/activity-content', bp_get_activity_type() ); ?> 42 42 43 43 </div> 44 44 -
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. 30 30 4.1 - Smartphones Landscape 31 31 4.2 - Smartphones Portrait 32 32 4.3 - Smartphones - smaller screen sizes 33 5.0 - Activity Types. 33 34 --------------------------------------------------------------*/ 34 35 35 36 /*-------------------------------------------------------------- … … body.register #buddypress div.page ul { 2281 2282 margin: 10px 0 20px; 2282 2283 } 2283 2284 } 2285 2286 /*-------------------------------------------------------------- 2287 5.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. 30 30 4.1 - Smartphones Landscape 31 31 4.2 - Smartphones Portrait 32 32 4.3 - Smartphones - smaller screen sizes 33 5.0 - Activity Types. 33 34 --------------------------------------------------------------*/ 34 35 35 36 /*-------------------------------------------------------------- … … body.register #buddypress div.page ul { 2281 2282 margin: 10px 0 20px; 2282 2283 } 2283 2284 } 2285 2286 /*-------------------------------------------------------------- 2287 5.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 { 154 154 width: 35px; 155 155 } 156 156 } 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 { 154 154 width: 35px; 155 155 } 156 156 } 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/buddypress/activity/entry.php
diff --git src/bp-templates/bp-nouveau/buddypress/activity/entry.php src/bp-templates/bp-nouveau/buddypress/activity/entry.php index 471944678..188755030 100644
bp_nouveau_activity_hook( 'before', 'entry' ); ?> 35 35 36 36 <div class="activity-inner"> 37 37 38 <?php bp_ nouveau_activity_content(); ?>38 <?php bp_get_template_part( 'activity/type-parts/activity-content', bp_get_activity_type() ); ?> 39 39 40 40 </div> 41 41 -
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..39e500d75 100644
body.activity-permalink { 436 436 437 437 } 438 438 } 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-short-description, 461 .bp-group-short-description { 462 position: relative; 463 text-align: center; 464 } 465 466 .bp-members-avatar-wrapper { 467 display: flex; 468 justify-content: center; 469 padding: 0 15px; 470 } 471 472 .bp-members-avatar-content-inner { 473 margin: 0 5px; 474 } 475 476 .bp-member-avatar-content, 477 .bp-group-avatar-content { 478 width: 200px; 479 margin: auto; 480 margin-top: -75px; 481 margin-bottom: 15px; 482 position: relative; 483 z-index: 2; 484 485 img.profile-photo, 486 img.group-photo { 487 width: 100%; 488 max-width: 150px; 489 background: rgba(255, 255, 255, 0.8); 490 border: 5px solid #fff; 491 border-radius: 100px; 492 } 493 } 494 495 .bp-member-short-description-title a, 496 .bp-group-short-description-title a { 497 font-weight: 600; 498 } 499 500 @include medium-max() { 501 502 .bp-member-avatar-content, 503 .bp-group-avatar-content { 504 width: 100%; 505 margin-bottom: 15px; 506 507 img.profile-photo, 508 img.group-photo { 509 margin: auto; 510 } 511 } 512 513 .bp-profile-button { 514 margin-top: 15px; 515 position: relative; 516 } 517 518 } // close @media 519 520 @include medium-up { 521 522 .bp-profile-button { 523 position: absolute; 524 top: 100px; 525 right: 0; 526 } 527 528 } // close @media -
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..f7eaf7f37 100644
body #buddypress select, 69 69 body #buddypress input[type="search"], 70 70 body #buddypress input[type="submit"], 71 71 body #buddypress input[type="reset"] { 72 -webkit-border-radius: 2px; 73 -moz-border-radius: 2px; 74 -ms-border-radius: 2px; 72 75 border-radius: 2px; 73 76 background-clip: padding-box; 74 77 } … … body #buddypress .bp-lists blockquote { 79 82 } 80 83 81 84 body #buddypress .bp-list .action { 85 -webkit-box-sizing: border-box; 86 -moz-box-sizing: border-box; 82 87 box-sizing: border-box; 83 88 } 84 89 … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 375 380 .buddypress-wrap.bp-dir-hori-nav:not(.bp-vertical-navs) nav:not(.tabbed-links) { 376 381 border-bottom: 1px solid #eee; 377 382 border-top: 1px solid #eee; 383 -webkit-box-shadow: 0 2px 12px 0 #fafafa; 384 -moz-box-shadow: 0 2px 12px 0 #fafafa; 378 385 box-shadow: 0 2px 12px 0 #fafafa; 379 386 } 380 387 } … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 868 875 } 869 876 870 877 .bp-list { 878 -webkit-box-sizing: border-box; 879 -moz-box-sizing: border-box; 871 880 box-sizing: border-box; 872 881 border-top: 1px solid #eaeaea; 873 882 clear: both; … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1018 1027 .activity-list.bp-list .activity-item { 1019 1028 background: #fff; 1020 1029 border: 1px solid #b7b7b7; 1030 -webkit-box-shadow: 0 0 6px #d2d2d2; 1031 -moz-box-shadow: 0 0 6px #d2d2d2; 1021 1032 box-shadow: 0 0 6px #d2d2d2; 1022 1033 margin: 20px 0; 1023 1034 } … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1038 1049 @media screen and (min-width: 46.8em) { 1039 1050 .friends-request-list li, 1040 1051 .membership-requests-list li { 1052 display: -webkit-flex; 1041 1053 display: -moz-flex; 1042 1054 display: -ms-flex; 1043 1055 display: -o-flex; 1044 1056 display: flex; 1057 -webkit-flex-flow: row nowrap; 1058 -moz-flex-flow: row nowrap; 1059 -ms-flex-flow: row nowrap; 1045 1060 -o-flex-flow: row nowrap; 1046 1061 flex-flow: row nowrap; 1047 1062 } 1048 1063 .friends-request-list li .item, 1049 1064 .membership-requests-list li .item { 1065 -webkit-flex: 1 1 auto; 1050 1066 -moz-flex: 1 1 auto; 1067 -ms-flex: 1 1 auto; 1051 1068 -o-flex: 1 1 auto; 1052 1069 flex: 1 1 auto; 1053 1070 } … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1103 1120 1104 1121 .activity-update-form { 1105 1122 border: 1px solid #ccc; 1123 -webkit-box-shadow: inset 0 0 6px #eee; 1124 -moz-box-shadow: inset 0 0 6px #eee; 1106 1125 box-shadow: inset 0 0 6px #eee; 1107 1126 margin: 15px 0; 1108 1127 } … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1125 1144 1126 1145 .activity-update-form #whats-new-textarea textarea { 1127 1146 background: #fff; 1147 -webkit-box-sizing: border-box; 1148 -moz-box-sizing: border-box; 1128 1149 box-sizing: border-box; 1129 1150 color: #333; 1130 1151 font-family: inherit; … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1136 1157 } 1137 1158 1138 1159 .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; 1139 1162 box-shadow: 0 0 6px 0 #d6d6d6; 1140 1163 } 1141 1164 … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1164 1187 } 1165 1188 1166 1189 .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; 1167 1193 display: flex; 1194 -ms-flex-align: center; 1195 -webkit-align-items: center; 1196 -webkit-box-align: center; 1168 1197 align-items: center; 1169 1198 padding: 0.2em; 1170 1199 } … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1512 1541 .buddypress-wrap .activity-list .load-newest:focus, 1513 1542 .buddypress-wrap .activity-list .load-newest:hover { 1514 1543 border-color: #e1e1e1; 1544 -webkit-box-shadow: 0 0 6px 0 #eaeaea; 1545 -moz-box-shadow: 0 0 6px 0 #eaeaea; 1515 1546 box-shadow: 0 0 6px 0 #eaeaea; 1516 1547 } 1517 1548 … … body.activity-permalink .activity-list .activity-comments { 1577 1608 top: -20px; 1578 1609 } 1579 1610 body.activity-permalink .activity-list .activity-avatar img { 1611 -webkit-box-shadow: 0 0 0 8px #fff; 1580 1612 box-shadow: 0 0 0 8px #fff; 1581 1613 } 1582 1614 body.activity-permalink .activity-list .activity-content { … … body.activity-permalink .activity-list .activity-comments { 1587 1619 } 1588 1620 } 1589 1621 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-short-description, 1643 .bp-group-short-description { 1644 position: relative; 1645 text-align: center; 1646 } 1647 1648 .bp-members-avatar-wrapper { 1649 display: flex; 1650 justify-content: center; 1651 padding: 0 15px; 1652 } 1653 1654 .bp-members-avatar-content-inner { 1655 margin: 0 5px; 1656 } 1657 1658 .bp-member-avatar-content, 1659 .bp-group-avatar-content { 1660 width: 200px; 1661 margin: auto; 1662 margin-top: -75px; 1663 margin-bottom: 15px; 1664 position: relative; 1665 z-index: 2; 1666 } 1667 1668 .bp-member-avatar-content img.profile-photo, 1669 .bp-member-avatar-content img.group-photo, 1670 .bp-group-avatar-content img.profile-photo, 1671 .bp-group-avatar-content img.group-photo { 1672 width: 100%; 1673 max-width: 150px; 1674 background: rgba(255, 255, 255, 0.8); 1675 border: 5px solid #fff; 1676 border-radius: 100px; 1677 } 1678 1679 .bp-member-short-description-title a, 1680 .bp-group-short-description-title a { 1681 font-weight: 600; 1682 } 1683 1684 @media screen and (max-width: 46.8em) { 1685 .bp-member-avatar-content, 1686 .bp-group-avatar-content { 1687 width: 100%; 1688 margin-bottom: 15px; 1689 } 1690 .bp-member-avatar-content img.profile-photo, 1691 .bp-member-avatar-content img.group-photo, 1692 .bp-group-avatar-content img.profile-photo, 1693 .bp-group-avatar-content img.group-photo { 1694 margin: auto; 1695 } 1696 .bp-profile-button { 1697 margin-top: 15px; 1698 position: relative; 1699 } 1700 } 1701 1702 @media screen and (min-width: 46.8em) { 1703 .bp-profile-button { 1704 position: absolute; 1705 top: 100px; 1706 left: 0; 1707 } 1708 } 1709 1590 1710 /** 1591 1711 *----------------------------------------------------- 1592 1712 * @section 3.1.3 - Activity Comments … … form.ac-form .ac-reply-content .ac-textarea textarea { 1757 1877 } 1758 1878 1759 1879 form.ac-form .ac-reply-content .ac-textarea textarea:focus { 1880 -webkit-box-shadow: 0 0 6px #d6d6d6; 1881 -moz-box-shadow: 0 0 6px #d6d6d6; 1760 1882 box-shadow: 0 0 6px #d6d6d6; 1761 1883 } 1762 1884 … … form.ac-form .ac-reply-content input { 1820 1942 1821 1943 .buddypress-wrap .groups-list li .group-desc { 1822 1944 border: 1px solid #eaeaea; 1945 -webkit-border-radius: 10px; 1946 -moz-border-radius: 10px; 1947 -ms-border-radius: 10px; 1823 1948 border-radius: 10px; 1824 1949 background-clip: padding-box; 1825 1950 font-size: 13px; … … form.ac-form .ac-reply-content input { 1895 2020 1896 2021 .buddypress-wrap .members-list li .user-update { 1897 2022 border: 1px solid #eaeaea; 2023 -webkit-border-radius: 10px; 2024 -moz-border-radius: 10px; 2025 -ms-border-radius: 10px; 1898 2026 border-radius: 10px; 1899 2027 background-clip: padding-box; 1900 2028 color: #737373; … … form.ac-form .ac-reply-content input { 1944 2072 *------------------------------------------------------------------------------- 1945 2073 */ 1946 2074 .register-page .register-section { 2075 -webkit-box-sizing: border-box; 2076 -moz-box-sizing: border-box; 1947 2077 box-sizing: border-box; 1948 2078 } 1949 2079 … … body.no-js .single-item-header .js-self-profile-button { 2353 2483 } 2354 2484 2355 2485 .groups-header .moderators-lists img.avatar { 2486 -moz-box-shadow: none; 2487 -webkit-box-shadow: none; 2356 2488 box-shadow: none; 2357 2489 float: none; 2358 2490 height: 30px; … … body.no-js .single-item-header .js-self-profile-button { 2390 2522 2391 2523 .groups-header .desc-wrap .group-description { 2392 2524 background: #fafafa; 2525 -webkit-box-shadow: inset 0 0 9px #ccc; 2526 -moz-box-shadow: inset 0 0 9px #ccc; 2393 2527 box-shadow: inset 0 0 9px #ccc; 2394 2528 padding: 1em; 2395 2529 text-align: right; … … body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 2668 2802 } 2669 2803 2670 2804 .buddypress .bp-invites-content ul.item-list li.selected { 2805 -webkit-box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2); 2806 -moz-box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2); 2671 2807 box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2); 2672 2808 } 2673 2809 … … body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 2739 2875 2740 2876 @media screen and (min-width: 46.8em) { 2741 2877 .buddypress .bp-invites-content ul.item-list > li { 2878 -webkit-box-sizing: border-box; 2879 -moz-box-sizing: border-box; 2742 2880 box-sizing: border-box; 2743 2881 border: 1px solid #eaeaea; 2744 2882 float: right; … … body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 2760 2898 2761 2899 @media screen and (min-width: 46.8em) { 2762 2900 :not(.vertical) + .item-body #group-invites-container { 2901 display: -ms-grid; 2763 2902 display: grid; 2903 -ms-grid-columns: 25% auto; 2764 2904 grid-template-columns: 25% auto; 2765 2905 grid-template-areas: "group-invites-nav group-invites-column"; 2766 2906 } … … body.register .buddypress-wrap .page ul { 3019 3159 } 3020 3160 3021 3161 .bp-messages-content .avatar { 3162 -moz-box-shadow: none; 3163 -webkit-box-shadow: none; 3022 3164 box-shadow: none; 3023 3165 } 3024 3166 … … body.register .buddypress-wrap .page ul { 3049 3191 3050 3192 #message-threads li { 3051 3193 border-bottom: 1px solid #eaeaea; 3194 display: -webkit-flex; 3052 3195 display: -moz-flex; 3053 3196 display: -ms-flex; 3054 3197 display: -o-flex; 3055 3198 display: flex; 3199 -webkit-flex-flow: row nowrap; 3200 -moz-flex-flow: row nowrap; 3201 -ms-flex-flow: row nowrap; 3056 3202 -o-flex-flow: row nowrap; 3057 3203 flex-flow: row nowrap; 3058 3204 margin: 0; … … body.register .buddypress-wrap .page ul { 3061 3207 } 3062 3208 3063 3209 #message-threads li .thread-cb { 3210 display: -webkit-box; 3211 display: -ms-flexbox; 3212 display: -webkit-flex; 3064 3213 display: flex; 3214 -ms-flex-align: center; 3215 -webkit-align-items: center; 3216 -webkit-box-align: center; 3065 3217 align-items: center; 3218 -webkit-flex: 1 2 5%; 3066 3219 -moz-flex: 1 2 5%; 3220 -ms-flex: 1 2 5%; 3067 3221 -o-flex: 1 2 5%; 3068 3222 flex: 1 2 5%; 3069 3223 } 3070 3224 3071 3225 #message-threads li .thread-from, 3072 3226 #message-threads li .thread-to { 3227 -webkit-flex: 1 2 20%; 3073 3228 -moz-flex: 1 2 20%; 3229 -ms-flex: 1 2 20%; 3074 3230 -o-flex: 1 2 20%; 3075 3231 flex: 1 2 20%; 3076 3232 } … … body.register .buddypress-wrap .page ul { 3096 3252 } 3097 3253 3098 3254 #message-threads li .thread-content { 3255 -webkit-flex: 1 2 60%; 3099 3256 -moz-flex: 1 2 60%; 3257 -ms-flex: 1 2 60%; 3100 3258 -o-flex: 1 2 60%; 3101 3259 flex: 1 2 60%; 3102 3260 } 3103 3261 3104 3262 #message-threads li .thread-date { 3263 -webkit-flex: 1 2 15%; 3105 3264 -moz-flex: 1 2 15%; 3265 -ms-flex: 1 2 15%; 3106 3266 -o-flex: 1 2 15%; 3107 3267 flex: 1 2 15%; 3108 3268 } … … body.register .buddypress-wrap .page ul { 3204 3364 3205 3365 .bp-messages-content #bp-message-thread-list .message-metadata { 3206 3366 border-bottom: 1px solid #ccc; 3367 -webkit-box-shadow: 2px 1px 9px 0 #eee; 3368 -moz-box-shadow: 2px 1px 9px 0 #eee; 3207 3369 box-shadow: 2px 1px 9px 0 #eee; 3208 3370 display: table; 3209 3371 padding: 0.2em; … … body.buddypress.settings.data #buddypress.buddypress-wrap .item-body p a { 3447 3609 .buddypress-wrap input[type="url"]:focus, 3448 3610 .buddypress-wrap input[type="tel"]:focus, 3449 3611 .buddypress-wrap input[type="password"]:focus { 3612 -webkit-box-shadow: 0 0 8px #eaeaea; 3613 -moz-box-shadow: 0 0 8px #eaeaea; 3450 3614 box-shadow: 0 0 8px #eaeaea; 3451 3615 } 3452 3616 … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 3686 3850 } 3687 3851 3688 3852 .buddypress-wrap .select-wrap select { 3853 -moz-appearance: none; 3689 3854 -webkit-appearance: none; 3690 3855 -o-appearance: none; 3691 3856 appearance: none; … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 3780 3945 .buddypress-wrap form#group-members-search button[type="submit"] { 3781 3946 background: none; 3782 3947 border: 0; 3948 -webkit-border-radius: 0; 3949 -moz-border-radius: 0; 3950 -ms-border-radius: 0; 3783 3951 border-radius: 0; 3784 3952 background-clip: padding-box; 3785 3953 } … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4056 4224 } 4057 4225 4058 4226 .center-vert { 4227 display: -ms-flexbox; 4228 display: -webkit-flex; 4059 4229 display: flex; 4230 -ms-flex-align: center; 4231 -webkit-align-items: center; 4232 -webkit-box-align: center; 4060 4233 align-items: center; 4061 4234 } 4062 4235 … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4170 4343 .buddypress .buddypress-wrap input.text-button { 4171 4344 background: none; 4172 4345 border: 0; 4346 -moz-box-shadow: none; 4347 -webkit-box-shadow: none; 4173 4348 box-shadow: none; 4174 4349 color: #767676; 4175 4350 } … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4265 4440 4266 4441 .buddypress #buddypress .create-button a { 4267 4442 border: 1px solid #ccc; 4443 -webkit-border-radius: 5px; 4444 -moz-border-radius: 5px; 4445 -ms-border-radius: 5px; 4268 4446 border-radius: 5px; 4269 4447 background-clip: padding-box; 4448 -webkit-box-shadow: inset 0 0 6px 0 #eaeaea; 4449 -moz-box-shadow: inset 0 0 6px 0 #eaeaea; 4270 4450 box-shadow: inset 0 0 6px 0 #eaeaea; 4271 4451 margin: 0.2em 0; 4272 4452 width: auto; … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4275 4455 .buddypress #buddypress .create-button a:focus, .buddypress #buddypress .create-button a:hover { 4276 4456 background: none; 4277 4457 border-color: #ccc; 4458 -webkit-box-shadow: inset 0 0 12px 0 #eaeaea; 4459 -moz-box-shadow: inset 0 0 12px 0 #eaeaea; 4278 4460 box-shadow: inset 0 0 12px 0 #eaeaea; 4279 4461 } 4280 4462 … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4296 4478 .buddypress #buddypress.bp-dir-hori-nav .create-button a:hover { 4297 4479 background: none; 4298 4480 border: 0; 4481 -moz-box-shadow: none; 4482 -webkit-box-shadow: none; 4299 4483 box-shadow: none; 4300 4484 margin: 0; 4301 4485 } … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4396 4580 .buddypress-wrap #group-create-body .bp-cover-image-status p.warning { 4397 4581 background: #0b80a4; 4398 4582 border: 0; 4583 -webkit-box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2); 4584 -moz-box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2); 4399 4585 box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2); 4400 4586 color: #fff; 4401 4587 } 4402 4588 4403 4589 .buddypress-wrap .bp-feedback:not(.custom-homepage-info) { 4590 display: -webkit-flex; 4404 4591 display: -moz-flex; 4405 4592 display: -ms-flex; 4406 4593 display: -o-flex; 4407 4594 display: flex; 4595 -webkit-flex-flow: row nowrap; 4596 -moz-flex-flow: row nowrap; 4597 -ms-flex-flow: row nowrap; 4408 4598 -o-flex-flow: row nowrap; 4409 4599 flex-flow: row nowrap; 4600 -ms-flex-align: stretch; 4601 -webkit-align-items: stretch; 4602 -webkit-box-align: stretch; 4410 4603 align-items: stretch; 4411 4604 align-items: center; 4412 4605 } … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4414 4607 .buddypress-wrap .bp-feedback { 4415 4608 background: #fff; 4416 4609 color: #807f7f; 4610 -webkit-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4611 -moz-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4417 4612 box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4418 4613 color: #737373; 4419 4614 margin: 10px 0; … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4492 4687 .buddypress-wrap .bp-feedback.loading .bp-icon, 4493 4688 .buddypress-wrap .bp-feedback.success .bp-icon, 4494 4689 .buddypress-wrap .bp-feedback.updated .bp-icon { 4690 display: -webkit-box; 4691 display: -ms-flexbox; 4692 display: -webkit-flex; 4495 4693 display: flex; 4694 -ms-flex-align: center; 4695 -webkit-align-items: center; 4696 -webkit-box-align: center; 4496 4697 align-items: center; 4497 4698 align-self: stretch; 4498 4699 } … … body.create-blog #buddypress .error, 4615 4816 body.create-blog #buddypress .success { 4616 4817 background: #fff; 4617 4818 color: #807f7f; 4819 -webkit-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4820 -moz-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4618 4821 box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4619 4822 color: #737373; 4620 4823 padding: 10px 15px; … … body.create-blog #buddypress .success { 4734 4937 } 4735 4938 4736 4939 .buddypress.widget .avatar-block { 4940 display: -webkit-flex; 4737 4941 display: -moz-flex; 4738 4942 display: -ms-flex; 4739 4943 display: -o-flex; 4740 4944 display: flex; 4945 -webkit-flex-flow: row wrap; 4946 -moz-flex-flow: row wrap; 4947 -ms-flex-flow: row wrap; 4741 4948 -o-flex-flow: row wrap; 4742 4949 flex-flow: row wrap; 4743 4950 } … … body.create-blog #buddypress .success { 4784 4991 .buddypress-wrap .buddypress.widget ul#friends-list, 4785 4992 .buddypress-wrap .buddypress.widget ul#groups-list, 4786 4993 .buddypress-wrap .buddypress.widget ul#members-list { 4994 display: -webkit-flex; 4787 4995 display: -moz-flex; 4788 4996 display: -ms-flex; 4789 4997 display: -o-flex; 4790 4998 display: flex; 4999 -webkit-flex-flow: column nowrap; 5000 -moz-flex-flow: column nowrap; 5001 -ms-flex-flow: column nowrap; 4791 5002 -o-flex-flow: column nowrap; 4792 5003 flex-flow: column nowrap; 4793 5004 } … … body.create-blog #buddypress .success { 4796 5007 .buddypress-wrap .buddypress.widget ul#friends-list, 4797 5008 .buddypress-wrap .buddypress.widget ul#groups-list, 4798 5009 .buddypress-wrap .buddypress.widget ul#members-list { 5010 display: -webkit-flex; 4799 5011 display: -moz-flex; 4800 5012 display: -ms-flex; 4801 5013 display: -o-flex; 4802 5014 display: flex; 5015 -webkit-flex-flow: row wrap; 5016 -moz-flex-flow: row wrap; 5017 -ms-flex-flow: row wrap; 4803 5018 -o-flex-flow: row wrap; 4804 5019 flex-flow: row wrap; 4805 5020 } … … body.create-blog #buddypress .success { 4809 5024 .buddypress-wrap .buddypress.widget ul#groups-list li, 4810 5025 .buddypress-wrap .buddypress.widget ul#members-list li { 4811 5026 border: 1px solid #eee; 5027 -ms-flex-align: stretch; 5028 -webkit-align-items: stretch; 5029 -webkit-box-align: stretch; 4812 5030 align-items: stretch; 5031 -webkit-flex: 1 1 46%; 4813 5032 -moz-flex: 1 1 46%; 5033 -ms-flex: 1 1 46%; 4814 5034 -o-flex: 1 1 46%; 4815 5035 flex: 1 1 46%; 4816 5036 margin: 2%; … … body.create-blog #buddypress .success { 4820 5040 .buddypress-wrap .buddypress.widget ul#friends-list li, 4821 5041 .buddypress-wrap .buddypress.widget ul#groups-list li, 4822 5042 .buddypress-wrap .buddypress.widget ul#members-list li { 5043 -webkit-flex: 0 1 20%; 4823 5044 -moz-flex: 0 1 20%; 5045 -ms-flex: 0 1 20%; 4824 5046 -o-flex: 0 1 20%; 4825 5047 flex: 0 1 20%; 4826 5048 } … … body.create-blog #buddypress .success { 4856 5078 .buddypress-wrap .buddypress.widget ul#friends-list li, 4857 5079 .buddypress-wrap .buddypress.widget ul#groups-list li, 4858 5080 .buddypress-wrap .buddypress.widget ul#members-list li { 5081 -webkit-flex: 0 1 auto; 4859 5082 -moz-flex: 0 1 auto; 5083 -ms-flex: 0 1 auto; 4860 5084 -o-flex: 0 1 auto; 4861 5085 flex: 0 1 auto; 4862 5086 margin: 10px 2% 1%; … … body.create-blog #buddypress .success { 4884 5108 4885 5109 .buddypress-wrap a.loading, 4886 5110 .buddypress-wrap input.loading { 5111 -moz-animation: loader-pulsate 0.5s infinite ease-in-out alternate; 5112 -webkit-animation: loader-pulsate 0.5s infinite ease-in-out alternate; 4887 5113 animation: loader-pulsate 0.5s infinite ease-in-out alternate; 4888 5114 border-color: #aaa; 4889 5115 } 4890 5116 5117 @-webkit-keyframes loader-pulsate { 5118 from { 5119 border-color: #aaa; 5120 -webkit-box-shadow: 0 0 6px #ccc; 5121 box-shadow: 0 0 6px #ccc; 5122 } 5123 to { 5124 border-color: #ccc; 5125 -webkit-box-shadow: 0 0 6px #f8f8f8; 5126 box-shadow: 0 0 6px #f8f8f8; 5127 } 5128 } 5129 5130 @-moz-keyframes loader-pulsate { 5131 from { 5132 border-color: #aaa; 5133 -moz-box-shadow: 0 0 6px #ccc; 5134 box-shadow: 0 0 6px #ccc; 5135 } 5136 to { 5137 border-color: #ccc; 5138 -moz-box-shadow: 0 0 6px #f8f8f8; 5139 box-shadow: 0 0 6px #f8f8f8; 5140 } 5141 } 5142 4891 5143 @keyframes loader-pulsate { 4892 5144 from { 4893 5145 border-color: #aaa; 5146 -moz-box-shadow: 0 0 6px #ccc; 4894 5147 box-shadow: 0 0 6px #ccc; 4895 5148 } 4896 5149 to { 4897 5150 border-color: #ccc; 5151 -moz-box-shadow: 0 0 6px #f8f8f8; 4898 5152 box-shadow: 0 0 6px #f8f8f8; 4899 5153 } 4900 5154 } … … body.create-blog #buddypress .success { 4913 5167 display: none; 4914 5168 opacity: 0; 4915 5169 position: absolute; 5170 -webkit-transform: translate3d(0, 0, 0); 5171 -ms-transform: translate3d(0, 0, 0); 4916 5172 transform: translate3d(0, 0, 0); 4917 5173 visibility: hidden; 4918 5174 } … … body.create-blog #buddypress .success { 4933 5189 pointer-events: none; 4934 5190 text-shadow: none; 4935 5191 text-transform: none; 5192 -webkit-transition: all 1.5s ease; 5193 -ms-transition: all 1.5s ease; 4936 5194 transition: all 1.5s ease; 4937 5195 white-space: nowrap; 4938 5196 word-wrap: break-word; … … body.create-blog #buddypress .success { 4956 5214 right: 50%; 4957 5215 margin-top: 7px; 4958 5216 top: 110%; 5217 -webkit-transform: translate(50%, 0); 5218 -ms-transform: translate(50%, 0); 4959 5219 transform: translate(50%, 0); 4960 5220 } 4961 5221 4962 5222 .user-list .bp-tooltip:after { 4963 5223 right: 0; 5224 -webkit-transform: translate(0, 0); 5225 -ms-transform: translate(0, 0); 4964 5226 transform: translate(0, 0); 4965 5227 } 4966 5228 … … body.create-blog #buddypress .success { 4968 5230 .user-list .bp-tooltip:after { 4969 5231 right: auto; 4970 5232 left: 0; 5233 -webkit-transform: translate(0, 0); 5234 -ms-transform: translate(0, 0); 4971 5235 transform: translate(0, 0); 4972 5236 } 4973 5237 } … … body.create-blog #buddypress .success { 4978 5242 .notification-actions .bp-tooltip:after, 4979 5243 .participants-list .bp-tooltip:after { 4980 5244 right: 0; 5245 -webkit-transform: translate(0, 0); 5246 -ms-transform: translate(0, 0); 4981 5247 transform: translate(0, 0); 4982 5248 } 4983 5249 … … body.create-blog #buddypress .success { 4986 5252 .single-message-thread-header .actions .bp-tooltip:after { 4987 5253 right: auto; 4988 5254 left: 0; 5255 -webkit-transform: translate(0, 0); 5256 -ms-transform: translate(0, 0); 4989 5257 transform: translate(0, 0); 4990 5258 } 4991 5259 … … body.create-blog #buddypress .success { 5001 5269 */ 5002 5270 #item-body, 5003 5271 .single-screen-navs { 5272 -webkit-box-sizing: border-box; 5273 -moz-box-sizing: border-box; 5004 5274 box-sizing: border-box; 5005 5275 } 5006 5276 5007 5277 .grid > li, 5008 5278 .grid > li .generic-button a { 5279 -webkit-box-sizing: border-box; 5280 -moz-box-sizing: border-box; 5009 5281 box-sizing: border-box; 5010 5282 } 5011 5283 -
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..4c20d1f71 100644
body #buddypress select, 69 69 body #buddypress input[type="search"], 70 70 body #buddypress input[type="submit"], 71 71 body #buddypress input[type="reset"] { 72 -webkit-border-radius: 2px; 73 -moz-border-radius: 2px; 74 -ms-border-radius: 2px; 72 75 border-radius: 2px; 73 76 background-clip: padding-box; 74 77 } … … body #buddypress .bp-lists blockquote { 79 82 } 80 83 81 84 body #buddypress .bp-list .action { 85 -webkit-box-sizing: border-box; 86 -moz-box-sizing: border-box; 82 87 box-sizing: border-box; 83 88 } 84 89 … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 375 380 .buddypress-wrap.bp-dir-hori-nav:not(.bp-vertical-navs) nav:not(.tabbed-links) { 376 381 border-bottom: 1px solid #eee; 377 382 border-top: 1px solid #eee; 383 -webkit-box-shadow: 0 2px 12px 0 #fafafa; 384 -moz-box-shadow: 0 2px 12px 0 #fafafa; 378 385 box-shadow: 0 2px 12px 0 #fafafa; 379 386 } 380 387 } … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 868 875 } 869 876 870 877 .bp-list { 878 -webkit-box-sizing: border-box; 879 -moz-box-sizing: border-box; 871 880 box-sizing: border-box; 872 881 border-top: 1px solid #eaeaea; 873 882 clear: both; … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1018 1027 .activity-list.bp-list .activity-item { 1019 1028 background: #fff; 1020 1029 border: 1px solid #b7b7b7; 1030 -webkit-box-shadow: 0 0 6px #d2d2d2; 1031 -moz-box-shadow: 0 0 6px #d2d2d2; 1021 1032 box-shadow: 0 0 6px #d2d2d2; 1022 1033 margin: 20px 0; 1023 1034 } … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1038 1049 @media screen and (min-width: 46.8em) { 1039 1050 .friends-request-list li, 1040 1051 .membership-requests-list li { 1052 display: -webkit-flex; 1041 1053 display: -moz-flex; 1042 1054 display: -ms-flex; 1043 1055 display: -o-flex; 1044 1056 display: flex; 1057 -webkit-flex-flow: row nowrap; 1058 -moz-flex-flow: row nowrap; 1059 -ms-flex-flow: row nowrap; 1045 1060 -o-flex-flow: row nowrap; 1046 1061 flex-flow: row nowrap; 1047 1062 } 1048 1063 .friends-request-list li .item, 1049 1064 .membership-requests-list li .item { 1065 -webkit-flex: 1 1 auto; 1050 1066 -moz-flex: 1 1 auto; 1067 -ms-flex: 1 1 auto; 1051 1068 -o-flex: 1 1 auto; 1052 1069 flex: 1 1 auto; 1053 1070 } … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1103 1120 1104 1121 .activity-update-form { 1105 1122 border: 1px solid #ccc; 1123 -webkit-box-shadow: inset 0 0 6px #eee; 1124 -moz-box-shadow: inset 0 0 6px #eee; 1106 1125 box-shadow: inset 0 0 6px #eee; 1107 1126 margin: 15px 0; 1108 1127 } … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1125 1144 1126 1145 .activity-update-form #whats-new-textarea textarea { 1127 1146 background: #fff; 1147 -webkit-box-sizing: border-box; 1148 -moz-box-sizing: border-box; 1128 1149 box-sizing: border-box; 1129 1150 color: #333; 1130 1151 font-family: inherit; … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1136 1157 } 1137 1158 1138 1159 .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; 1139 1162 box-shadow: 0 0 6px 0 #d6d6d6; 1140 1163 } 1141 1164 … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1164 1187 } 1165 1188 1166 1189 .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; 1167 1193 display: flex; 1194 -ms-flex-align: center; 1195 -webkit-align-items: center; 1196 -webkit-box-align: center; 1168 1197 align-items: center; 1169 1198 padding: 0.2em; 1170 1199 } … … body.buddypress article.page > .entry-header:not(.alignwide):not(.alignfull) .en 1512 1541 .buddypress-wrap .activity-list .load-newest:focus, 1513 1542 .buddypress-wrap .activity-list .load-newest:hover { 1514 1543 border-color: #e1e1e1; 1544 -webkit-box-shadow: 0 0 6px 0 #eaeaea; 1545 -moz-box-shadow: 0 0 6px 0 #eaeaea; 1515 1546 box-shadow: 0 0 6px 0 #eaeaea; 1516 1547 } 1517 1548 … … body.activity-permalink .activity-list .activity-comments { 1577 1608 top: -20px; 1578 1609 } 1579 1610 body.activity-permalink .activity-list .activity-avatar img { 1611 -webkit-box-shadow: 0 0 0 8px #fff; 1580 1612 box-shadow: 0 0 0 8px #fff; 1581 1613 } 1582 1614 body.activity-permalink .activity-list .activity-content { … … body.activity-permalink .activity-list .activity-comments { 1587 1619 } 1588 1620 } 1589 1621 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-short-description, 1643 .bp-group-short-description { 1644 position: relative; 1645 text-align: center; 1646 } 1647 1648 .bp-members-avatar-wrapper { 1649 display: flex; 1650 justify-content: center; 1651 padding: 0 15px; 1652 } 1653 1654 .bp-members-avatar-content-inner { 1655 margin: 0 5px; 1656 } 1657 1658 .bp-member-avatar-content, 1659 .bp-group-avatar-content { 1660 width: 200px; 1661 margin: auto; 1662 margin-top: -75px; 1663 margin-bottom: 15px; 1664 position: relative; 1665 z-index: 2; 1666 } 1667 1668 .bp-member-avatar-content img.profile-photo, 1669 .bp-member-avatar-content img.group-photo, 1670 .bp-group-avatar-content img.profile-photo, 1671 .bp-group-avatar-content img.group-photo { 1672 width: 100%; 1673 max-width: 150px; 1674 background: rgba(255, 255, 255, 0.8); 1675 border: 5px solid #fff; 1676 border-radius: 100px; 1677 } 1678 1679 .bp-member-short-description-title a, 1680 .bp-group-short-description-title a { 1681 font-weight: 600; 1682 } 1683 1684 @media screen and (max-width: 46.8em) { 1685 .bp-member-avatar-content, 1686 .bp-group-avatar-content { 1687 width: 100%; 1688 margin-bottom: 15px; 1689 } 1690 .bp-member-avatar-content img.profile-photo, 1691 .bp-member-avatar-content img.group-photo, 1692 .bp-group-avatar-content img.profile-photo, 1693 .bp-group-avatar-content img.group-photo { 1694 margin: auto; 1695 } 1696 .bp-profile-button { 1697 margin-top: 15px; 1698 position: relative; 1699 } 1700 } 1701 1702 @media screen and (min-width: 46.8em) { 1703 .bp-profile-button { 1704 position: absolute; 1705 top: 100px; 1706 right: 0; 1707 } 1708 } 1709 1590 1710 /** 1591 1711 *----------------------------------------------------- 1592 1712 * @section 3.1.3 - Activity Comments … … form.ac-form .ac-reply-content .ac-textarea textarea { 1757 1877 } 1758 1878 1759 1879 form.ac-form .ac-reply-content .ac-textarea textarea:focus { 1880 -webkit-box-shadow: 0 0 6px #d6d6d6; 1881 -moz-box-shadow: 0 0 6px #d6d6d6; 1760 1882 box-shadow: 0 0 6px #d6d6d6; 1761 1883 } 1762 1884 … … form.ac-form .ac-reply-content input { 1820 1942 1821 1943 .buddypress-wrap .groups-list li .group-desc { 1822 1944 border: 1px solid #eaeaea; 1945 -webkit-border-radius: 10px; 1946 -moz-border-radius: 10px; 1947 -ms-border-radius: 10px; 1823 1948 border-radius: 10px; 1824 1949 background-clip: padding-box; 1825 1950 font-size: 13px; … … form.ac-form .ac-reply-content input { 1895 2020 1896 2021 .buddypress-wrap .members-list li .user-update { 1897 2022 border: 1px solid #eaeaea; 2023 -webkit-border-radius: 10px; 2024 -moz-border-radius: 10px; 2025 -ms-border-radius: 10px; 1898 2026 border-radius: 10px; 1899 2027 background-clip: padding-box; 1900 2028 color: #737373; … … form.ac-form .ac-reply-content input { 1944 2072 *------------------------------------------------------------------------------- 1945 2073 */ 1946 2074 .register-page .register-section { 2075 -webkit-box-sizing: border-box; 2076 -moz-box-sizing: border-box; 1947 2077 box-sizing: border-box; 1948 2078 } 1949 2079 … … body.no-js .single-item-header .js-self-profile-button { 2353 2483 } 2354 2484 2355 2485 .groups-header .moderators-lists img.avatar { 2486 -moz-box-shadow: none; 2487 -webkit-box-shadow: none; 2356 2488 box-shadow: none; 2357 2489 float: none; 2358 2490 height: 30px; … … body.no-js .single-item-header .js-self-profile-button { 2390 2522 2391 2523 .groups-header .desc-wrap .group-description { 2392 2524 background: #fafafa; 2525 -webkit-box-shadow: inset 0 0 9px #ccc; 2526 -moz-box-shadow: inset 0 0 9px #ccc; 2393 2527 box-shadow: inset 0 0 9px #ccc; 2394 2528 padding: 1em; 2395 2529 text-align: left; … … body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 2668 2802 } 2669 2803 2670 2804 .buddypress .bp-invites-content ul.item-list li.selected { 2805 -webkit-box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2); 2806 -moz-box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2); 2671 2807 box-shadow: inset 0 0 12px 0 rgba(237, 187, 52, 0.2); 2672 2808 } 2673 2809 … … body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 2739 2875 2740 2876 @media screen and (min-width: 46.8em) { 2741 2877 .buddypress .bp-invites-content ul.item-list > li { 2878 -webkit-box-sizing: border-box; 2879 -moz-box-sizing: border-box; 2742 2880 box-sizing: border-box; 2743 2881 border: 1px solid #eaeaea; 2744 2882 float: left; … … body.buddypress.bp-user .buddypress-wrap .member-header-actions * > * { 2760 2898 2761 2899 @media screen and (min-width: 46.8em) { 2762 2900 :not(.vertical) + .item-body #group-invites-container { 2901 display: -ms-grid; 2763 2902 display: grid; 2903 -ms-grid-columns: 25% auto; 2764 2904 grid-template-columns: 25% auto; 2765 2905 grid-template-areas: "group-invites-nav group-invites-column"; 2766 2906 } … … body.register .buddypress-wrap .page ul { 3019 3159 } 3020 3160 3021 3161 .bp-messages-content .avatar { 3162 -moz-box-shadow: none; 3163 -webkit-box-shadow: none; 3022 3164 box-shadow: none; 3023 3165 } 3024 3166 … … body.register .buddypress-wrap .page ul { 3049 3191 3050 3192 #message-threads li { 3051 3193 border-bottom: 1px solid #eaeaea; 3194 display: -webkit-flex; 3052 3195 display: -moz-flex; 3053 3196 display: -ms-flex; 3054 3197 display: -o-flex; 3055 3198 display: flex; 3199 -webkit-flex-flow: row nowrap; 3200 -moz-flex-flow: row nowrap; 3201 -ms-flex-flow: row nowrap; 3056 3202 -o-flex-flow: row nowrap; 3057 3203 flex-flow: row nowrap; 3058 3204 margin: 0; … … body.register .buddypress-wrap .page ul { 3061 3207 } 3062 3208 3063 3209 #message-threads li .thread-cb { 3210 display: -webkit-box; 3211 display: -ms-flexbox; 3212 display: -webkit-flex; 3064 3213 display: flex; 3214 -ms-flex-align: center; 3215 -webkit-align-items: center; 3216 -webkit-box-align: center; 3065 3217 align-items: center; 3218 -webkit-flex: 1 2 5%; 3066 3219 -moz-flex: 1 2 5%; 3220 -ms-flex: 1 2 5%; 3067 3221 -o-flex: 1 2 5%; 3068 3222 flex: 1 2 5%; 3069 3223 } 3070 3224 3071 3225 #message-threads li .thread-from, 3072 3226 #message-threads li .thread-to { 3227 -webkit-flex: 1 2 20%; 3073 3228 -moz-flex: 1 2 20%; 3229 -ms-flex: 1 2 20%; 3074 3230 -o-flex: 1 2 20%; 3075 3231 flex: 1 2 20%; 3076 3232 } … … body.register .buddypress-wrap .page ul { 3096 3252 } 3097 3253 3098 3254 #message-threads li .thread-content { 3255 -webkit-flex: 1 2 60%; 3099 3256 -moz-flex: 1 2 60%; 3257 -ms-flex: 1 2 60%; 3100 3258 -o-flex: 1 2 60%; 3101 3259 flex: 1 2 60%; 3102 3260 } 3103 3261 3104 3262 #message-threads li .thread-date { 3263 -webkit-flex: 1 2 15%; 3105 3264 -moz-flex: 1 2 15%; 3265 -ms-flex: 1 2 15%; 3106 3266 -o-flex: 1 2 15%; 3107 3267 flex: 1 2 15%; 3108 3268 } … … body.register .buddypress-wrap .page ul { 3204 3364 3205 3365 .bp-messages-content #bp-message-thread-list .message-metadata { 3206 3366 border-bottom: 1px solid #ccc; 3367 -webkit-box-shadow: -2px 1px 9px 0 #eee; 3368 -moz-box-shadow: -2px 1px 9px 0 #eee; 3207 3369 box-shadow: -2px 1px 9px 0 #eee; 3208 3370 display: table; 3209 3371 padding: 0.2em; … … body.buddypress.settings.data #buddypress.buddypress-wrap .item-body p a { 3447 3609 .buddypress-wrap input[type="url"]:focus, 3448 3610 .buddypress-wrap input[type="tel"]:focus, 3449 3611 .buddypress-wrap input[type="password"]:focus { 3612 -webkit-box-shadow: 0 0 8px #eaeaea; 3613 -moz-box-shadow: 0 0 8px #eaeaea; 3450 3614 box-shadow: 0 0 8px #eaeaea; 3451 3615 } 3452 3616 … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 3686 3850 } 3687 3851 3688 3852 .buddypress-wrap .select-wrap select { 3853 -moz-appearance: none; 3689 3854 -webkit-appearance: none; 3690 3855 -o-appearance: none; 3691 3856 appearance: none; … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 3780 3945 .buddypress-wrap form#group-members-search button[type="submit"] { 3781 3946 background: none; 3782 3947 border: 0; 3948 -webkit-border-radius: 0; 3949 -moz-border-radius: 0; 3950 -ms-border-radius: 0; 3783 3951 border-radius: 0; 3784 3952 background-clip: padding-box; 3785 3953 } … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4056 4224 } 4057 4225 4058 4226 .center-vert { 4227 display: -ms-flexbox; 4228 display: -webkit-flex; 4059 4229 display: flex; 4230 -ms-flex-align: center; 4231 -webkit-align-items: center; 4232 -webkit-box-align: center; 4060 4233 align-items: center; 4061 4234 } 4062 4235 … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4170 4343 .buddypress .buddypress-wrap input.text-button { 4171 4344 background: none; 4172 4345 border: 0; 4346 -moz-box-shadow: none; 4347 -webkit-box-shadow: none; 4173 4348 box-shadow: none; 4174 4349 color: #767676; 4175 4350 } … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4265 4440 4266 4441 .buddypress #buddypress .create-button a { 4267 4442 border: 1px solid #ccc; 4443 -webkit-border-radius: 5px; 4444 -moz-border-radius: 5px; 4445 -ms-border-radius: 5px; 4268 4446 border-radius: 5px; 4269 4447 background-clip: padding-box; 4448 -webkit-box-shadow: inset 0 0 6px 0 #eaeaea; 4449 -moz-box-shadow: inset 0 0 6px 0 #eaeaea; 4270 4450 box-shadow: inset 0 0 6px 0 #eaeaea; 4271 4451 margin: 0.2em 0; 4272 4452 width: auto; … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4275 4455 .buddypress #buddypress .create-button a:focus, .buddypress #buddypress .create-button a:hover { 4276 4456 background: none; 4277 4457 border-color: #ccc; 4458 -webkit-box-shadow: inset 0 0 12px 0 #eaeaea; 4459 -moz-box-shadow: inset 0 0 12px 0 #eaeaea; 4278 4460 box-shadow: inset 0 0 12px 0 #eaeaea; 4279 4461 } 4280 4462 … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4296 4478 .buddypress #buddypress.bp-dir-hori-nav .create-button a:hover { 4297 4479 background: none; 4298 4480 border: 0; 4481 -moz-box-shadow: none; 4482 -webkit-box-shadow: none; 4299 4483 box-shadow: none; 4300 4484 margin: 0; 4301 4485 } … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4396 4580 .buddypress-wrap #group-create-body .bp-cover-image-status p.warning { 4397 4581 background: #0b80a4; 4398 4582 border: 0; 4583 -webkit-box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2); 4584 -moz-box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2); 4399 4585 box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2); 4400 4586 color: #fff; 4401 4587 } 4402 4588 4403 4589 .buddypress-wrap .bp-feedback:not(.custom-homepage-info) { 4590 display: -webkit-flex; 4404 4591 display: -moz-flex; 4405 4592 display: -ms-flex; 4406 4593 display: -o-flex; 4407 4594 display: flex; 4595 -webkit-flex-flow: row nowrap; 4596 -moz-flex-flow: row nowrap; 4597 -ms-flex-flow: row nowrap; 4408 4598 -o-flex-flow: row nowrap; 4409 4599 flex-flow: row nowrap; 4600 -ms-flex-align: stretch; 4601 -webkit-align-items: stretch; 4602 -webkit-box-align: stretch; 4410 4603 align-items: stretch; 4411 4604 align-items: center; 4412 4605 } … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4414 4607 .buddypress-wrap .bp-feedback { 4415 4608 background: #fff; 4416 4609 color: #807f7f; 4610 -webkit-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4611 -moz-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4417 4612 box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4418 4613 color: #737373; 4419 4614 margin: 10px 0; … … body.no-js .buddypress #messages-bulk-management #select-all-messages { 4492 4687 .buddypress-wrap .bp-feedback.loading .bp-icon, 4493 4688 .buddypress-wrap .bp-feedback.success .bp-icon, 4494 4689 .buddypress-wrap .bp-feedback.updated .bp-icon { 4690 display: -webkit-box; 4691 display: -ms-flexbox; 4692 display: -webkit-flex; 4495 4693 display: flex; 4694 -ms-flex-align: center; 4695 -webkit-align-items: center; 4696 -webkit-box-align: center; 4496 4697 align-items: center; 4497 4698 align-self: stretch; 4498 4699 } … … body.create-blog #buddypress .error, 4615 4816 body.create-blog #buddypress .success { 4616 4817 background: #fff; 4617 4818 color: #807f7f; 4819 -webkit-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4820 -moz-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4618 4821 box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1); 4619 4822 color: #737373; 4620 4823 padding: 10px 15px; … … body.create-blog #buddypress .success { 4734 4937 } 4735 4938 4736 4939 .buddypress.widget .avatar-block { 4940 display: -webkit-flex; 4737 4941 display: -moz-flex; 4738 4942 display: -ms-flex; 4739 4943 display: -o-flex; 4740 4944 display: flex; 4945 -webkit-flex-flow: row wrap; 4946 -moz-flex-flow: row wrap; 4947 -ms-flex-flow: row wrap; 4741 4948 -o-flex-flow: row wrap; 4742 4949 flex-flow: row wrap; 4743 4950 } … … body.create-blog #buddypress .success { 4784 4991 .buddypress-wrap .buddypress.widget ul#friends-list, 4785 4992 .buddypress-wrap .buddypress.widget ul#groups-list, 4786 4993 .buddypress-wrap .buddypress.widget ul#members-list { 4994 display: -webkit-flex; 4787 4995 display: -moz-flex; 4788 4996 display: -ms-flex; 4789 4997 display: -o-flex; 4790 4998 display: flex; 4999 -webkit-flex-flow: column nowrap; 5000 -moz-flex-flow: column nowrap; 5001 -ms-flex-flow: column nowrap; 4791 5002 -o-flex-flow: column nowrap; 4792 5003 flex-flow: column nowrap; 4793 5004 } … … body.create-blog #buddypress .success { 4796 5007 .buddypress-wrap .buddypress.widget ul#friends-list, 4797 5008 .buddypress-wrap .buddypress.widget ul#groups-list, 4798 5009 .buddypress-wrap .buddypress.widget ul#members-list { 5010 display: -webkit-flex; 4799 5011 display: -moz-flex; 4800 5012 display: -ms-flex; 4801 5013 display: -o-flex; 4802 5014 display: flex; 5015 -webkit-flex-flow: row wrap; 5016 -moz-flex-flow: row wrap; 5017 -ms-flex-flow: row wrap; 4803 5018 -o-flex-flow: row wrap; 4804 5019 flex-flow: row wrap; 4805 5020 } … … body.create-blog #buddypress .success { 4809 5024 .buddypress-wrap .buddypress.widget ul#groups-list li, 4810 5025 .buddypress-wrap .buddypress.widget ul#members-list li { 4811 5026 border: 1px solid #eee; 5027 -ms-flex-align: stretch; 5028 -webkit-align-items: stretch; 5029 -webkit-box-align: stretch; 4812 5030 align-items: stretch; 5031 -webkit-flex: 1 1 46%; 4813 5032 -moz-flex: 1 1 46%; 5033 -ms-flex: 1 1 46%; 4814 5034 -o-flex: 1 1 46%; 4815 5035 flex: 1 1 46%; 4816 5036 margin: 2%; … … body.create-blog #buddypress .success { 4820 5040 .buddypress-wrap .buddypress.widget ul#friends-list li, 4821 5041 .buddypress-wrap .buddypress.widget ul#groups-list li, 4822 5042 .buddypress-wrap .buddypress.widget ul#members-list li { 5043 -webkit-flex: 0 1 20%; 4823 5044 -moz-flex: 0 1 20%; 5045 -ms-flex: 0 1 20%; 4824 5046 -o-flex: 0 1 20%; 4825 5047 flex: 0 1 20%; 4826 5048 } … … body.create-blog #buddypress .success { 4856 5078 .buddypress-wrap .buddypress.widget ul#friends-list li, 4857 5079 .buddypress-wrap .buddypress.widget ul#groups-list li, 4858 5080 .buddypress-wrap .buddypress.widget ul#members-list li { 5081 -webkit-flex: 0 1 auto; 4859 5082 -moz-flex: 0 1 auto; 5083 -ms-flex: 0 1 auto; 4860 5084 -o-flex: 0 1 auto; 4861 5085 flex: 0 1 auto; 4862 5086 margin: 10px 2% 1%; … … body.create-blog #buddypress .success { 4884 5108 4885 5109 .buddypress-wrap a.loading, 4886 5110 .buddypress-wrap input.loading { 5111 -moz-animation: loader-pulsate 0.5s infinite ease-in-out alternate; 5112 -webkit-animation: loader-pulsate 0.5s infinite ease-in-out alternate; 4887 5113 animation: loader-pulsate 0.5s infinite ease-in-out alternate; 4888 5114 border-color: #aaa; 4889 5115 } 4890 5116 5117 @-webkit-keyframes loader-pulsate { 5118 from { 5119 border-color: #aaa; 5120 -webkit-box-shadow: 0 0 6px #ccc; 5121 box-shadow: 0 0 6px #ccc; 5122 } 5123 to { 5124 border-color: #ccc; 5125 -webkit-box-shadow: 0 0 6px #f8f8f8; 5126 box-shadow: 0 0 6px #f8f8f8; 5127 } 5128 } 5129 5130 @-moz-keyframes loader-pulsate { 5131 from { 5132 border-color: #aaa; 5133 -moz-box-shadow: 0 0 6px #ccc; 5134 box-shadow: 0 0 6px #ccc; 5135 } 5136 to { 5137 border-color: #ccc; 5138 -moz-box-shadow: 0 0 6px #f8f8f8; 5139 box-shadow: 0 0 6px #f8f8f8; 5140 } 5141 } 5142 4891 5143 @keyframes loader-pulsate { 4892 5144 from { 4893 5145 border-color: #aaa; 5146 -moz-box-shadow: 0 0 6px #ccc; 4894 5147 box-shadow: 0 0 6px #ccc; 4895 5148 } 4896 5149 to { 4897 5150 border-color: #ccc; 5151 -moz-box-shadow: 0 0 6px #f8f8f8; 4898 5152 box-shadow: 0 0 6px #f8f8f8; 4899 5153 } 4900 5154 } … … body.create-blog #buddypress .success { 4913 5167 display: none; 4914 5168 opacity: 0; 4915 5169 position: absolute; 5170 -webkit-transform: translate3d(0, 0, 0); 5171 -ms-transform: translate3d(0, 0, 0); 4916 5172 transform: translate3d(0, 0, 0); 4917 5173 visibility: hidden; 4918 5174 } … … body.create-blog #buddypress .success { 4933 5189 pointer-events: none; 4934 5190 text-shadow: none; 4935 5191 text-transform: none; 5192 -webkit-transition: all 1.5s ease; 5193 -ms-transition: all 1.5s ease; 4936 5194 transition: all 1.5s ease; 4937 5195 white-space: nowrap; 4938 5196 word-wrap: break-word; … … body.create-blog #buddypress .success { 4956 5214 left: 50%; 4957 5215 margin-top: 7px; 4958 5216 top: 110%; 5217 -webkit-transform: translate(-50%, 0); 5218 -ms-transform: translate(-50%, 0); 4959 5219 transform: translate(-50%, 0); 4960 5220 } 4961 5221 4962 5222 .user-list .bp-tooltip:after { 4963 5223 left: 0; 5224 -webkit-transform: translate(0, 0); 5225 -ms-transform: translate(0, 0); 4964 5226 transform: translate(0, 0); 4965 5227 } 4966 5228 … … body.create-blog #buddypress .success { 4968 5230 .user-list .bp-tooltip:after { 4969 5231 left: auto; 4970 5232 right: 0; 5233 -webkit-transform: translate(0, 0); 5234 -ms-transform: translate(0, 0); 4971 5235 transform: translate(0, 0); 4972 5236 } 4973 5237 } … … body.create-blog #buddypress .success { 4978 5242 .notification-actions .bp-tooltip:after, 4979 5243 .participants-list .bp-tooltip:after { 4980 5244 left: 0; 5245 -webkit-transform: translate(0, 0); 5246 -ms-transform: translate(0, 0); 4981 5247 transform: translate(0, 0); 4982 5248 } 4983 5249 … … body.create-blog #buddypress .success { 4986 5252 .single-message-thread-header .actions .bp-tooltip:after { 4987 5253 left: auto; 4988 5254 right: 0; 5255 -webkit-transform: translate(0, 0); 5256 -ms-transform: translate(0, 0); 4989 5257 transform: translate(0, 0); 4990 5258 } 4991 5259 … … body.create-blog #buddypress .success { 5001 5269 */ 5002 5270 #item-body, 5003 5271 .single-screen-navs { 5272 -webkit-box-sizing: border-box; 5273 -moz-box-sizing: border-box; 5004 5274 box-sizing: border-box; 5005 5275 } 5006 5276 5007 5277 .grid > li, 5008 5278 .grid > li .generic-button a { 5279 -webkit-box-sizing: border-box; 5280 -moz-box-sizing: border-box; 5009 5281 box-sizing: border-box; 5010 5282 } 5011 5283 -
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 { 406 406 $this->clean_files( 'shrink' ); 407 407 } 408 408 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 409 487 public function limit_to_50px( $max_width ) { 410 488 return 50; 411 489 }