In the current use, applies to a Publish step, so that "Patterns for files to be deleted" can take in a build parameter, ex: "${folder_to_delete}".
Tried couple different ways and doesn't expand that to it's corresponding value using EnvVars.expand() , or even Util.replaceMacro() which would be useful for cases where the param can be set at some point in the build.
I would imagine the optimal location would be:
https://github.com/jenkinsci/ws-cleanup-plugin/blob/master/src/main/java/hudson/plugins/ws_cleanup/RemoteCleaner.java#L58
Use the build var to expand/replace params on List<Pattern> patterns.
Would that be optimal?
I've done this on a couple other plugins, I'll see if I can squeeze in the time to do it ... but shouldn't stop others from giving it a go.