- 
      
- 
        Save INDIAN2020/520420c2394aeb880c39f82aa2ba6eba to your computer and use it in GitHub Desktop. 
    WordPress get file extension
  
        
  
    
      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 | |
| function get_file_extension($file) { | |
| $file_type_array = wp_check_filetype($file); | |
| if($file_type_array) | |
| { | |
| return $file_type_array['ext']; | |
| } | |
| return ''; | |
| } | |
| ?> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment