Common functions, configuration and compatibility fixes for Co-Authors Plus when used in Cata child themes. Not a fork or replacement for CAP.
GNU General Public License v3.0
0
stars
0
forks
source link
Use CAP Author Name and URL in oEmbed REST API endpoint #24
Closed
douglas-johnson closed 2 years ago
WordPress provides oEmbed data about posts through the
/wp-json/oembed/1.0/embed/
API endpoint. https://developer.wordpress.org/reference/classes/wp_oembed_controller/This data is used when previewing posts in certain clients. One of the clients that uses oEmbed is Discord.
This function sets up the oEmbed data, and eventually provides the filter
oembed_response_data
to modify it. https://developer.wordpress.org/reference/functions/get_oembed_response_data/We should use CoAuthors Plus data here so that the correct author name and URL are used. Currently the producer / editor is being displayed instead.
One caveat, I didn't immediately find a way to support multiple authors, so we may need to just use the first.