Add global filter to customize table structure resolution #557
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 Pull Request do?
This Pull Request introduces a new catch-all filter that allows developers to modify or fully replace the resolved table structure for any WordPress object type inside
get_wordpress_table_structure().This makes it possible to support custom taxonomies (and optional custom post types) without modifying the plugin code directly.
Previously, only a hard-coded set of taxonomy slugs (
category,tag,post_tag) was supported.With this PR, developers can hook into the new filter and return their own table structure for any custom taxonomy or object type while maintaining full backward compatibility.
The plugin’s default behavior remains unchanged if no filter is used.
How do I test this Pull Request?
This is required so the filter can override its table structure.
object_sync_for_salesforce_wordpress_table_structurein a theme, plugin, or mu-plugin.regionorcanton).get_wordpress_table_structure()with that taxonomy.Example: Overriding table structure for a custom taxonomy