bobbingwide / oik-bob-bing-wide

More lazy smart shortcodes
https://www.oik-plugins.com/oik-plugins/oik-bob-bing-wide-more-lazy-smart-shortcodes/
GNU General Public License v2.0
1 stars 0 forks source link

Add support for https: protocol #24

Closed bobbingwide closed 6 years ago

bobbingwide commented 6 years ago

Having changed my local development to use https: rather that http: I've discovered a strange anomaly with the PHPUnit tests for [bw_post] and [bw_page].

When originally developed, with WordPress options siteurl and home both set to http://qw/wordpress site_url() returned http://qw/wordpress and admin_url() returned http://qw/wordpress/wp-admin/.

Now, with the https: protocol the schemes are different. site_url still returns http: but admin_url returns https. home_url also returns https:

I added a new method - test_site_url() - that demonstrates this.

Note: Rather than change the tests to use admin_url() and a different string to replace ( appending /wp-admin/ ), I used home_url().