Created
          November 26, 2014 11:52 
        
      - 
      
- 
        Save yanknudtskov/008a1b9eb24ca5ee3c1c 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