lumenlearning / candela-thin-exports

A simple plugin to export Pressbooks books as thin cartridges with deep links to each page
MIT License
5 stars 1 forks source link

Add support for environments where WP files are not in the web root #3

Open SteelWagstaff opened 6 years ago

SteelWagstaff commented 6 years ago

Ned (from Pressbooks) and I ran into some issues with my fork of the plugin with a PB network that was differently configured (where WP files aren't in the web root). Ned's explanation:

Some configurations, like roots/bedrock, keep the WordPress core files in a subdirectory of the web root, meaning that get_site_url() will return https://domain.com/wp while get_home_url() will return https://domain.com. This PR substitutes get_home_url() for get_site_url() for broader support of different WordPress configurations.

We attempted to address in my fork with this PR: https://github.com/SteelWagstaff/candela-thin-exports/pull/2/commits/4bb408ebc2cb8d550d90051a0702673eb11b9fd9. Not sure if it'll ever be relevant to Lumen, but in case you're interested in genericizing your plugin, it might be of interest?

ghost commented 6 years ago

Awesome! Thanks for pointing this out @SteelWagstaff . This will very likely not be an issue for us since we don't use Bedrock or Trellis (and I don't think we will any time soon due to our hosting provider). It's a simple enough change though, so I'll add this to my list of things to update as time allows. Cheers!