Created
June 22, 2021 14:07
-
-
Save wbcomdev/91c1d3a41193a69b2fb8ad749347837f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Sets the size of buddypress profile cover image. | |
| * | |
| * @param int $size size in bytes. | |
| * @param string $type upload type(avatar, cover_upload). | |
| * | |
| * @return float|int | |
| */ | |
| function wbcom_sets_size_of_bp_cover_image( $size, $type ) { | |
| if ( 'cover_image' === $type ) { | |
| $size = 50 * 1024; // change size with your own. | |
| } | |
| return $size; | |
| } | |
| add_filter( 'bp_attachments_get_max_upload_file_size', 'wbcom_sets_size_of_bp_cover_image', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment