Real Media Library: Media Library Folder & File Manager - Version 4.17.11

Version Description

Download this release

Release Info

Developer devowl
Plugin Icon wp plugin Real Media Library: Media Library Folder & File Manager
Version 4.17.11
Comparing to
See all releases

Code changes from version 4.17.10 to 4.17.11

CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
  All notable changes to this project will be documented in this file.
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  ## 4.17.10 (2022-02-11)
7
 
8
 
3
  All notable changes to this project will be documented in this file.
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
 
6
+ ## 4.17.11 (2022-03-01)
7
+
8
+
9
+ ### ci
10
+
11
+ * upload releases to our new update server (CU-1zab44u)
12
+ * use Traefik and Let's Encrypt in development environment (CU-1vxh681)
13
+
14
+
15
+
16
+
17
+
18
  ## 4.17.10 (2022-02-11)
19
 
20
 
inc/base/others/cachebuster-lib.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- /* This file was automatically generated (Fri Feb 11 2022 14:21:02 GMT+0000 (Coordinated Universal Time)). */
3
  return [
4
  'es6-shim' => '0.35.6',
5
  'es7-shim' => '6.0.0',
1
  <?php
2
+ /* This file was automatically generated (Tue Mar 01 2022 08:32:10 GMT+0000 (Coordinated Universal Time)). */
3
  return [
4
  'es6-shim' => '0.35.6',
5
  'es7-shim' => '6.0.0',
inc/base/others/cachebuster.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- /* This file was automatically generated (Fri Feb 11 2022 14:21:02 GMT+0000 (Coordinated Universal Time)). */
3
  return [
4
  'src/public/dist/rml_gutenberg.lite.js' => '3d37a223a96263169ae2b80a657401a6',
5
  'src/public/dist/rml_gutenberg.pro.js' => '092861083b3d0f93be211d69a05f4ecd',
1
  <?php
2
+ /* This file was automatically generated (Tue Mar 01 2022 08:32:10 GMT+0000 (Coordinated Universal Time)). */
3
  return [
4
  'src/public/dist/rml_gutenberg.lite.js' => '3d37a223a96263169ae2b80a657401a6',
5
  'src/public/dist/rml_gutenberg.pro.js' => '092861083b3d0f93be211d69a05f4ecd',
index.php CHANGED
@@ -8,7 +8,7 @@
8
  * Description: Organize uploaded media in folders, collections and galleries: A file manager for WordPress. Media management made easy!
9
  * Author: devowl.io
10
  * Author URI: https://devowl.io
11
- * Version: 4.17.10
12
  * Text Domain: real-media-library
13
  * Domain Path: /languages
14
  */
8
  * Description: Organize uploaded media in folders, collections and galleries: A file manager for WordPress. Media management made easy!
9
  * Author: devowl.io
10
  * Author URI: https://devowl.io
11
+ * Version: 4.17.11
12
  * Text Domain: real-media-library
13
  * Domain Path: /languages
14
  */
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit49ce4ff4281c45c3c942945ee46a4904::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit51928dce3d54ff706744238918939e2b::getLoader();
vendor/composer/InstalledVersions.php CHANGED
@@ -5,7 +5,7 @@ namespace MatthiasWeb\RealMediaLibrary\Vendor\Composer;
5
  use MatthiasWeb\RealMediaLibrary\Vendor\Composer\Semver\VersionParser;
6
  class InstalledVersions
7
  {
8
- private static $installed = array('root' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '8a158b855c2653c7f3b63ea33891019add421008', 'name' => '__root__'), 'versions' => array('__root__' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '8a158b855c2653c7f3b63ea33891019add421008'), 'devowl-wp/freemium' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => 'f46163e56a6be9eace5a48ecd0c5c8d1680219a6'), 'devowl-wp/real-utils' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => '8f35c9a3c7cc4a086422c95356b890212cbb8c65'), 'devowl-wp/utils' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => '3b2eee5934e5ce0d94cdb5f4736259d448fe8531'), 'matthiasweb/wordpress-plugin-updater' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => 'c801fd86c4cf97f3b0c59d653c5e7bce99cebb73')));
9
  public static function getInstalledPackages()
10
  {
11
  return \array_keys(self::$installed['versions']);
5
  use MatthiasWeb\RealMediaLibrary\Vendor\Composer\Semver\VersionParser;
6
  class InstalledVersions
7
  {
8
+ private static $installed = array('root' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '2a3ad7e3a23bc921f65ff1088f79757d554f5d5e', 'name' => '__root__'), 'versions' => array('__root__' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '2a3ad7e3a23bc921f65ff1088f79757d554f5d5e'), 'devowl-wp/freemium' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => 'f46163e56a6be9eace5a48ecd0c5c8d1680219a6'), 'devowl-wp/real-utils' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => '8f35c9a3c7cc4a086422c95356b890212cbb8c65'), 'devowl-wp/utils' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => '3b2eee5934e5ce0d94cdb5f4736259d448fe8531'), 'matthiasweb/wordpress-plugin-updater' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => 'c801fd86c4cf97f3b0c59d653c5e7bce99cebb73')));
9
  public static function getInstalledPackages()
10
  {
11
  return \array_keys(self::$installed['versions']);
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit49ce4ff4281c45c3c942945ee46a4904
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit49ce4ff4281c45c3c942945ee46a4904
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit49ce4ff4281c45c3c942945ee46a4904', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit49ce4ff4281c45c3c942945ee46a4904', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit49ce4ff4281c45c3c942945ee46a4904::getInitializer($loader));
34
  } else {
35
  $classMap = require __DIR__ . '/autoload_classmap.php';
36
  if ($classMap) {
@@ -42,19 +42,19 @@ class ComposerAutoloaderInit49ce4ff4281c45c3c942945ee46a4904
42
  $loader->register(true);
43
 
44
  if ($useStaticLoader) {
45
- $includeFiles = Composer\Autoload\ComposerStaticInit49ce4ff4281c45c3c942945ee46a4904::$files;
46
  } else {
47
  $includeFiles = require __DIR__ . '/autoload_files.php';
48
  }
49
  foreach ($includeFiles as $fileIdentifier => $file) {
50
- composerRequire49ce4ff4281c45c3c942945ee46a4904($fileIdentifier, $file);
51
  }
52
 
53
  return $loader;
54
  }
55
  }
56
 
57
- function composerRequire49ce4ff4281c45c3c942945ee46a4904($fileIdentifier, $file)
58
  {
59
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
60
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit51928dce3d54ff706744238918939e2b
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit51928dce3d54ff706744238918939e2b', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit51928dce3d54ff706744238918939e2b', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit51928dce3d54ff706744238918939e2b::getInitializer($loader));
34
  } else {
35
  $classMap = require __DIR__ . '/autoload_classmap.php';
36
  if ($classMap) {
42
  $loader->register(true);
43
 
44
  if ($useStaticLoader) {
45
+ $includeFiles = Composer\Autoload\ComposerStaticInit51928dce3d54ff706744238918939e2b::$files;
46
  } else {
47
  $includeFiles = require __DIR__ . '/autoload_files.php';
48
  }
49
  foreach ($includeFiles as $fileIdentifier => $file) {
50
+ composerRequire51928dce3d54ff706744238918939e2b($fileIdentifier, $file);
51
  }
52
 
53
  return $loader;
54
  }
55
  }
56
 
57
+ function composerRequire51928dce3d54ff706744238918939e2b($fileIdentifier, $file)
58
  {
59
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
60
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit49ce4ff4281c45c3c942945ee46a4904
8
  {
9
  public static $files = array (
10
  'b45694f813fe096b704a1908536cfec0' => __DIR__ . '/..' . '/devowl-wp/real-utils/src/autoload.php',
@@ -144,9 +144,9 @@ class ComposerStaticInit49ce4ff4281c45c3c942945ee46a4904
144
  public static function getInitializer(ClassLoader $loader)
145
  {
146
  return \Closure::bind(function () use ($loader) {
147
- $loader->prefixLengthsPsr4 = ComposerStaticInit49ce4ff4281c45c3c942945ee46a4904::$prefixLengthsPsr4;
148
- $loader->prefixDirsPsr4 = ComposerStaticInit49ce4ff4281c45c3c942945ee46a4904::$prefixDirsPsr4;
149
- $loader->classMap = ComposerStaticInit49ce4ff4281c45c3c942945ee46a4904::$classMap;
150
 
151
  }, null, ClassLoader::class);
152
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit51928dce3d54ff706744238918939e2b
8
  {
9
  public static $files = array (
10
  'b45694f813fe096b704a1908536cfec0' => __DIR__ . '/..' . '/devowl-wp/real-utils/src/autoload.php',
144
  public static function getInitializer(ClassLoader $loader)
145
  {
146
  return \Closure::bind(function () use ($loader) {
147
+ $loader->prefixLengthsPsr4 = ComposerStaticInit51928dce3d54ff706744238918939e2b::$prefixLengthsPsr4;
148
+ $loader->prefixDirsPsr4 = ComposerStaticInit51928dce3d54ff706744238918939e2b::$prefixDirsPsr4;
149
+ $loader->classMap = ComposerStaticInit51928dce3d54ff706744238918939e2b::$classMap;
150
 
151
  }, null, ClassLoader::class);
152
  }
vendor/composer/installed.php CHANGED
@@ -2,4 +2,4 @@
2
 
3
  namespace MatthiasWeb\RealMediaLibrary\Vendor;
4
 
5
- return array('root' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '8a158b855c2653c7f3b63ea33891019add421008', 'name' => '__root__'), 'versions' => array('__root__' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '8a158b855c2653c7f3b63ea33891019add421008'), 'devowl-wp/freemium' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => 'f46163e56a6be9eace5a48ecd0c5c8d1680219a6'), 'devowl-wp/real-utils' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => '8f35c9a3c7cc4a086422c95356b890212cbb8c65'), 'devowl-wp/utils' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => '3b2eee5934e5ce0d94cdb5f4736259d448fe8531'), 'matthiasweb/wordpress-plugin-updater' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => 'c801fd86c4cf97f3b0c59d653c5e7bce99cebb73')));
2
 
3
  namespace MatthiasWeb\RealMediaLibrary\Vendor;
4
 
5
+ return array('root' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '2a3ad7e3a23bc921f65ff1088f79757d554f5d5e', 'name' => '__root__'), 'versions' => array('__root__' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '2a3ad7e3a23bc921f65ff1088f79757d554f5d5e'), 'devowl-wp/freemium' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => 'f46163e56a6be9eace5a48ecd0c5c8d1680219a6'), 'devowl-wp/real-utils' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => '8f35c9a3c7cc4a086422c95356b890212cbb8c65'), 'devowl-wp/utils' => array('pretty_version' => 'dev-build/composer-installedversions', 'version' => 'dev-build/composer-installedversions', 'aliases' => array(), 'reference' => '3b2eee5934e5ce0d94cdb5f4736259d448fe8531'), 'matthiasweb/wordpress-plugin-updater' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => 'c801fd86c4cf97f3b0c59d653c5e7bce99cebb73')));
vendor/devowl-wp/utils/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
  All notable changes to this project will be documented in this file.
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  ## 1.12.6 (2022-02-11)
7
 
8
 
3
  All notable changes to this project will be documented in this file.
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
 
6
+ ## 1.12.7 (2022-03-01)
7
+
8
+
9
+ ### ci
10
+
11
+ * use Traefik and Let's Encrypt in development environment (CU-1vxh681)
12
+
13
+
14
+ ### fix
15
+
16
+ * do migrations also for prerelease versions (CU-1ydq6ff)
17
+ * warning about open base dir
18
+
19
+
20
+
21
+
22
+
23
  ## 1.12.6 (2022-02-11)
24
 
25
 
vendor/devowl-wp/utils/package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "@devowl-wp/utils",
3
- "version": "1.12.6",
4
  "description": "Utility functionality for all your WordPress plugins.",
5
  "author": "devowl",
6
  "homepage": "https://devowl.io",
@@ -43,7 +43,7 @@
43
  "wp": "$(which wp)$(test $CI && echo ' --allow-root')",
44
  "wp:weak": "php -n -dextension=phar.so -dextension=json.so -dextension=mbstring.so -dextension=tokenizer.so -dmemory_limit=-1 $(which wp)$(test $CI && echo ' --allow-root')"
45
  },
46
- "phpunit-coverage-threshold": 70,
47
  "continuous-localization": {
48
  "locales": {
49
  "de_AT": false,
@@ -151,7 +151,7 @@
151
  "@devowl-wp/composer-licenses": "^0.1.3",
152
  "@devowl-wp/continuous-integration": "^0.2.0",
153
  "@devowl-wp/eslint-config": "^0.1.3",
154
- "@devowl-wp/grunt-continuous-localization": "^0.4.0",
155
  "@devowl-wp/wp-webpack": "^0.2.0",
156
  "@devowl-wp/yarn-licenses": "^0.1.3",
157
  "@types/concurrently": "~6.0.1",
1
  {
2
  "name": "@devowl-wp/utils",
3
+ "version": "1.12.7",
4
  "description": "Utility functionality for all your WordPress plugins.",
5
  "author": "devowl",
6
  "homepage": "https://devowl.io",
43
  "wp": "$(which wp)$(test $CI && echo ' --allow-root')",
44
  "wp:weak": "php -n -dextension=phar.so -dextension=json.so -dextension=mbstring.so -dextension=tokenizer.so -dmemory_limit=-1 $(which wp)$(test $CI && echo ' --allow-root')"
45
  },
46
+ "phpunit-coverage-threshold": 60,
47
  "continuous-localization": {
48
  "locales": {
49
  "de_AT": false,
151
  "@devowl-wp/composer-licenses": "^0.1.3",
152
  "@devowl-wp/continuous-integration": "^0.2.0",
153
  "@devowl-wp/eslint-config": "^0.1.3",
154
+ "@devowl-wp/grunt-continuous-localization": "^0.4.1",
155
  "@devowl-wp/wp-webpack": "^0.2.0",
156
  "@devowl-wp/yarn-licenses": "^0.1.3",
157
  "@types/concurrently": "~6.0.1",
vendor/devowl-wp/utils/src/Assets.php CHANGED
@@ -916,7 +916,7 @@ JS;
916
  $path = $this->getPluginConstant(
917
  \MatthiasWeb\RealMediaLibrary\Vendor\MatthiasWeb\Utils\PluginReceiver::$PLUGIN_CONST_PATH
918
  );
919
- if (\is_dir($path . '/public/dev') || \is_dir($path . '/src/public/dev')) {
920
  return 'public/dev/';
921
  }
922
  }
916
  $path = $this->getPluginConstant(
917
  \MatthiasWeb\RealMediaLibrary\Vendor\MatthiasWeb\Utils\PluginReceiver::$PLUGIN_CONST_PATH
918
  );
919
+ if (@\is_dir($path . '/public/dev') || @\is_dir($path . '/src/public/dev')) {
920
  return 'public/dev/';
921
  }
922
  }
vendor/devowl-wp/utils/src/Core.php CHANGED
@@ -116,7 +116,7 @@ trait Core {
116
  $this->debug('(Re)install the database tables', __FUNCTION__);
117
  $this->getActivator()->install();
118
  /**
119
- * A new version got installed for this plugin.
120
  *
121
  * @hook DevOwl/Utils/NewVersionInstallation/$slug
122
  * @param {string} $installed Previously version, can be also `null` for new installations
@@ -204,4 +204,44 @@ trait Core {
204
  public function getService() {
205
  return $this->service;
206
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  }
116
  $this->debug('(Re)install the database tables', __FUNCTION__);
117
  $this->getActivator()->install();
118
  /**
119
+ * A new version got installed for this plugin. Consider to use the `versionCompareOlderThan()` method from the Core class.
120
  *
121
  * @hook DevOwl/Utils/NewVersionInstallation/$slug
122
  * @param {string} $installed Previously version, can be also `null` for new installations
204
  public function getService() {
205
  return $this->service;
206
  }
207
+ /**
208
+ * Checks if a previously installed version is lower than an expected version.
209
+ * Additionally, we can check for a prerelease version, too. The `$allowedPrerelease` needs
210
+ * to be an array (e.g. `["2.15.1", "2.16.0"]`), and if the installed version is a prerelease
211
+ * (e.g. `2.15.1-9507`), the version `2.15.1` gets extracted and checked for existence in the array.
212
+ *
213
+ * Usage with `$prereleaseAdditionalCheck`: You can pass an additional callback which is executed before
214
+ * returning `true` when a prerelease got found. An example scenario for this callable is to check for
215
+ * a specific database table if you drop a column. Why is this needed? Imagine you are sending multiple
216
+ * prerelease to a customer.
217
+ *
218
+ * @param string|false $installed
219
+ * @param string $version
220
+ * @param string[] $allowedPrerelease
221
+ * @param callable $prereleaseAdditionalCheck `($prereleaseVersion, $prereleaseCiIid) => boolean`
222
+ */
223
+ public static function versionCompareOlderThan(
224
+ $installed,
225
+ $version,
226
+ $allowedPrerelease = [],
227
+ $prereleaseAdditionalCheck = null
228
+ ) {
229
+ if ($installed) {
230
+ $prerelease = \explode('-', $installed, 2);
231
+ $prereleaseVersion = \count($prerelease) > 1 ? $prerelease[0] : null;
232
+ $prereleaseCiIid = \count($prerelease) > 1 && \is_numeric($prerelease[1]) ? \intval($prerelease[1]) : null;
233
+ if (\version_compare($installed, $version, '<=') || $prereleaseVersion === $version) {
234
+ return \true;
235
+ }
236
+ if (\count($allowedPrerelease) > 0 && $prereleaseVersion !== null) {
237
+ if (\in_array($prereleaseVersion, $allowedPrerelease, \true)) {
238
+ if (\is_callable($prereleaseAdditionalCheck)) {
239
+ return $prereleaseAdditionalCheck($prereleaseVersion, $prereleaseCiIid);
240
+ }
241
+ return \true;
242
+ }
243
+ }
244
+ }
245
+ return \false;
246
+ }
247
  }
vendor/devowl-wp/utils/src/Service.php CHANGED
@@ -154,25 +154,17 @@ class Service {
154
  /**
155
  * Get the (backend) API URL for the current running environment for another container.
156
  *
157
- * @param int $developmentPort E.g. 10004
158
- * @param string $reviewPrefix E.g. commerce-
159
- * @param string $productionUrl E.g. https://commerce.devowl.io/
160
  * @codeCoverageIgnore Ignored due to the fact that it depends on too much server variables
161
  */
162
- public static function getExternalContainerUrl($developmentPort, $reviewPrefix, $productionUrl) {
 
 
163
  if (\defined('DEVOWL_WP_DEV') && \constant('DEVOWL_WP_DEV')) {
164
- // It is definitively in our development stack (local, traefik)
165
- $protocol = \strtolower(\substr($_SERVER['SERVER_PROTOCOL'], 0, 5)) === 'https' ? 'https' : 'http';
166
- if ($_SERVER['SERVER_PORT'] === \strval(10000)) {
167
- // Development stack is running in containers with exposed ports
168
- return $protocol . '://' . $_SERVER['SERVER_NAME'] . ':' . $developmentPort . '/';
169
- } else {
170
- // Review applications are running in via `nip.io` and traefik
171
- return $protocol . '://' . $reviewPrefix . $_SERVER['SERVER_NAME'] . '/';
172
- }
173
- } else {
174
- return $productionUrl;
175
  }
 
176
  }
177
  /**
178
  * Get a new instance of Service.
154
  /**
155
  * Get the (backend) API URL for the current running environment for another container.
156
  *
157
+ * @param string $serviceName E.g. commerce
 
 
158
  * @codeCoverageIgnore Ignored due to the fact that it depends on too much server variables
159
  */
160
+ public static function getExternalContainerUrl($serviceName) {
161
+ $host = 'devowl.io';
162
+ // In our development / review environment we always have prefixed our WordPress container as `wordpress.` subdomain
163
  if (\defined('DEVOWL_WP_DEV') && \constant('DEVOWL_WP_DEV')) {
164
+ $host = \parse_url(site_url(), \PHP_URL_HOST);
165
+ $host = \substr($host, \strlen('WordPress.'));
 
 
 
 
 
 
 
 
 
166
  }
167
+ return \sprintf('https://%s.%s', $serviceName, $host);
168
  }
169
  /**
170
  * Get a new instance of Service.