Create an API, i.e., public facing hooks and functions to insert/update/delete Models. #562
Replies: 1 comment
-
@zanematthew thanks for sharing this. We have an item in our backlog for introducing public APIs like these. We have purposely avoided them thus far because we wanted to hear about real world use cases from people like you instead of guessing, so that we don't paint ourselves into corners that make it hard to refactor/improve things. Also, to date we've focused primarily on GraphQL being the "API" to get to ACM data, but that's changing as we expand our focus to WordPress/PHP dev workflows. Now that we're building CRUD APIs for WP/PHP developers, we're getting into a better position to start adding actions like you suggest. Would you mind sharing, either here or in a video chat, more about your use case and the code you're maintaining related to the post to post relationships? |
Beta Was this translation helpful? Give feedback.
-
There isn't a public API, i.e., any hooks, ideally there would be something like;
do_action( 'acm_after_insert_post_to_posts', $insert_id );
, without this where stuck maintaining code that handles the logic of relating post to posts.Basically, create hooks, and provide public functions for developers. The WordPress' hook system is the backbone for developers that want to create "add-ons", "extensions", etc., additionally this would aide backwards compatibility as ACM updates are released.
Beta Was this translation helpful? Give feedback.
All reactions