visual-framework / vf-wp

WordPress theme and plugins for Visual Framework integration
3 stars 6 forks source link

CHORE - Use site config for taxonomy URL #144

Open khawkins98 opened 4 years ago

khawkins98 commented 4 years ago

As noted by @sandykadam, it would be good to import the taxonomy from the URL indicated in the by vf_api_urland then combine the string “pattern.json?pattern=embl-ontology&source=contenthub”

https://github.com/visual-framework/vf-wp/blob/f1153f8df6d9d55c7cd78bef83434505d107e73f/wp-content/plugins/embl-taxonomy/includes/settings.php#L12-L14

Believe a similar method is already done in vf-cache.php

dbushell commented 4 years ago

Also noticed a typo with too many w's wwww.embl... (fixed that in latest feature branch) will update this soon

dbushell commented 4 years ago

This is a little bit tricky...

The EMBL Taxonomy plugin can be used on any WP install (in theory) so embl_taxonomy requires an absolute URL right now.

The VF_Cache class (part of the vf-wpplugin) currently registers the vf_api_url option.

We could either:

  1. allow a relative URL in the embl_taxonomy field and combine if vf_api_url exists
  2. have taxonomy plugin register the field and shift the logic to the cache file to figure out
  3. have both plugins register vf_api_url (I think ACF will allow that and ignore duplicates)
  4. make a 3rd plugin to handle the API options

maybe I'm over-thinking it. Primary I want to leave EMBL Taxonomy plugin with no dependencies.

khawkins98 commented 4 years ago

Let's shelve this one for now. Generally, we should always use the production URL unless we're explicitly testing something.

So this will probably create more problems than solutions.