diff --git src/bp-core/bp-core-attachments.php src/bp-core/bp-core-attachments.php
index dfcab9bb5..4fd2619e6 100644
|
|
function bp_attachments_get_max_upload_file_size( $type = '' ) { |
163 | 163 | */ |
164 | 164 | function bp_attachments_get_allowed_types( $type = 'avatar' ) { |
165 | 165 | // Defaults to BuddyPress supported image extensions. |
166 | | $exts = array( 'jpeg', 'gif', 'png' ); |
| 166 | $exts = array( 'jpeg', 'gif', 'png' ); |
| 167 | $wp_exts = wp_get_ext_types(); |
167 | 168 | |
168 | 169 | /** |
169 | 170 | * It's not a BuddyPress feature, get the allowed extensions |
… |
… |
function bp_attachments_get_allowed_types( $type = 'avatar' ) { |
174 | 175 | $exts = array(); |
175 | 176 | |
176 | 177 | switch ( $type ) { |
177 | | case 'video' : |
| 178 | case 'video': |
178 | 179 | $exts = wp_get_video_extensions(); |
179 | 180 | break; |
180 | 181 | |
181 | | case 'audio' : |
182 | | $exts = wp_get_video_extensions(); |
| 182 | case 'audio': |
| 183 | $exts = wp_get_audio_extensions(); |
| 184 | break; |
| 185 | |
| 186 | case isset( $wp_exts[ $type ] ): |
| 187 | $exts = $wp_exts[ $type ]; |
183 | 188 | break; |
184 | 189 | |
185 | 190 | default: |