Created
October 11, 2016 02:16
-
-
Save GeoffEW/bedaf6534e1b3ca435ea4cd6aae23d2e to your computer and use it in GitHub Desktop.
Fix loading of ET+ files even if page structure changes (e.g. Jupiter theme)
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 tribe_snippet_clean_filename( $filename, $filename_raw ) { | |
if ( 0 === strpos( $filename, '.' ) && false === strpos( $filename_raw, '.' ) ) { | |
return substr( $filename, 1 ); | |
} | |
return $filename; | |
} | |
add_filter( 'sanitize_file_name', 'tribe_snippet_clean_filename', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment