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

Version Description

Download this release

Release Info

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

Code changes from version 4.17.8 to 4.17.9

CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
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.8 (2022-01-25)
7
 
8
  **Note:** This package (@devowl-wp/real-media-library) has been updated because a dependency, which is also shipped with this package, has changed.
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.9 (2022-01-31)
7
+
8
+
9
+ ### fix
10
+
11
+ * creating folders and moving files took a long time when WPML is active (CU-1vxgh0u)
12
+ * do not load scripts in WPML String Translation screen as it leads to styling issues (CU-mdd8yp)
13
+ * unify enqueue_scripts hooks to be compatible with AffiliateTheme (CU-1xpm56k)
14
+
15
+
16
+
17
+
18
+
19
  ## 4.17.8 (2022-01-25)
20
 
21
  **Note:** This package (@devowl-wp/real-media-library) has been updated because a dependency, which is also shipped with this package, has changed.
inc/Assets.php CHANGED
@@ -22,7 +22,6 @@ class Assets {
22
  use UtilsProvider;
23
  use UtilsAssets;
24
  use FreemiumAssets;
25
- public static $TYPE_CUSTOMIZE = 'customize_controls_print_scripts';
26
  /**
27
  * Media Library Assistant screen base.
28
  */
@@ -66,11 +65,12 @@ class Assets {
66
  *
67
  * @param {boolean} $skip True for skip and false for load
68
  * @param {string} $type The context type
 
69
  * @return {boolean}
70
  * @hook RML/Scripts/Skip
71
  * @since 4.5.2
72
  */
73
- $skip = apply_filters('RML/Scripts/Skip', \false, $type);
74
  if (!wp_rml_active() || $skip) {
75
  return;
76
  }
@@ -147,14 +147,6 @@ class Assets {
147
  */
148
  do_action('RML/Scripts', $this);
149
  }
150
- /**
151
- * Enqueue scripts in customize (sidebar). This is essential e. g. for YOOTheme page builder.
152
- *
153
- * @param string $hook_suffix
154
- */
155
- public function customize_controls_print_scripts($hook_suffix) {
156
- $this->enqueue_scripts_and_styles(self::$TYPE_CUSTOMIZE, $hook_suffix);
157
- }
158
  /**
159
  * Localize the WordPress backend and frontend. If you want to provide URLs to the
160
  * frontend you have to consider that some JS libraries do not support umlauts
22
  use UtilsProvider;
23
  use UtilsAssets;
24
  use FreemiumAssets;
 
25
  /**
26
  * Media Library Assistant screen base.
27
  */
65
  *
66
  * @param {boolean} $skip True for skip and false for load
67
  * @param {string} $type The context type
68
+ * @param {string} $hook_suffix The current admin page (since 4.17.9)
69
  * @return {boolean}
70
  * @hook RML/Scripts/Skip
71
  * @since 4.5.2
72
  */
73
+ $skip = apply_filters('RML/Scripts/Skip', \false, $type, $hook_suffix);
74
  if (!wp_rml_active() || $skip) {
75
  return;
76
  }
147
  */
148
  do_action('RML/Scripts', $this);
149
  }
 
 
 
 
 
 
 
 
150
  /**
151
  * Localize the WordPress backend and frontend. If you want to provide URLs to the
152
  * frontend you have to consider that some JS libraries do not support umlauts
inc/base/others/cachebuster-lib.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- /* This file was automatically generated (Tue Jan 25 2022 08:16:31 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 (Mon Jan 31 2022 16:34:48 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 (Tue Jan 25 2022 08:16:31 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 (Mon Jan 31 2022 16:34:48 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',
inc/comp/WPML.php CHANGED
@@ -56,6 +56,7 @@ class WPML implements \MatthiasWeb\RealMediaLibrary\overrides\interfce\comp\IOve
56
  add_filter('RML/Tree/SQLStatement/JOIN', [$this, 'sqlstatement_join']);
57
  add_filter('RML/Tree/CountAttachments', [$this, 'wpml_count_attachments']);
58
  add_filter('RML/Localize', [$this, 'localize']);
 
59
  // Set the RML + WPML language to the user
60
  if (is_user_logged_in()) {
61
  $userId = get_current_user_id();
@@ -70,6 +71,19 @@ class WPML implements \MatthiasWeb\RealMediaLibrary\overrides\interfce\comp\IOve
70
  $this->overrideInit();
71
  }
72
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  /**
74
  * Localize frontend.
75
  *
@@ -145,6 +159,7 @@ class WPML implements \MatthiasWeb\RealMediaLibrary\overrides\interfce\comp\IOve
145
  global $wpdb, $sitepress;
146
  $table_name = $this->getTableName();
147
  $table_name_icl = $this->getTableName('icl_count');
 
148
  $langs = $sitepress->get_active_languages();
149
  $where = $where !== 'tn.cnt IS NULL' ? \str_replace('tn.id', 'tn.fid', $where) : '1=1';
150
  // Keep both tables synced (performance should be good because both queries use the best available index)
@@ -156,13 +171,23 @@ class WPML implements \MatthiasWeb\RealMediaLibrary\overrides\interfce\comp\IOve
156
  // phpcs:enable WordPress.DB.PreparedSQL
157
  // Sync available languages counts
158
  $setters = [];
 
159
  foreach (\array_keys($langs) as $code) {
160
  $escaped = \MatthiasWeb\RealMediaLibrary\Util::getInstance()->esc_sql_name($code);
161
- $setters[] = "`cnt_{$escaped}` = (" . $this->getSingleCountSql($code) . ')';
 
 
 
162
  }
163
  // Create UPDATE query
164
  // phpcs:disable WordPress.DB.PreparedSQL
165
  $sqlStatement = "UPDATE {$table_name_icl} AS tn SET " . \join(',', $setters) . " WHERE {$where}";
 
 
 
 
 
 
166
  $wpdb->query($sqlStatement);
167
  // phpcs:enable WordPress.DB.PreparedSQL
168
  $this->debug('WPML: Update count cache table', __METHOD__);
56
  add_filter('RML/Tree/SQLStatement/JOIN', [$this, 'sqlstatement_join']);
57
  add_filter('RML/Tree/CountAttachments', [$this, 'wpml_count_attachments']);
58
  add_filter('RML/Localize', [$this, 'localize']);
59
+ add_filter('RML/Scripts/Skip', [$this, 'scripts_skip'], 10, 3);
60
  // Set the RML + WPML language to the user
61
  if (is_user_logged_in()) {
62
  $userId = get_current_user_id();
71
  $this->overrideInit();
72
  }
73
  }
74
+ /**
75
+ * Skip RML scripts in String Translations as it leads to conflicts with `antd`.
76
+ *
77
+ * @param boolean $skip True for skip and false for load
78
+ * @param string $type The context type
79
+ * @param string $hook_suffix The current admin page
80
+ */
81
+ public function scripts_skip($skip, $type, $hook_suffix) {
82
+ if ($hook_suffix === 'wpml-string-translation/menu/string-translation.php') {
83
+ return \false;
84
+ }
85
+ return $skip;
86
+ }
87
  /**
88
  * Localize frontend.
89
  *
159
  global $wpdb, $sitepress;
160
  $table_name = $this->getTableName();
161
  $table_name_icl = $this->getTableName('icl_count');
162
+ $table_name_posts = $this->getTableName('posts');
163
  $langs = $sitepress->get_active_languages();
164
  $where = $where !== 'tn.cnt IS NULL' ? \str_replace('tn.id', 'tn.fid', $where) : '1=1';
165
  // Keep both tables synced (performance should be good because both queries use the best available index)
171
  // phpcs:enable WordPress.DB.PreparedSQL
172
  // Sync available languages counts
173
  $setters = [];
174
+ $readers = [];
175
  foreach (\array_keys($langs) as $code) {
176
  $escaped = \MatthiasWeb\RealMediaLibrary\Util::getInstance()->esc_sql_name($code);
177
+ $setters[] = "tn.`cnt_{$escaped}` = curr.`cnt_{$escaped}`";
178
+ // phpcs:disable WordPress.DB.PreparedSQL
179
+ $readers[] = $wpdb->prepare("SUM(IF(wpmlt.language_code = %s, 1, 0)) AS `cnt_{$escaped}`", $code);
180
+ // phpcs:enable WordPress.DB.PreparedSQL
181
  }
182
  // Create UPDATE query
183
  // phpcs:disable WordPress.DB.PreparedSQL
184
  $sqlStatement = "UPDATE {$table_name_icl} AS tn SET " . \join(',', $setters) . " WHERE {$where}";
185
+ $sqlStatement =
186
+ "UPDATE {$table_name_icl} AS tn\n INNER JOIN (\n SELECT rmlic.fid,\n SUM(IF(wpmlt.language_code = 'sk', 1, 0)) AS `cnt_sk`,\n SUM(IF(wpmlt.language_code = 'en', 1, 0)) AS `cnt_en`\n FROM {$table_name_icl} rmlic\n LEFT JOIN {$table_name_posts} rmlpostscnt\n ON rmlpostscnt.fid = rmlic.fid\n LEFT JOIN " .
187
+ $wpdb->prefix .
188
+ "icl_translations wpmlt\n ON wpmlt.element_id = rmlpostscnt.attachment\n AND wpmlt.element_type = 'post_attachment'\n GROUP BY rmlic.fid\n ) curr\n ON curr.fid = tn.fid\n SET " .
189
+ \join(',', $setters) .
190
+ "\n WHERE {$where}";
191
  $wpdb->query($sqlStatement);
192
  // phpcs:enable WordPress.DB.PreparedSQL
193
  $this->debug('WPML: Update count cache table', __METHOD__);
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.8
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.9
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 ComposerAutoloaderInit60d20223154aa658be53c7c724a64725::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit20456466edeaad54da06d46ce5498958::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' => '93f1135445504cc2569550cf1e7d9a5593cb8023', 'name' => '__root__'), 'versions' => array('__root__' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '93f1135445504cc2569550cf1e7d9a5593cb8023'), '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' => 'd53bb26ab70e25f00d27336fb07c6199b664c7b9', 'name' => '__root__'), 'versions' => array('__root__' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => 'd53bb26ab70e25f00d27336fb07c6199b664c7b9'), '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 ComposerAutoloaderInit60d20223154aa658be53c7c724a64725
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit60d20223154aa658be53c7c724a64725
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit60d20223154aa658be53c7c724a64725', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit60d20223154aa658be53c7c724a64725', '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\ComposerStaticInit60d20223154aa658be53c7c724a64725::getInitializer($loader));
34
  } else {
35
  $classMap = require __DIR__ . '/autoload_classmap.php';
36
  if ($classMap) {
@@ -42,19 +42,19 @@ class ComposerAutoloaderInit60d20223154aa658be53c7c724a64725
42
  $loader->register(true);
43
 
44
  if ($useStaticLoader) {
45
- $includeFiles = Composer\Autoload\ComposerStaticInit60d20223154aa658be53c7c724a64725::$files;
46
  } else {
47
  $includeFiles = require __DIR__ . '/autoload_files.php';
48
  }
49
  foreach ($includeFiles as $fileIdentifier => $file) {
50
- composerRequire60d20223154aa658be53c7c724a64725($fileIdentifier, $file);
51
  }
52
 
53
  return $loader;
54
  }
55
  }
56
 
57
- function composerRequire60d20223154aa658be53c7c724a64725($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 ComposerAutoloaderInit20456466edeaad54da06d46ce5498958
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit20456466edeaad54da06d46ce5498958', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit20456466edeaad54da06d46ce5498958', '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\ComposerStaticInit20456466edeaad54da06d46ce5498958::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\ComposerStaticInit20456466edeaad54da06d46ce5498958::$files;
46
  } else {
47
  $includeFiles = require __DIR__ . '/autoload_files.php';
48
  }
49
  foreach ($includeFiles as $fileIdentifier => $file) {
50
+ composerRequire20456466edeaad54da06d46ce5498958($fileIdentifier, $file);
51
  }
52
 
53
  return $loader;
54
  }
55
  }
56
 
57
+ function composerRequire20456466edeaad54da06d46ce5498958($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 ComposerStaticInit60d20223154aa658be53c7c724a64725
8
  {
9
  public static $files = array (
10
  'b45694f813fe096b704a1908536cfec0' => __DIR__ . '/..' . '/devowl-wp/real-utils/src/autoload.php',
@@ -144,9 +144,9 @@ class ComposerStaticInit60d20223154aa658be53c7c724a64725
144
  public static function getInitializer(ClassLoader $loader)
145
  {
146
  return \Closure::bind(function () use ($loader) {
147
- $loader->prefixLengthsPsr4 = ComposerStaticInit60d20223154aa658be53c7c724a64725::$prefixLengthsPsr4;
148
- $loader->prefixDirsPsr4 = ComposerStaticInit60d20223154aa658be53c7c724a64725::$prefixDirsPsr4;
149
- $loader->classMap = ComposerStaticInit60d20223154aa658be53c7c724a64725::$classMap;
150
 
151
  }, null, ClassLoader::class);
152
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit20456466edeaad54da06d46ce5498958
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 = ComposerStaticInit20456466edeaad54da06d46ce5498958::$prefixLengthsPsr4;
148
+ $loader->prefixDirsPsr4 = ComposerStaticInit20456466edeaad54da06d46ce5498958::$prefixDirsPsr4;
149
+ $loader->classMap = ComposerStaticInit20456466edeaad54da06d46ce5498958::$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' => '93f1135445504cc2569550cf1e7d9a5593cb8023', 'name' => '__root__'), 'versions' => array('__root__' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '93f1135445504cc2569550cf1e7d9a5593cb8023'), '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' => 'd53bb26ab70e25f00d27336fb07c6199b664c7b9', 'name' => '__root__'), 'versions' => array('__root__' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => 'd53bb26ab70e25f00d27336fb07c6199b664c7b9'), '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/real-utils/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.8.2 (2022-01-25)
7
 
8
  **Note:** This package (@devowl-wp/real-utils) has been updated because a dependency, which is also shipped with this package, has changed.
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.8.3 (2022-01-31)
7
+
8
+
9
+ ### fix
10
+
11
+ * unify enqueue_scripts hooks to be compatible with AffiliateTheme (CU-1xpm56k)
12
+
13
+
14
+
15
+
16
+
17
  ## 1.8.2 (2022-01-25)
18
 
19
  **Note:** This package (@devowl-wp/real-utils) has been updated because a dependency, which is also shipped with this package, has changed.
vendor/devowl-wp/real-utils/package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "@devowl-wp/real-utils",
3
- "version": "1.8.2",
4
  "description": "Create cross-selling ads, about page, rating and newsletter input for WP Real plugins.",
5
  "author": "devowl",
6
  "homepage": "https://devowl.io",
1
  {
2
  "name": "@devowl-wp/real-utils",
3
+ "version": "1.8.3",
4
  "description": "Create cross-selling ads, about page, rating and newsletter input for WP Real plugins.",
5
  "author": "devowl",
6
  "homepage": "https://devowl.io",
vendor/devowl-wp/real-utils/src/Assets.php CHANGED
@@ -60,7 +60,7 @@ class Assets {
60
  * @param string $hook_suffix The current admin page
61
  */
62
  public function enqueue_scripts_and_styles($type, $hook_suffix = null) {
63
- if ($type !== 'admin_enqueue_scripts') {
64
  return;
65
  }
66
  $handle = $this->enqueueHelper();
60
  * @param string $hook_suffix The current admin page
61
  */
62
  public function enqueue_scripts_and_styles($type, $hook_suffix = null) {
63
+ if (!\in_array($type, ['admin_enqueue_scripts', 'customize_controls_print_scripts'], \true)) {
64
  return;
65
  }
66
  $handle = $this->enqueueHelper();
vendor/devowl-wp/real-utils/src/Core.php CHANGED
@@ -67,6 +67,7 @@ class Core {
67
  'rest_api_init'
68
  ]);
69
  add_action('admin_enqueue_scripts', [$this->getAssets(), 'admin_enqueue_scripts']);
 
70
  // We have decided to (temporarily) deactivate cross selling, see also https://app.clickup.com/t/ajyaar
71
  // add_action('admin_init', [$options, 'admin_init']);
72
  // Enable `no-store` for our relevant WP REST API endpoints
67
  'rest_api_init'
68
  ]);
69
  add_action('admin_enqueue_scripts', [$this->getAssets(), 'admin_enqueue_scripts']);
70
+ add_action('customize_controls_print_scripts', [$this->getAssets(), 'customize_controls_print_scripts']);
71
  // We have decided to (temporarily) deactivate cross selling, see also https://app.clickup.com/t/ajyaar
72
  // add_action('admin_init', [$options, 'admin_init']);
73
  // Enable `no-store` for our relevant WP REST API endpoints
vendor/devowl-wp/utils/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
  ## 1.12.4 (2022-01-25)
7
 
8
  **Note:** This package (@devowl-wp/utils) has been updated because a dependency, which is also shipped with this package, has changed.
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.5 (2022-01-31)
7
+
8
+
9
+ ### fix
10
+
11
+ * provide _dataLocale parameter to all our REST API requests to be compatible with PolyLang / WPML (CU-1vqym25)
12
+ * unify enqueue_scripts hooks to be compatible with AffiliateTheme (CU-1xpm56k)
13
+
14
+
15
+
16
+
17
+
18
  ## 1.12.4 (2022-01-25)
19
 
20
  **Note:** This package (@devowl-wp/utils) has been updated because a dependency, which is also shipped with this package, has changed.
vendor/devowl-wp/utils/package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "@devowl-wp/utils",
3
- "version": "1.12.4",
4
  "description": "Utility functionality for all your WordPress plugins.",
5
  "author": "devowl",
6
  "homepage": "https://devowl.io",
1
  {
2
  "name": "@devowl-wp/utils",
3
+ "version": "1.12.5",
4
  "description": "Utility functionality for all your WordPress plugins.",
5
  "author": "devowl",
6
  "homepage": "https://devowl.io",
vendor/devowl-wp/utils/src/Assets.php CHANGED
@@ -26,6 +26,14 @@ trait Assets {
26
  * Enqueue scripts and styles in frontend pages.
27
  */
28
  public static $TYPE_FRONTEND = 'wp_enqueue_scripts';
 
 
 
 
 
 
 
 
29
  /**
30
  * The regex to get the library folder name of public/lib files.
31
  */
@@ -64,8 +72,22 @@ trait Assets {
64
  * @return mixed
65
  */
66
  public function localizeScript($context) {
67
- // We put custom variables to "others" because if you put for example
68
- // a boolean to the first-level it is interpreted as "1" instead of true.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  return [
70
  'slug' => $this->getPluginConstant(
71
  \MatthiasWeb\RealMediaLibrary\Vendor\MatthiasWeb\Utils\PluginReceiver::$PLUGIN_CONST_SLUG
@@ -81,13 +103,7 @@ trait Assets {
81
  ),
82
  'restNamespace' => \MatthiasWeb\RealMediaLibrary\Vendor\MatthiasWeb\Utils\Service::getNamespace($this),
83
  'restRoot' => $this->getAsciiUrl(get_rest_url()),
84
- 'restQuery' => [
85
- '_v' => $this->getPluginConstant(
86
- \MatthiasWeb\RealMediaLibrary\Vendor\MatthiasWeb\Utils\PluginReceiver::$PLUGIN_CONST_VERSION
87
- ),
88
- // Always request the users locale settings (https://core.trac.wordpress.org/ticket/44758)
89
- '_locale' => 'user'
90
- ],
91
  'restNonce' => wp_installing() && !is_multisite() ? '' : wp_create_nonce('wp_rest'),
92
  'restRecreateNonceEndpoint' => admin_url('admin-ajax.php?action=rest-nonce'),
93
  'publicUrl' => trailingslashit(
@@ -100,6 +116,8 @@ trait Assets {
100
  ),
101
  'chunkFolder' => \basename($this->getPublicFolder()),
102
  'chunks' => $this->getChunkTranslationMap(),
 
 
103
  'others' => $this->overrideLocalizeScript($context)
104
  ];
105
  }
@@ -702,6 +720,19 @@ trait Assets {
702
  public function wp_enqueue_scripts() {
703
  $this->enqueue_scripts_and_styles(self::$TYPE_FRONTEND);
704
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
705
  /**
706
  * The function and mechanism of wp_set_script_translations() is great of course. Unfortunately
707
  * popular plugins like WP Rocket and Divi are not compatible with it (especially page builders
26
  * Enqueue scripts and styles in frontend pages.
27
  */
28
  public static $TYPE_FRONTEND = 'wp_enqueue_scripts';
29
+ /**
30
+ * Enqueue scripts and styles in login page.
31
+ */
32
+ public static $TYPE_LOGIN = 'login_enqueue_scripts';
33
+ /**
34
+ * Enqueue scripts and styles in customize page.
35
+ */
36
+ public static $TYPE_CUSTOMIZE = 'customize_controls_print_scripts';
37
  /**
38
  * The regex to get the library folder name of public/lib files.
39
  */
72
  * @return mixed
73
  */
74
  public function localizeScript($context) {
75
+ /**
76
+ * The REST query array defines the query parameters which are passed to all our executed
77
+ * REST API requests. This could be useful e.g. when using plugins like WPML or PolyLang and
78
+ * pass the correct language via GET parameters.
79
+ *
80
+ * @hook DevOwl/Utils/RestQuery
81
+ * @param {array} $restQuery
82
+ * @since 1.12.5
83
+ */
84
+ $restQuery = apply_filters('DevOwl/Utils/RestQuery', [
85
+ '_v' => $this->getPluginConstant(
86
+ \MatthiasWeb\RealMediaLibrary\Vendor\MatthiasWeb\Utils\PluginReceiver::$PLUGIN_CONST_VERSION
87
+ ),
88
+ // Always request the users locale settings (https://core.trac.wordpress.org/ticket/44758)
89
+ '_locale' => 'user'
90
+ ]);
91
  return [
92
  'slug' => $this->getPluginConstant(
93
  \MatthiasWeb\RealMediaLibrary\Vendor\MatthiasWeb\Utils\PluginReceiver::$PLUGIN_CONST_SLUG
103
  ),
104
  'restNamespace' => \MatthiasWeb\RealMediaLibrary\Vendor\MatthiasWeb\Utils\Service::getNamespace($this),
105
  'restRoot' => $this->getAsciiUrl(get_rest_url()),
106
+ 'restQuery' => $restQuery,
 
 
 
 
 
 
107
  'restNonce' => wp_installing() && !is_multisite() ? '' : wp_create_nonce('wp_rest'),
108
  'restRecreateNonceEndpoint' => admin_url('admin-ajax.php?action=rest-nonce'),
109
  'publicUrl' => trailingslashit(
116
  ),
117
  'chunkFolder' => \basename($this->getPublicFolder()),
118
  'chunks' => $this->getChunkTranslationMap(),
119
+ // We put custom variables to "others" because if you put for example
120
+ // a boolean to the first-level it is interpreted as "1" instead of `true`.
121
  'others' => $this->overrideLocalizeScript($context)
122
  ];
123
  }
720
  public function wp_enqueue_scripts() {
721
  $this->enqueue_scripts_and_styles(self::$TYPE_FRONTEND);
722
  }
723
+ /*
724
+ * Enqueue blocker and banner in Login screen too, so reCaptcha forms or
725
+ * similar scripts can be blocked.
726
+ */
727
+ public function login_enqueue_scripts() {
728
+ $this->enqueue_scripts_and_styles(self::$TYPE_LOGIN);
729
+ }
730
+ /**
731
+ * Enqueue scripts in customize (not preview!)
732
+ */
733
+ public function customize_controls_print_scripts() {
734
+ $this->enqueue_scripts_and_styles(self::$TYPE_CUSTOMIZE);
735
+ }
736
  /**
737
  * The function and mechanism of wp_set_script_translations() is great of course. Unfortunately
738
  * popular plugins like WP Rocket and Divi are not compatible with it (especially page builders