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

Add basic support for deleting acf fields #270

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

apandichi
Copy link

This is a very naive implementation that might fix #269
It applies only to v3 of the API, and it does not take into account the "edit_in_rest" setting.
There could be other things that I have missed... But it's a start, I hope!

}

public function delete_item( $request ) {
$fields = $this->acf->get_fields( $request )['acf'];
Copy link
Owner

Choose a reason for hiding this comment

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

Please, check before to access.

$fields = $this->acf->get_fields( $request );
if ( $fields && isset( $fielsd['acf'] ) ) {
	$fields = $fields['acf'];
}

Copy link
Author

Choose a reason for hiding this comment

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

Fixed in e2f5c9c

@airesvsg
Copy link
Owner

Hi @apandichi,
Thanks for your time and PR.
Please, check it: https://github.com/airesvsg/acf-to-rest-api/pull/270/files#r217460145
Thanks

@apandichi
Copy link
Author

@airesvsg Does this PR have any chance of getting merged and released soon?

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.

Support for http DELETE
2 participants