Created
January 31, 2020 09:32
-
-
Save danielstrelec/d0e592af67d815506feee6ddb2d9e825 to your computer and use it in GitHub Desktop.
This file contains 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 | |
// odstranění češtiny a speciálních znaků z vkládaných souborů | |
function wt_sanitize_files ( $filename ) { | |
return remove_accents( $filename ); | |
} | |
add_filter( 'sanitize_file_name', 'wt_sanitize_files', 10 ); | |
?> |
Máš pravdu, nahrazuji za následující:
add_filter( 'sanitize_file_name', 'wt_sanitize_files' ); function wt_sanitize_files( $filename ) { $dotp = strrpos( $filename, '.' ); return sanitize_title( substr( $filename, 0, $dotp ) ) . '.' . sanitize_title( substr( $filename, $dotp + 1 ) ); }
Díky za doplnění!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Máš pravdu, nahrazuji za následující: