php - Add the "picture-" sufix to all images when uploading to Wordpress -
i'm using in wordpress theme functions.php
sanitize images filenames when uploaded:
function sa_sanitize_special_chars ($filename) { homecoming remove_accents( $filename ); } add_filter('sanitize_file_name', 'sa_sanitize_special_chars', 10);
now, need add together "picture-" sufix images when upload too. how can (in functions.php)?
i think work you
function sa_sanitize_special_chars ($filename) { $f=remove_accents( $filename ); homecoming 'picture-'.$f; }
php wordpress function
No comments:
Post a Comment