@wp-playground/blueprints 3.0.13 → 3.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -992,6 +992,15 @@ async function xt(r, t, n) {
992
992
  path: "/tmp/import.wxr",
993
993
  data: t
994
994
  }), await r.run({
995
+ $_SERVER: {
996
+ /**
997
+ * get_site_url() infers the protocol from $_SERVER['HTTPS'] instead of
998
+ * using the stored siteurl option. The importer relies on that behavior
999
+ * when rewriting links in the WXR payload, so we populate the flag here
1000
+ * just as the web request layer would.
1001
+ */
1002
+ HTTPS: (await r.absoluteUrl).startsWith("https://") ? "on" : ""
1003
+ },
995
1004
  code: `<?php
996
1005
  define('WP_LOAD_IMPORTERS', true);
997
1006
  require 'wp-load.php';