Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpfr-apply-rename-to-every-field.php: Added snippet to apply GPFR to every field, no matter if there is an existing template value or not. #701

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

veryspry
Copy link
Contributor

@veryspry veryspry commented Aug 25, 2023

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/2330760345/53504?folderId=6987275

Summary

If using the gpfr_filename_template to automatically set a filename template for every field, it can become quite laborious to go through every single field and add a "dummy" template. This allows you to automatically apply GPFR to any field you want to on the fly.

🚨 Relies on the changes in this GPNF pull request: https://github.com/gravitywiz/gp-file-renamer/pull/13

…o every field, no matter if there is an existing template value or not.
Copy link
Contributor

@claygriffiths claygriffiths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious if it would make more sense if this snippet also included a gpfr_filename_template example as well? What happens if only this snippet is installed?

@github-actions
Copy link

github-actions bot commented Sep 26, 2023

Warnings
⚠️ When ready, don't forget to request reviews on this pull request from your fellow wizards.

Generated by 🚫 dangerJS against 19a9a47

@veryspry
Copy link
Contributor Author

I'm curious if it would make more sense if this snippet also included a gpfr_filename_template example as well? What happens if only this snippet is installed?

Hmmmm good point. Will add something!

…` callback so that file upload fields without a template set behave "normally".
@veryspry
Copy link
Contributor Author

@claygriffiths I added the gpfr_filename_template example in 19a9a47. Good thing too since not including that results in files that are renamed to empty strings when the field setting is empty 😅

@veryspry veryspry merged commit f2e439a into master Sep 28, 2023
3 checks passed
@veryspry veryspry deleted the matt/gpfr-apply-all branch September 28, 2023 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants