indieweb / wordpress-micropub

A Micropub Endpoint plugin for WordPress
https://wordpress.org/plugins/micropub
51 stars 12 forks source link

Refactor to Allow Content to Be Inserted into a Custom Location #252

Closed dshanske closed 2 years ago

dshanske commented 2 years ago

https://wordpress.org/support/topic/small-code-refactor-and-filter/

_Basically that you separate out the static function create in class-micropub-endpoint.php, into two seprarte functions.

The first should prepare all the arguments and the sec ond should actually insert the data into the database. The second function should then have an additional filter right before wp_insert_post to allow for the indeiweb content to be inserted into another table, rather than wp_posts.

My use case being that I want to integrate buddypress with micropub, and as such I want to map some of the indeweb content types into buddypress type activities which involves inserting them into a different table._

dshanske commented 2 years ago

Resolved in #254 but there is no filter to allow updates to be added to a custom location yet.