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

Fixed Custom Post Fields acting as File Uploads on Entry Edit Page #1971

Conversation

doekenorg
Copy link
Contributor

This PR Closes #1317

The type checking for upload fields excluded custom fields by default by not using get_input_type(). That already provides the right type for the custom post fields.

And because files are not provides by an input field during updating a different field, I skip the get_value_save_entry() method, as it has no value, and removes the image completely.

@rafaehlers
Copy link
Contributor

Hey! It works 👏👏👏✅❤️

https://www.loom.com/share/f894616dadcd428cb85398d86c676d81

Copy link
Member

@zackkatz zackkatz left a comment

Choose a reason for hiding this comment

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

Just one spacing issue

includes/extensions/edit-entry/class-edit-entry-render.php Outdated Show resolved Hide resolved
@doekenorg doekenorg force-pushed the issue/1317-cant-edit-a-post-custom-field-set-up-as-a-file-upload-field branch from d90f8cf to 6c8875a Compare January 18, 2024 08:41
@zackkatz zackkatz merged commit f9b21d0 into develop Jan 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't edit a Post Custom Field set up as a File Upload field.
3 participants