Instead of a domain property referencing the subdomain name of the hosting wordpress server, have a host property which includes the protocol (ex https://) plus the domain. Default the host property to window.location.origin if none is set.
So under this setup, a third party site wanting to use the author component would write something like:
Instead of a
domain
property referencing the subdomain name of the hosting wordpress server, have ahost
property which includes the protocol (ex https://) plus the domain. Default thehost
property towindow.location.origin
if none is set.So under this setup, a third party site wanting to use the author component would write something like:
Additionally have a new
apiPath
property which defaults to/wp-json/ucdlib-directory/person/
So this code would now look like: