Skip to content

Instantly share code, notes, and snippets.

@vicskf
Last active May 11, 2017 01:19
Show Gist options
  • Save vicskf/135732200f5ed0f708bca786b5d1b7ef to your computer and use it in GitHub Desktop.
Save vicskf/135732200f5ed0f708bca786b5d1b7ef to your computer and use it in GitHub Desktop.
Filters the upload size limit for community events submission form only
<?php
/**
* Filters the upload size limit for community events submission form only
*
* @param string $size Upload size limit (in bytes).
* @return int Filtered size limit.
*/
function set_max_upload_size_limit_community_events_submission($size){
if ( tribe_is_community_edit_event_page() ){
$size = 1024 * 10000; //Limit to 10MB
}
return $size;
}
add_filter('upload_size_limit', 'set_max_upload_size_limit_community_events_submission');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment