Last active
          May 11, 2017 01:19 
        
      - 
      
- 
        Save vicskf/135732200f5ed0f708bca786b5d1b7ef to your computer and use it in GitHub Desktop. 
    Filters the upload size limit for community events submission form only
  
        
  
    
      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 | |
| /** | |
| * 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