You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What does this implement/fix? Explain your changes.
This ensures actions and filters are unique to this version of the plugin. This means that any custom code targeting hooks and filters of the previous WPGraphQL for ACF will not execute when this plugin is active and won't cause unintended side effects.
This also adjusts Class names to be unique to ensure any code from extending codebases don't accidentally all code from this version of the plugin.
What currently open issues does this close or contribute?
2.0.0-beta.4.0 converts to a wpgraphql/acf/${hook_name} convention.
We believe this is a bit more readable and makes it more clear what the filter/hook is intended for.
We also believe this will help with folks upgrading. If anyone had custom code that extended v0.6 or prior, it might be easy to miss that it's not working because the hook name is graphql_acf_* instead of wpgraphql_acf_* where it might be easily overlooked that the wp was added, thus causing much time banging heads against a desk and pulling hair out before realizing the change.
We believe it will be more clear if the user is looking at docs for the latest version of WPGraphQL and sees wpgraphql/acf/* they would know immediately that their old action with graphql_acf_* would not be firing, thus saving hair and desks.
… from accidentally adding classes that match the old version of the plugin. We don't want old functions to be available in the new plugin, intentionally.
Is it intentional not to change the name of the actions that are triggered in Field Type Registry? graphql_acf_registry_init and graphql_acf_register_field_types.
Is it intentional not to change the name of the actions that are triggered in Field Type Registry? graphql_acf_registry_init and graphql_acf_register_field_types.
@markkelnar looks like I updated the filters but not the actions 🤦🏻♂️. Good catch. I updated the actions and the table documenting the differences.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix? Explain your changes.
This ensures actions and filters are unique to this version of the plugin. This means that any custom code targeting hooks and filters of the previous WPGraphQL for ACF will not execute when this plugin is active and won't cause unintended side effects.
This also adjusts Class names to be unique to ensure any code from extending codebases don't accidentally all code from this version of the plugin.
What currently open issues does this close or contribute?
closes #65
closes #66
Other Notes
Failing Schema Linter
Note, the Schema Linter test is failing because the previous release action did not upload the Schema Artifact to the release: https://github.com/wp-graphql/wpgraphql-acf/releases/tag/v2.0.0-beta.3.1.0
Action / Filter comparison across versions
2.0.0-beta.4.0 converts to a
wpgraphql/acf/${hook_name}
convention.We believe this is a bit more readable and makes it more clear what the filter/hook is intended for.
We also believe this will help with folks upgrading. If anyone had custom code that extended v0.6 or prior, it might be easy to miss that it's not working because the hook name is
graphql_acf_*
instead ofwpgraphql_acf_*
where it might be easily overlooked that thewp
was added, thus causing much time banging heads against a desk and pulling hair out before realizing the change.We believe it will be more clear if the user is looking at docs for the latest version of WPGraphQL and sees
wpgraphql/acf/*
they would know immediately that their old action withgraphql_acf_*
would not be firing, thus saving hair and desks.