PurpleTurtleCreative / completionist

Asana integration plugin for WordPress.
https://purpleturtlecreative.com/completionist/
GNU General Public License v3.0
1 stars 0 forks source link

oEmbed functionality for Asana project and task links in post content #220

Open MichelleBlanchette opened 4 months ago

MichelleBlanchette commented 4 months ago

WordPress has a super cool oEmbed functionality which regex matches links in the post content to automatically replace them with an embed of the content they represent.

Since Completionist is able to display Asana projects and tasks, integrating with the oEmbed API seems plausible.

Note that the shortcodes are still important to be able to use the attributes to customize the project's or task's display. But oEmbeds can work as a quick "plop in" with the default settings of the shortcodes.

A possible problem for this could be if Asana project and task links have the same regex pattern (ie. format). This means we'd need to, at worst, make two API calls to test whether the matched URL is for a valid task or if it's for a valid project. The Default Frontend Authentication User should be used to display the Asana content, just as is default for the shortcodes, anyways.