I’m going to add this to readme as I think it can help other users. It’s easy.
First you have to create a custom rule in the filename structure option using curly braces, like {my_custom_rule}. You just have to write it, in any position you want
Now you can use the filter frou_sanitize_file_name to create a custom function. In your case, as you want to put the user id it would be something like this:
add_filter( 'frou_sanitize_file_name', function($filename_infs){
$filename_infs['structure']['translation']['my_custom_rule'] = get_current_user_id();
return $filename_infs;
}, 20 );
Thank you for this. I will try it. Will I have to redo it each time you update the plugin?
You’re welcome. 🙂
No, you don’t need to redo. Your rule will be there on next update.
Where do I put the “add_filter…” so that it doesn’t get written over?
You can put that in your functions.php for example
Hello @gseibold,
I will close this ticket. If you have any troubles please just say it