diff --git a/changelog.txt b/changelog.txt index 6907e2082..b2dfc1eab 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ == Changelog == += 4.2.1 = +* ENHANCEMENT - updated `wpmetabox/meta-box` library from 5.10.11 to 5.10.15. +* FIX - correctly loads text domain to prevent PHP notices. +* FIX - `udx/lib-ud-api-client` package correctly loads text domain to prevent PHP notices. + = 4.2.0 = * ENHANCEMENT - Updated Client library for Google APIs from 2.18.2 to 2.18.3. * ENHANCEMENT - updated `firebase/php-jwt` library from 6.10.2 to 6.11.1. diff --git a/changes.md b/changes.md index 715fb611f..18eff97d6 100644 --- a/changes.md +++ b/changes.md @@ -1,3 +1,8 @@ +#### 4.2.1 +* ENHANCEMENT - updated `wpmetabox/meta-box` library from 5.10.11 to 5.10.15. +* FIX - correctly loads text domain to prevent PHP notices. +* FIX - `udx/lib-ud-api-client` package correctly loads text domain to prevent PHP notices. + #### 4.2.0 * ENHANCEMENT - Updated Client library for Google APIs from 2.18.2 to 2.18.3. * ENHANCEMENT - updated `firebase/php-jwt` library from 6.10.2 to 6.11.1. diff --git a/composer.json b/composer.json index 721af8298..490494d87 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ } ], "require": { - "php": ">=5.6.20", + "php": ">=7.4", "composer/installers": "~2.3", "ccampbell/chromephp": "^4.1", "firebase/php-jwt": "^6.1.2", diff --git a/composer.lock b/composer.lock index e58ec2b09..8d1b09bc0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "13cd83cdebf4ee828cde231007ebdc17", + "content-hash": "efe78ab64a63ac2a59fdd7be8e49f336", "packages": [ { "name": "ccampbell/chromephp", @@ -264,15 +264,15 @@ }, { "name": "udx/lib-ud-api-client", - "version": "1.2.4", + "version": "1.2.5", "source": { "type": "git", "url": "git@github.com:udx/lib-ud-api-client", - "reference": "1.2.4" + "reference": "1.2.5" }, "dist": { "type": "zip", - "url": "https://github.com/udx/lib-ud-api-client/archive/1.2.4.zip" + "url": "https://github.com/udx/lib-ud-api-client/archive/1.2.5.zip" }, "require": { "php": ">=5.3" @@ -340,15 +340,15 @@ }, { "name": "wpackagist-plugin/meta-box", - "version": "5.10.11", + "version": "5.10.15", "source": { "type": "svn", "url": "https://plugins.svn.wordpress.org/meta-box/", - "reference": "tags/5.10.11" + "reference": "tags/5.10.15" }, "dist": { "type": "zip", - "url": "https://downloads.wordpress.org/plugin/meta-box.5.10.11.zip" + "url": "https://downloads.wordpress.org/plugin/meta-box.5.10.15.zip" }, "require": { "composer/installers": "^1.0 || ^2.0" @@ -900,7 +900,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -959,7 +959,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" }, "funding": [ { @@ -970,6 +970,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -979,16 +983,16 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", "shasum": "" }, "require": { @@ -1037,7 +1041,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" }, "funding": [ { @@ -1048,16 +1052,20 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2025-06-27T09:58:17+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -1118,7 +1126,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" }, "funding": [ { @@ -1129,6 +1137,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -1138,7 +1150,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -1199,7 +1211,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" }, "funding": [ { @@ -1210,6 +1222,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -1219,7 +1235,7 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", @@ -1275,7 +1291,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.33.0" }, "funding": [ { @@ -1286,6 +1302,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -1295,7 +1315,7 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", @@ -1355,7 +1375,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0" }, "funding": [ { @@ -1366,6 +1386,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -1547,7 +1571,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.6.20" + "php": ">=7.4" }, "platform-dev": [], "plugin-api-version": "2.6.0" diff --git a/lib/Google/composer.json b/lib/Google/composer.json index d9b165f42..b0deec34b 100644 --- a/lib/Google/composer.json +++ b/lib/Google/composer.json @@ -22,7 +22,7 @@ "symfony/dom-crawler": "~2.1", "symfony/css-selector": "~2.1", "phpcompatibility/php-compatibility": "^9.2", - "composer/composer": "^1.10.23", + "composer/composer": "^1.10.23 || ^2.0.0", "phpspec/prophecy-phpunit": "^2.1", "phpunit/phpunit": "^9.6" }, diff --git a/lib/Google/phpstan.neon.dist b/lib/Google/phpstan.neon.dist deleted file mode 100644 index dcef11342..000000000 --- a/lib/Google/phpstan.neon.dist +++ /dev/null @@ -1,5 +0,0 @@ -parameters: - treatPhpDocTypesAsCertain: false - level: 5 - paths: - - src diff --git a/lib/Google/vendor/google/cloud-core/.gitattributes b/lib/Google/vendor/google/cloud-core/.gitattributes deleted file mode 100644 index d43b60862..000000000 --- a/lib/Google/vendor/google/cloud-core/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -/*.xml.dist export-ignore -/tests export-ignore -/.github export-ignore diff --git a/lib/Google/vendor/google/cloud-storage/.gitattributes b/lib/Google/vendor/google/cloud-storage/.gitattributes deleted file mode 100644 index d43b60862..000000000 --- a/lib/Google/vendor/google/cloud-storage/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -/*.xml.dist export-ignore -/tests export-ignore -/.github export-ignore diff --git a/lib/Google/vendor/google/gax/.repo-metadata.json b/lib/Google/vendor/google/gax/.repo-metadata.json deleted file mode 100644 index 2fe16da27..000000000 --- a/lib/Google/vendor/google/gax/.repo-metadata.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/gax", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/gax/latest", - "library_type": "CORE" -} diff --git a/lib/Google/vendor/google/grpc-gcp/.github/release-please.yml b/lib/Google/vendor/google/grpc-gcp/.github/release-please.yml deleted file mode 100644 index ddc69395d..000000000 --- a/lib/Google/vendor/google/grpc-gcp/.github/release-please.yml +++ /dev/null @@ -1,3 +0,0 @@ -releaseType: simple -handleGHRelease: true -primaryBranch: main diff --git a/lib/Google/vendor/google/grpc-gcp/.github/workflows/tests.yml b/lib/Google/vendor/google/grpc-gcp/.github/workflows/tests.yml deleted file mode 100644 index fe47b44c0..000000000 --- a/lib/Google/vendor/google/grpc-gcp/.github/workflows/tests.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Test Suite -on: - push: - branches: - - master - pull_request: -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - php: [ "8.0", "8.1", "8.2", "8.3", "8.4" ] - name: "PHP ${{ matrix.php }} Unit Test" - steps: - - uses: actions/checkout@v2 - - uses: codecov/codecov-action@v1 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - tools: pecl - extensions: grpc-1.49.0 - - name: Install composer dependencies - uses: nick-invision/retry@v1 - with: - timeout_minutes: 10 - max_attempts: 3 - command: composer install - - name: Run PHPUnit - run: vendor/bin/phpunit -v diff --git a/lib/Google/vendor/google/grpc-gcp/.gitmodules b/lib/Google/vendor/google/grpc-gcp/.gitmodules deleted file mode 100644 index 6c20e7b68..000000000 --- a/lib/Google/vendor/google/grpc-gcp/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "third_party/googleapis"] - path = third_party/googleapis - url = https://github.com/googleapis/googleapis.git diff --git a/lib/Google/vendor/google/longrunning/.gitattributes b/lib/Google/vendor/google/longrunning/.gitattributes deleted file mode 100644 index f51251a9b..000000000 --- a/lib/Google/vendor/google/longrunning/.gitattributes +++ /dev/null @@ -1,6 +0,0 @@ -/*.xml.dist export-ignore -/tests export-ignore -/.github export-ignore -/.OwlBot.yaml export-ignore -/owlbot.py export-ignore -/src/**/gapic_metadata.json export-ignore diff --git a/lib/Google/vendor/paragonie/random_compat/build-phar.sh b/lib/Google/vendor/paragonie/random_compat/build-phar.sh deleted file mode 100755 index b4a5ba31c..000000000 --- a/lib/Google/vendor/paragonie/random_compat/build-phar.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -basedir=$( dirname $( readlink -f ${BASH_SOURCE[0]} ) ) - -php -dphar.readonly=0 "$basedir/other/build_phar.php" $* \ No newline at end of file diff --git a/lib/Google/vendor/symfony/deprecation-contracts/.gitignore b/lib/Google/vendor/symfony/deprecation-contracts/.gitignore deleted file mode 100644 index c49a5d8df..000000000 --- a/lib/Google/vendor/symfony/deprecation-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/lib/classes/class-bootstrap.php b/lib/classes/class-bootstrap.php index 6d266bb2a..04fdb3f38 100644 --- a/lib/classes/class-bootstrap.php +++ b/lib/classes/class-bootstrap.php @@ -213,11 +213,11 @@ public function init() { $is_connected = $this->is_connected_to_gs(); if (is_wp_error($is_connected)) { - $this->errors->add($is_connected->get_error_message(), 'warning'); + $this->errors->add($is_connected->get_error_message(), 'warning', false); } if ($googleSDKVersionConflictError = get_transient("wp_stateless_google_sdk_conflict")) { - $this->errors->add($googleSDKVersionConflictError, 'warning'); + $this->errors->add($googleSDKVersionConflictError, 'warning', false); } /** @@ -281,11 +281,11 @@ public function init() { $is_connected = $this->is_connected_to_gs(); if (is_wp_error($is_connected)) { - $this->errors->add($is_connected->get_error_message(), 'warning'); + $this->errors->add($is_connected->get_error_message(), 'warning', false); } if ($googleSDKVersionConflictError = get_transient("wp_stateless_google_sdk_conflict")) { - $this->errors->add($googleSDKVersionConflictError, 'warning'); + $this->errors->add($googleSDKVersionConflictError, 'warning', false); } /** @@ -421,7 +421,7 @@ public function select_wp_image_editors($editors) { * @return StorageClient * @throws \Exception */ - public function init_gs_client(callable $httpHandler = null) { + public function init_gs_client(?callable $httpHandler = null) { // May be Loading Google SDK.... if (!class_exists('HttpHandlerFactory')) { include_once(ud_get_stateless_media()->path('lib/Google/vendor/autoload.php', 'dir')); @@ -1650,7 +1650,7 @@ public function is_connected_to_gs() { $connected = $client->is_connected(); if ($connected !== true) { $trnst['success'] = 'false'; - $trnst['error'] = sprintf(__('Could not connect to Google Storage bucket. Please be sure that bucket with name %s exists and the access credentials are correct.', $this->domain), esc_html($this->get('sm.bucket'))); + $trnst['error'] = sprintf('Could not connect to Google Storage bucket. Please be sure that bucket with name %s exists and the access credentials are correct.', esc_html($this->get('sm.bucket'))); if (is_callable(array($connected, 'getHandlerContext')) && $handlerContext = $connected->getHandlerContext()) { if (!empty($handlerContext['error'])) { @@ -1670,7 +1670,7 @@ public function is_connected_to_gs() { } if (isset($trnst['success']) && $trnst['success'] == 'false') { - return new \WP_Error('error', (!empty($trnst['error']) ? $trnst['error'] : __('There is an Error on connection to Google Storage.', $this->domain))); + return new \WP_Error('error', (!empty($trnst['error']) ? $trnst['error'] : 'There is an Error on connection to Google Storage.')); } return true; diff --git a/lib/classes/class-errors.php b/lib/classes/class-errors.php index 3e94b6095..88530003a 100644 --- a/lib/classes/class-errors.php +++ b/lib/classes/class-errors.php @@ -112,9 +112,10 @@ private function add_message( &$collection, $message ) { * * @param string $message * @param string $type Values: 'error', 'message', 'warning' + * @param string $translate Values: true, false * @author peshkov@UD */ - public function add( $message, $type = 'error' ) { + public function add( $message, $type = 'error', $translate = true ) { switch( $type ) { case 'error': $this->add_message($this->errors, $message); @@ -123,8 +124,12 @@ public function add( $message, $type = 'error' ) { case 'warning': case 'notice': if(!is_array($message)){ + $title = $translate + ? sprintf( __( '%s has the following notice:', $this->domain ), esc_html($this->name) ) + : sprintf( '%s has the following notice:', esc_html($this->name) ); + $message = array( - 'title' => sprintf( __( '%s has the following notice:', $this->domain ), esc_html($this->name) ), + 'title' => $title, 'message' => $message, 'button' => null, ); diff --git a/lib/classes/class-settings.php b/lib/classes/class-settings.php index f241def0f..58877e0da 100644 --- a/lib/classes/class-settings.php +++ b/lib/classes/class-settings.php @@ -120,6 +120,22 @@ public function __construct($bootstrap = null) { // Settings page content add_action('wp_stateless_settings_tab_content', array($this, 'settings_tab_content')); add_action('wp_stateless_processing_tab_content', array($this, 'processing_tab_content')); + } + + /** + * Init + */ + public function init(){ + $this->save_media_settings(); + + add_action('admin_menu', array( $this, 'admin_menu' )); + + /** + * Manage specific Network Settings + */ + if( is_network_admin() ) { + add_action( 'network_admin_menu', array( $this, 'network_admin_menu' )); + } $site_url = parse_url( site_url() ); $site_url['path'] = isset($site_url['path']) ? $site_url['path'] : ''; @@ -158,22 +174,6 @@ public function __construct($bootstrap = null) { ); } - /** - * Init - */ - public function init(){ - $this->save_media_settings(); - - add_action('admin_menu', array( $this, 'admin_menu' )); - /** - * Manage specific Network Settings - */ - if( is_network_admin() ) { - add_action( 'network_admin_menu', array( $this, 'network_admin_menu' )); - } - - } - /** * Refresh settings */ diff --git a/readme.md b/readme.md index 62921f9b2..fd4612678 100644 --- a/readme.md +++ b/readme.md @@ -68,7 +68,7 @@ For a more detailed installation and setup walkthrough, please see the [manual s ### What are the minimum server requirements for this plugin? -Beyond the [official WordPress minimum requirements](https://codex.wordpress.org/Template:Server_requirements), WP-Stateless requires a minimum PHP version of 7.2 or higher and OpenSSL to be enabled. +Beyond the [official WordPress minimum requirements](https://codex.wordpress.org/Template:Server_requirements), WP-Stateless requires a minimum PHP version of 8.0 or higher and OpenSSL to be enabled. ### What wp-config constants are supported? diff --git a/readme.txt b/readme.txt index bea6d3a4d..bf4751400 100644 --- a/readme.txt +++ b/readme.txt @@ -6,7 +6,7 @@ License: GPLv2 or later Requires PHP: 8.0 Requires at least: 5.0 Tested up to: 6.8 -Stable tag: 4.2.0 +Stable tag: 4.2.1 Upload and serve your WordPress media files from Google Cloud Storage. @@ -135,7 +135,12 @@ Before upgrading to WP-Stateless 3.2.0, please, make sure you use PHP 7.2 or abo Before upgrading to WP-Stateless 3.0, please, make sure you tested it on your development environment. == Changelog == -= 4.2 = += 4.2.1 = +* ENHANCEMENT - updated `wpmetabox/meta-box` library from 5.10.11 to 5.10.15. +* FIX - correctly loads text domain to prevent PHP notices. +* FIX - `udx/lib-ud-api-client` package correctly loads text domain to prevent PHP notices. + += 4.2.0 = * ENHANCEMENT - Updated Client library for Google APIs from 2.18.2 to 2.18.3. * ENHANCEMENT - updated `firebase/php-jwt` library from 6.10.2 to 6.11.1. * ENHANCEMENT - updated `wpmetabox/meta-box` library from 5.10.1 to 5.10.11. diff --git a/static/data/addons.php b/static/data/addons.php index e06582fe2..648299884 100644 --- a/static/data/addons.php +++ b/static/data/addons.php @@ -47,7 +47,7 @@ 'title' => 'WooCommerce', 'plugin_files' => ['woocommerce/woocommerce.php'], 'addon_file' => 'wp-stateless-woocommerce-addon/wp-stateless-woocommerce-addon.php', - 'icon' => 'https://ps.w.org/woocommerce/assets/icon-128x128.gif', + 'icon' => 'https://ps.w.org/woocommerce/assets/icon.svg', 'repo' => 'udx/wp-stateless-woocommerce-addon', 'wp' => 'https://wordpress.org/plugins/wp-stateless-woocommerce-addon/', 'hubspot_id' => '151478251047', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 55efadc61..c474bc8e1 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -263,16 +263,16 @@ }, { "name": "udx/lib-ud-api-client", - "version": "1.2.4", - "version_normalized": "1.2.4.0", + "version": "1.2.5", + "version_normalized": "1.2.5.0", "source": { "type": "git", "url": "git@github.com:udx/lib-ud-api-client", - "reference": "1.2.4" + "reference": "1.2.5" }, "dist": { "type": "zip", - "url": "https://github.com/udx/lib-ud-api-client/archive/1.2.4.zip" + "url": "https://github.com/udx/lib-ud-api-client/archive/1.2.5.zip" }, "require": { "php": ">=5.3" @@ -345,16 +345,16 @@ }, { "name": "wpackagist-plugin/meta-box", - "version": "5.10.11", - "version_normalized": "5.10.11.0", + "version": "5.10.15", + "version_normalized": "5.10.15.0", "source": { "type": "svn", "url": "https://plugins.svn.wordpress.org/meta-box/", - "reference": "tags/5.10.11" + "reference": "tags/5.10.15" }, "dist": { "type": "zip", - "url": "https://downloads.wordpress.org/plugin/meta-box.5.10.11.zip" + "url": "https://downloads.wordpress.org/plugin/meta-box.5.10.15.zip" }, "require": { "composer/installers": "^1.0 || ^2.0" diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index d632920b6..390e393a9 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'wpcloud/wp-stateless', 'pretty_version' => 'dev-latest', 'version' => 'dev-latest', - 'reference' => 'e9bccc39abc840b90f13f5054b669f3d2d2fe0df', + 'reference' => 'e87ce7a5a22978757737b6a23716cb2b015c5809', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -38,9 +38,9 @@ 'dev_requirement' => false, ), 'udx/lib-ud-api-client' => array( - 'pretty_version' => '1.2.4', - 'version' => '1.2.4.0', - 'reference' => '1.2.4', + 'pretty_version' => '1.2.5', + 'version' => '1.2.5.0', + 'reference' => '1.2.5', 'type' => 'library', 'install_path' => __DIR__ . '/../udx/lib-ud-api-client', 'aliases' => array(), @@ -56,9 +56,9 @@ 'dev_requirement' => false, ), 'wpackagist-plugin/meta-box' => array( - 'pretty_version' => '5.10.11', - 'version' => '5.10.11.0', - 'reference' => 'tags/5.10.11', + 'pretty_version' => '5.10.15', + 'version' => '5.10.15.0', + 'reference' => 'tags/5.10.15', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../wpmetabox/meta-box', 'aliases' => array(), @@ -67,7 +67,7 @@ 'wpcloud/wp-stateless' => array( 'pretty_version' => 'dev-latest', 'version' => 'dev-latest', - 'reference' => 'e9bccc39abc840b90f13f5054b669f3d2d2fe0df', + 'reference' => 'e87ce7a5a22978757737b6a23716cb2b015c5809', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/vendor/udx/lib-ud-api-client/changes.md b/vendor/udx/lib-ud-api-client/changes.md index 8faaf0d15..cce11f8bb 100644 --- a/vendor/udx/lib-ud-api-client/changes.md +++ b/vendor/udx/lib-ud-api-client/changes.md @@ -1,3 +1,7 @@ +### 1.2.5 + +* Fix text domain initialization to prevent PHP notices. + ### 1.2.4 * Require user to be logged in while dismissing Admin Panel notices. diff --git a/vendor/udx/lib-ud-api-client/gruntfile.js b/vendor/udx/lib-ud-api-client/gruntfile.js index 4deb0ebf1..3ff20fcf7 100644 --- a/vendor/udx/lib-ud-api-client/gruntfile.js +++ b/vendor/udx/lib-ud-api-client/gruntfile.js @@ -2,7 +2,7 @@ * Build Plugin. * * @author potanin@UD - * @version 1.2.4 + * @version 1.2.5 * @param grunt */ module.exports = function( grunt ) { diff --git a/vendor/udx/lib-ud-api-client/lib/classes/class-admin.php b/vendor/udx/lib-ud-api-client/lib/classes/class-admin.php index 6cbdeb0b9..16ba6f022 100644 --- a/vendor/udx/lib-ud-api-client/lib/classes/class-admin.php +++ b/vendor/udx/lib-ud-api-client/lib/classes/class-admin.php @@ -82,25 +82,27 @@ public function __construct( $args = array() ) { ) ) ); //** Set available screens */ - $screens = array(); - if( $this->type == 'theme' ) { - $screens =array_filter( array( - 'licenses' => __( 'License', $this->domain ), - 'more_products' => false, - ) ); - } elseif ( $this->type == 'plugin' ) { - $screens =array_filter( array( - 'licenses' => __( 'Licenses', $this->domain ), - 'more_products' => __( 'More Products', $this->domain ), - ) ); - } - - //** UI */ - $this->ui = new UI( array_merge( $args, array( - 'token' => $this->token, - 'screens' => $screens, - ) ) ); - + add_action('init', function () use ($args) { + $screens = array(); + if( $this->type == 'theme' ) { + $screens =array_filter( array( + 'licenses' => __( 'License', $this->domain ), + 'more_products' => false, + ) ); + } elseif ( $this->type == 'plugin' ) { + $screens =array_filter( array( + 'licenses' => __( 'Licenses', $this->domain ), + 'more_products' => __( 'More Products', $this->domain ), + ) ); + } + + // Initialize UI + $this->ui = new UI( array_merge( $args, array( + 'token' => $this->token, + 'screens' => $screens, + ) ) ); + }, 20); + $path = wp_normalize_path( dirname( dirname( __DIR__ ) ) ); $this->screens_path = trailingslashit( $path . '/static/templates' ); if( $this->type == 'theme' && strpos( $path, wp_normalize_path( WP_PLUGIN_DIR ) ) === false ) { diff --git a/vendor/udx/lib-ud-api-client/lib/classes/class-bootstrap.php b/vendor/udx/lib-ud-api-client/lib/classes/class-bootstrap.php index ced9fdeb5..b90b4705c 100644 --- a/vendor/udx/lib-ud-api-client/lib/classes/class-bootstrap.php +++ b/vendor/udx/lib-ud-api-client/lib/classes/class-bootstrap.php @@ -18,7 +18,7 @@ class Bootstrap extends Scaffold { /** * */ - public static $version = '1.2.4'; + public static $version = '1.2.5'; /** * diff --git a/vendor/udx/lib-ud-api-client/package.json b/vendor/udx/lib-ud-api-client/package.json index 938163b99..7a116ceed 100644 --- a/vendor/udx/lib-ud-api-client/package.json +++ b/vendor/udx/lib-ud-api-client/package.json @@ -1,6 +1,6 @@ { "name": "lib-ud-api-client", - "version": "1.2.4", + "version": "1.2.5", "description": "UD Client for WooCommerce API Manager", "repository": { "type": "git", diff --git a/vendor/wpmetabox/meta-box/css/select-advanced.css b/vendor/wpmetabox/meta-box/css/select-advanced.css index 08a5c7154..3ec187de3 100644 --- a/vendor/wpmetabox/meta-box/css/select-advanced.css +++ b/vendor/wpmetabox/meta-box/css/select-advanced.css @@ -13,11 +13,9 @@ } .select2-container--open .select2-dropdown--below { border-top: 1px solid #7e8993; - top: -1px; } .select2-container--open .select2-dropdown--above { border-bottom: 1px solid #7e8993; - bottom: -1px; } .select2-container .select2-selection--single { height: 30px; diff --git a/vendor/wpmetabox/meta-box/inc/field.php b/vendor/wpmetabox/meta-box/inc/field.php index 43f043cb4..0d2466c9a 100644 --- a/vendor/wpmetabox/meta-box/inc/field.php +++ b/vendor/wpmetabox/meta-box/inc/field.php @@ -320,7 +320,7 @@ public static function normalize( $field ) { 'sanitize_callback' => null, ] ); - // Store the original ID to run correct filters for the clonable field. + // Store the original ID to run correct filters for the cloneable field. if ( $field['clone'] ) { $field['_original_id'] = $field['id']; } diff --git a/vendor/wpmetabox/meta-box/inc/fields/file-upload.php b/vendor/wpmetabox/meta-box/inc/fields/file-upload.php index 51e5376fa..313a3528c 100644 --- a/vendor/wpmetabox/meta-box/inc/fields/file-upload.php +++ b/vendor/wpmetabox/meta-box/inc/fields/file-upload.php @@ -31,12 +31,4 @@ public static function normalize( $field ) { return $field; } - - /** - * Template for media item. - */ - public static function print_templates() { - parent::print_templates(); - require RWMB_INC_DIR . 'templates/upload.php'; - } } diff --git a/vendor/wpmetabox/meta-box/inc/fields/image-advanced.php b/vendor/wpmetabox/meta-box/inc/fields/image-advanced.php index 77140bd0d..32c07e544 100644 --- a/vendor/wpmetabox/meta-box/inc/fields/image-advanced.php +++ b/vendor/wpmetabox/meta-box/inc/fields/image-advanced.php @@ -71,12 +71,4 @@ public static function file_info( $file, $args = [], $field = [] ) { public static function format_single_value( $field, $value, $args, $post_id ) { return RWMB_Image_Field::format_single_value( $field, $value, $args, $post_id ); } - - /** - * Template for media item. - */ - public static function print_templates() { - parent::print_templates(); - require RWMB_INC_DIR . 'templates/image-advanced.php'; - } } diff --git a/vendor/wpmetabox/meta-box/inc/fields/image-upload.php b/vendor/wpmetabox/meta-box/inc/fields/image-upload.php index 9ecd045e2..1ddf85cd7 100644 --- a/vendor/wpmetabox/meta-box/inc/fields/image-upload.php +++ b/vendor/wpmetabox/meta-box/inc/fields/image-upload.php @@ -22,12 +22,4 @@ public static function normalize( $field ) { $field = parent::normalize( $field ); return RWMB_File_Upload_Field::normalize( $field ); } - - /** - * Template for media item. - */ - public static function print_templates() { - parent::print_templates(); - RWMB_File_Upload_Field::print_templates(); - } } diff --git a/vendor/wpmetabox/meta-box/inc/fields/map.php b/vendor/wpmetabox/meta-box/inc/fields/map.php index 40107ff55..8f52c0245 100644 --- a/vendor/wpmetabox/meta-box/inc/fields/map.php +++ b/vendor/wpmetabox/meta-box/inc/fields/map.php @@ -50,10 +50,11 @@ public static function html( $meta, $field ) { $attributes['value'] = $meta; $html .= sprintf( - '
+ '
', esc_attr( $field['std'] ), esc_attr( $field['region'] ), + esc_attr( $field['marker_draggable'] ? 'true' : 'false' ), self::render_attributes( $attributes ) ); @@ -72,14 +73,15 @@ public static function html( $meta, $field ) { public static function normalize( $field ) { $field = parent::normalize( $field ); $field = wp_parse_args( $field, [ - 'std' => '', - 'address_field' => '', - 'language' => '', - 'region' => '', + 'std' => '', + 'address_field' => '', + 'language' => '', + 'region' => '', + 'marker_draggable' => true, // Default API key, required by Google Maps since June 2016. // Users should overwrite this key with their own key. - 'api_key' => 'AIzaSyC1mUh87SGFyf133tpZQJa-s96p0tgnraQ', + 'api_key' => 'AIzaSyC1mUh87SGFyf133tpZQJa-s96p0tgnraQ', ] ); return $field; diff --git a/vendor/wpmetabox/meta-box/inc/fields/media.php b/vendor/wpmetabox/meta-box/inc/fields/media.php index 9750bf7ab..202a2ac8d 100644 --- a/vendor/wpmetabox/meta-box/inc/fields/media.php +++ b/vendor/wpmetabox/meta-box/inc/fields/media.php @@ -32,10 +32,6 @@ public static function admin_enqueue_scripts() { ] ); } - public static function add_actions() { - add_action( 'print_media_templates', [ get_called_class(), 'print_templates' ] ); - } - /** * Get meta value. * @@ -206,11 +202,4 @@ public static function save( $new, $old, $post_id, $field ) { $storage->delete( $post_id, $field['id'] ); parent::save( $new, [], $post_id, $field ); } - - /** - * Template for media item. - */ - public static function print_templates() { - require RWMB_INC_DIR . 'templates/media.php'; - } } diff --git a/vendor/wpmetabox/meta-box/inc/fields/oembed.php b/vendor/wpmetabox/meta-box/inc/fields/oembed.php index a542e1ce8..5e09f9e77 100644 --- a/vendor/wpmetabox/meta-box/inc/fields/oembed.php +++ b/vendor/wpmetabox/meta-box/inc/fields/oembed.php @@ -55,7 +55,7 @@ public static function ajax_get_embed() { */ public static function get_embed( $url, $not_available = '' ) { /** - * Set arguments for getting embeded HTML. + * Set arguments for getting embedded HTML. * Without arguments, default width will be taken from global $content_width, which can break UI in the admin. * * @link https://github.com/rilwis/meta-box/issues/801 diff --git a/vendor/wpmetabox/meta-box/inc/fields/osm.php b/vendor/wpmetabox/meta-box/inc/fields/osm.php index e33e65398..57082fe15 100644 --- a/vendor/wpmetabox/meta-box/inc/fields/osm.php +++ b/vendor/wpmetabox/meta-box/inc/fields/osm.php @@ -37,11 +37,12 @@ public static function html( $meta, $field ) { $attributes['value'] = $meta; $html .= sprintf( - '
+ '
', esc_attr( $field['std'] ), esc_attr( $field['region'] ), esc_attr( $field['language'] ), + esc_attr( $field['marker_draggable'] ? 'true' : 'false' ), self::render_attributes( $attributes ) ); @@ -59,11 +60,12 @@ public static function html( $meta, $field ) { */ public static function normalize( $field ) { $field = parent::normalize( $field ); - $field = wp_parse_args( $field, [ - 'std' => '', - 'address_field' => '', - 'language' => '', - 'region' => '', + $field = wp_parse_args( $field, [ + 'std' => '', + 'address_field' => '', + 'language' => '', + 'region' => '', + 'marker_draggable' => true, ] ); return $field; diff --git a/vendor/wpmetabox/meta-box/inc/fields/video.php b/vendor/wpmetabox/meta-box/inc/fields/video.php index c659bb64d..b312c2af6 100644 --- a/vendor/wpmetabox/meta-box/inc/fields/video.php +++ b/vendor/wpmetabox/meta-box/inc/fields/video.php @@ -122,12 +122,4 @@ public static function format_clone_value( $field, $value, $args, $post_id ) { 'type' => 'video', ] ); } - - /** - * Template for media item. - */ - public static function print_templates() { - parent::print_templates(); - require RWMB_INC_DIR . 'templates/video.php'; - } } diff --git a/vendor/wpmetabox/meta-box/inc/loader.php b/vendor/wpmetabox/meta-box/inc/loader.php index 6ab3559b0..2408bbd75 100644 --- a/vendor/wpmetabox/meta-box/inc/loader.php +++ b/vendor/wpmetabox/meta-box/inc/loader.php @@ -7,7 +7,7 @@ class RWMB_Loader { protected function constants() { // Script version, used to add version for scripts and styles. - define( 'RWMB_VER', '5.10.11' ); + define( 'RWMB_VER', '5.10.15' ); list( $path, $url ) = self::get_path( dirname( __DIR__ ) ); diff --git a/vendor/wpmetabox/meta-box/inc/meta-box.php b/vendor/wpmetabox/meta-box/inc/meta-box.php index d50809151..a7c54930b 100644 --- a/vendor/wpmetabox/meta-box/inc/meta-box.php +++ b/vendor/wpmetabox/meta-box/inc/meta-box.php @@ -79,6 +79,13 @@ protected function global_hooks() { // Enqueue common styles and scripts. add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] ); + // Enqueue assets for the block editor only, just for previewing (submission forms, custom blocks). + // Don't enqueue on frontend as front-end forms and blocks already call the enqueue() method. + // TODO: Uncomment this when we have a way to enqueue assets for the block/site editor. + // if ( is_admin() ) { + // add_action( 'enqueue_block_assets', [ $this, 'enqueue' ] ); + // } + // Add additional actions for fields. foreach ( $this->fields as $field ) { RWMB_Field::call( $field, 'add_actions' ); diff --git a/vendor/wpmetabox/meta-box/inc/templates/audio.php b/vendor/wpmetabox/meta-box/inc/templates/audio.php deleted file mode 100644 index c9090ae07..000000000 --- a/vendor/wpmetabox/meta-box/inc/templates/audio.php +++ /dev/null @@ -1,42 +0,0 @@ - - - diff --git a/vendor/wpmetabox/meta-box/inc/templates/image-advanced.php b/vendor/wpmetabox/meta-box/inc/templates/image-advanced.php deleted file mode 100644 index 494d4754c..000000000 --- a/vendor/wpmetabox/meta-box/inc/templates/image-advanced.php +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/vendor/wpmetabox/meta-box/inc/templates/media.php b/vendor/wpmetabox/meta-box/inc/templates/media.php deleted file mode 100644 index 0c91ead1f..000000000 --- a/vendor/wpmetabox/meta-box/inc/templates/media.php +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - diff --git a/vendor/wpmetabox/meta-box/inc/templates/upload.php b/vendor/wpmetabox/meta-box/inc/templates/upload.php deleted file mode 100644 index 0b6c2381a..000000000 --- a/vendor/wpmetabox/meta-box/inc/templates/upload.php +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/vendor/wpmetabox/meta-box/inc/templates/video.php b/vendor/wpmetabox/meta-box/inc/templates/video.php deleted file mode 100644 index c19900ae9..000000000 --- a/vendor/wpmetabox/meta-box/inc/templates/video.php +++ /dev/null @@ -1,37 +0,0 @@ - - - diff --git a/vendor/wpmetabox/meta-box/js/file-upload.js b/vendor/wpmetabox/meta-box/js/file-upload.js index 9c9126b46..85fc31af5 100644 --- a/vendor/wpmetabox/meta-box/js/file-upload.js +++ b/vendor/wpmetabox/meta-box/js/file-upload.js @@ -14,7 +14,13 @@ UploadButton = views.UploadButton = Backbone.View.extend( { className: 'rwmb-upload-area', tagName: 'div', - template: wp.template( 'rwmb-upload-area' ), + template: rwmb.template( ` +
+

{{{ i18nRwmbMedia.uploadInstructions }}}

+

{{{ i18nRwmbMedia.or }}}

+ +
+ ` ), render: function () { this.$el.html( this.template( {} ) ); return this; @@ -157,4 +163,8 @@ .on( 'mb_ready', init ) .on( 'clone', '.rwmb-file_upload', initFileUpload ) .on( 'click', '.rwmb-file-actions .rwmb-remove-media', removeFile ); + + wp?.hooks?.addAction( 'mb_ready', 'meta-box/ready/file_upload', ref => { + init( { target: ref } ); + } ); } )( jQuery, wp, rwmb ); diff --git a/vendor/wpmetabox/meta-box/js/image-advanced.js b/vendor/wpmetabox/meta-box/js/image-advanced.js index b7f0a0dff..89426b483 100644 --- a/vendor/wpmetabox/meta-box/js/image-advanced.js +++ b/vendor/wpmetabox/meta-box/js/image-advanced.js @@ -13,7 +13,33 @@ controller: this.controller, itemView: MediaItem.extend( { className: 'rwmb-image-item', - template: wp.template( 'rwmb-image-item' ) + template: rwmb.template( ` + +
+ <# if ( 'image' === data.type && data.sizes ) { #> + <# if ( data.sizes[data.controller.imageSize] ) { #> + + <# } else { #> + + <# } #> + <# } else { #> + <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #> + + <# } else { #> + + <# } #> + <# } #> +
+
+
+ + + + + + +
+ ` ), } ) } ); } @@ -44,4 +70,8 @@ rwmb.$document .on( 'mb_ready', init ) .on( 'clone', '.rwmb-image_advanced', initImageField ); + + wp?.hooks?.addAction( 'mb_ready', 'meta-box/ready/image_advanced', ref => { + init( { target: ref } ); + } ); } )( jQuery, rwmb ); diff --git a/vendor/wpmetabox/meta-box/js/image-upload.js b/vendor/wpmetabox/meta-box/js/image-upload.js index e5f29a00c..9fa9051b2 100644 --- a/vendor/wpmetabox/meta-box/js/image-upload.js +++ b/vendor/wpmetabox/meta-box/js/image-upload.js @@ -38,4 +38,8 @@ rwmb.$document .on( 'mb_ready', init ) .on( 'clone', '.rwmb-image_upload, .rwmb-plupload_image', initImageUpload ) + + wp?.hooks?.addAction( 'mb_ready', 'meta-box/ready/image_upload', ref => { + init( { target: ref } ); + } ); } )( jQuery, rwmb ); diff --git a/vendor/wpmetabox/meta-box/js/map-frontend.js b/vendor/wpmetabox/meta-box/js/map-frontend.js index a300ded8f..f461eb149 100644 --- a/vendor/wpmetabox/meta-box/js/map-frontend.js +++ b/vendor/wpmetabox/meta-box/js/map-frontend.js @@ -32,7 +32,7 @@ } mapOptions.center = center; - // Typcast zoom to a number + // Typecast zoom to a number mapOptions.zoom *= 1; if ( typeof mapOptions.styles === 'string' ) { diff --git a/vendor/wpmetabox/meta-box/js/map.js b/vendor/wpmetabox/meta-box/js/map.js index f50e88b61..c364e11e2 100644 --- a/vendor/wpmetabox/meta-box/js/map.js +++ b/vendor/wpmetabox/meta-box/js/map.js @@ -43,7 +43,7 @@ this.marker = new google.maps.Marker( { position: location, map: this.map, - draggable: true, + draggable: this.$canvas.data( 'marker_draggable' ), } ); }, diff --git a/vendor/wpmetabox/meta-box/js/media.js b/vendor/wpmetabox/meta-box/js/media.js index 3d9c8686a..950240ee4 100644 --- a/vendor/wpmetabox/meta-box/js/media.js +++ b/vendor/wpmetabox/meta-box/js/media.js @@ -1,6 +1,28 @@ ( function ( $, wp, _, rwmb, i18n ) { 'use strict'; + /** + * Mimic the wp.template() to be able to use with raw template string intead of a DOM element. + * So it can be used in the iframed editor. + * + * @see https://codex.wordpress.org/Javascript_Reference/wp.template + * @see https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/wp/util.js#L0 + */ + rwmb.template = _.memoize( function ( template ) { + let compiled, + options = { + evaluate: /<#([\s\S]+?)#>/g, + interpolate: /\{\{\{([\s\S]+?)\}\}\}/g, + escape: /\{\{([^\}]+?)\}\}(?!\})/g, + variable: 'data' + }; + + return function ( data ) { + compiled = compiled || _.template( template, options ); + return compiled( data ); + }; + } ); + var views = rwmb.views = rwmb.views || {}, models = rwmb.models = rwmb.models || {}, media = wp.media, @@ -147,8 +169,8 @@ } let items = $( '
' ).html( this.$input.attr( 'data-attachments' ) ).text(), models = JSON.parse( items ).map( function( attachment ) { - return wp.media.model.Attachment.create( attachment ); - } ); + return wp.media.model.Attachment.create( attachment ); + } ); this.controller.get( 'items' ).add( models ); }, @@ -191,15 +213,15 @@ this.collection = this.controller.get( 'items' ); this.itemView = options.itemView || MediaItem; this.getItemView = _.memoize( function ( item ) { - var itemView = new this.itemView( { - model: item, - controller: this.controller - } ); + var itemView = new this.itemView( { + model: item, + controller: this.controller + } ); - this.listenToItemView( itemView ); + this.listenToItemView( itemView ); - return itemView; - }, + return itemView; + }, function ( item ) { return item.cid; } @@ -320,7 +342,12 @@ MediaStatus = views.MediaStatus = Backbone.View.extend( { tagName: 'div', className: 'rwmb-media-status', - template: wp.template( 'rwmb-media-status' ), + template: rwmb.template( ` + <# if ( data.maxFiles > 0 ) { #> + {{{ data.length }}}/{{{ data.maxFiles }}} + <# if ( 1 < data.maxFiles ) { #>{{{ i18nRwmbMedia.multiple }}}<# } else {#>{{{ i18nRwmbMedia.single }}}<# } #> + <# } #> + ` ), initialize: function ( options ) { this.controller = options.controller; @@ -351,7 +378,7 @@ MediaButton = views.MediaButton = Backbone.View.extend( { tagName: 'div', className: 'rwmb-media-add', - template: wp.template( 'rwmb-media-button' ), + template: rwmb.template( `{{{ data.text }}}` ), events: { 'click .button': function () { if ( this._frame ) { @@ -413,7 +440,48 @@ MediaItem = views.MediaItem = Backbone.View.extend( { tagName: 'li', className: 'rwmb-file', - template: wp.template( 'rwmb-media-item' ), + template: rwmb.template( ` + +
+ <# if ( data.sizes ) { #> + <# if ( data.sizes.thumbnail ) { #> + + <# } else { #> + + <# } #> + <# } else { #> + <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #> + + <# } else { #> + + <# } #> + <# } #> +
+
+ + <# if( data.title ) { #> + {{{ data.title }}} + <# } else { #> + {{{ i18nRwmbMedia.noTitle }}} + <# } #> + +
{{{ data.filename }}}
+ +
+ ` ), initialize: function ( options ) { this.controller = options.controller; this.collection = this.controller.get( 'items' ); @@ -587,4 +655,8 @@ rwmb.$document .on( 'mb_ready', init ) .on( 'clone', '.rwmb-file_advanced', initMediaField ); + + wp?.hooks?.addAction( 'mb_ready', 'meta-box/ready/media', ref => { + init( { target: ref } ); + } ); } )( jQuery, wp, _, rwmb, i18nRwmbMedia ); diff --git a/vendor/wpmetabox/meta-box/js/osm-frontend.js b/vendor/wpmetabox/meta-box/js/osm-frontend.js index c5b944aa8..97c78e28a 100644 --- a/vendor/wpmetabox/meta-box/js/osm-frontend.js +++ b/vendor/wpmetabox/meta-box/js/osm-frontend.js @@ -15,7 +15,7 @@ jQuery( function ( $ ) { mapOptions.center = center; - // Typcast zoom to a number + // Typecast zoom to a number mapOptions.zoom *= 1; mapOptions.gestureHandling = true; diff --git a/vendor/wpmetabox/meta-box/js/osm.js b/vendor/wpmetabox/meta-box/js/osm.js index 60a444ed3..19e45bf27 100644 --- a/vendor/wpmetabox/meta-box/js/osm.js +++ b/vendor/wpmetabox/meta-box/js/osm.js @@ -21,7 +21,7 @@ var map = this.map; setTimeout( function () { map.invalidateSize(); - }, 200 ); + }, 100 ); }, // Initialize DOM elements @@ -40,7 +40,7 @@ } this.marker = L.marker( location, { - draggable: true + draggable: this.$canvas.data( 'marker_draggable' ), } ).addTo( this.map ); }, diff --git a/vendor/wpmetabox/meta-box/js/select-advanced.js b/vendor/wpmetabox/meta-box/js/select-advanced.js index 2bb44fc96..3de87522a 100644 --- a/vendor/wpmetabox/meta-box/js/select-advanced.js +++ b/vendor/wpmetabox/meta-box/js/select-advanced.js @@ -60,7 +60,7 @@ delete params.data.page; } - // Create cache key from ajax params from only neccessary keys to make cache available for multiple fields. + // Create cache key from ajax params from only necessary keys to make cache available for multiple fields. var data = $.extend( true, {}, params.data ); delete data.field.id; delete data.action; diff --git a/vendor/wpmetabox/meta-box/js/video.js b/vendor/wpmetabox/meta-box/js/video.js index 998c4954d..0146e64d2 100644 --- a/vendor/wpmetabox/meta-box/js/video.js +++ b/vendor/wpmetabox/meta-box/js/video.js @@ -14,7 +14,41 @@ controller: this.controller, itemView: MediaItem.extend( { className: 'rwmb-video-item', - template : wp.template( 'rwmb-video-item' ), + template: rwmb.template( ` + + <# if( _.indexOf( i18nRwmbVideo.extensions, data.url.substr( data.url.lastIndexOf('.') + 1 ) ) > -1 ) { #> + + <# } else { #> + <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #> + + <# } else { #> + + <# } #> + <# } #> +
+ + <# if( data.title ) { #> + {{{ data.title }}} + <# } else { #> + {{{ i18nRwmbMedia.noTitle }}} + <# } #> + +
{{{ data.filename }}}
+ +
+ ` ), render: function() { var settings = ! _.isUndefined( window._wpmejsSettings ) ? _.clone( _wpmejsSettings ) : {}; @@ -40,4 +74,8 @@ rwmb.$document .on( 'mb_ready', init ) .on( 'clone', '.rwmb-video', initVideoField ); + + wp?.hooks?.addAction( 'mb_ready', 'meta-box/ready/video', ref => { + init( { target: ref } ); + } ); } )( jQuery, rwmb ); diff --git a/vendor/wpmetabox/meta-box/meta-box.php b/vendor/wpmetabox/meta-box/meta-box.php index 2445b4f7b..a513cc268 100644 --- a/vendor/wpmetabox/meta-box/meta-box.php +++ b/vendor/wpmetabox/meta-box/meta-box.php @@ -3,7 +3,7 @@ * Plugin Name: Meta Box * Plugin URI: https://metabox.io * Description: Create custom meta boxes and custom fields in WordPress. - * Version: 5.10.11 + * Version: 5.10.15 * Author: MetaBox.io * Author URI: https://metabox.io * License: GPL2+ diff --git a/vendor/wpmetabox/meta-box/readme.txt b/vendor/wpmetabox/meta-box/readme.txt index 37ce7293b..ffbf20fda 100644 --- a/vendor/wpmetabox/meta-box/readme.txt +++ b/vendor/wpmetabox/meta-box/readme.txt @@ -2,10 +2,10 @@ Contributors: elightup, metabox, rilwis, f-j-kaiser, funkatronic, PerWiklander, ruanmer, tanng Donate link: https://metabox.io/pricing/ Tags: custom fields, custom post types, post type, custom taxonomies, meta box -Requires at least: 5.9 +Requires at least: 6.5 Requires PHP: 7.1 -Tested up to: 6.8.1 -Stable tag: 5.10.11 +Tested up to: 6.8.2 +Stable tag: 5.10.15 License: GPLv2 or later Meta Box plugin is a powerful, professional developer toolkit to create custom meta boxes and custom fields for your custom post types in WordPress. @@ -147,6 +147,23 @@ If you want to use Meta Box, please follow these steps: == Changelog == += 5.10.15 - 2025-10-06 = + +Add `marker_draggable` option for `map`/`osm` fields to disable changing the pin on the map. + += 5.10.14 - 2025-09-15 = + +Update dependencies + += 5.10.13 - 2025-08-14 = + +Fix `get_current_screen()` error for term meta + += 5.10.12 - 2025-08-13 = + +- Fix Open Street Maps field not showing (sometimes) with conditional logic +- Enqueue assets for the iframed editor, to make all fields are rendered properly in the iframed editor + = 5.10.11 - 2025-07-15 = Fix validation for blocks diff --git a/vendor/wpmetabox/meta-box/src/Dashboard/content.php b/vendor/wpmetabox/meta-box/src/Dashboard/content.php index 5ea39403d..c26d96c93 100644 --- a/vendor/wpmetabox/meta-box/src/Dashboard/content.php +++ b/vendor/wpmetabox/meta-box/src/Dashboard/content.php @@ -416,7 +416,7 @@ class="mb-dashboard__tutorial__image lightbox mb-dashboard__tooltip" - + @@ -486,7 +486,7 @@ class="mb-dashboard__tutorial__image lightbox mb-dashboard__tooltip" - + @@ -663,7 +663,7 @@ class="mb-dashboard__tutorial__image lightbox mb-dashboard__tooltip"
diff --git a/vendor/wpmetabox/meta-box/vendor/composer/installed.json b/vendor/wpmetabox/meta-box/vendor/composer/installed.json index 23ee2ce0c..57cca65dd 100644 --- a/vendor/wpmetabox/meta-box/vendor/composer/installed.json +++ b/vendor/wpmetabox/meta-box/vendor/composer/installed.json @@ -7,15 +7,15 @@ "source": { "type": "git", "url": "https://github.com/wpmetabox/support.git", - "reference": "f03f775f4ac3eb99d954e8f06caff97706a78b51" + "reference": "6c392347cdb77ed133b8a4227b5ee20db89a5717" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wpmetabox/support/zipball/f03f775f4ac3eb99d954e8f06caff97706a78b51", - "reference": "f03f775f4ac3eb99d954e8f06caff97706a78b51", + "url": "https://api.github.com/repos/wpmetabox/support/zipball/6c392347cdb77ed133b8a4227b5ee20db89a5717", + "reference": "6c392347cdb77ed133b8a4227b5ee20db89a5717", "shasum": "" }, - "time": "2025-07-12T09:16:27+00:00", + "time": "2025-09-12T23:29:48+00:00", "default-branch": true, "type": "library", "installation-source": "dist", diff --git a/vendor/wpmetabox/meta-box/vendor/composer/installed.php b/vendor/wpmetabox/meta-box/vendor/composer/installed.php index e9f45bfec..f4717626d 100644 --- a/vendor/wpmetabox/meta-box/vendor/composer/installed.php +++ b/vendor/wpmetabox/meta-box/vendor/composer/installed.php @@ -1,9 +1,9 @@ array( 'name' => 'wpmetabox/meta-box', - 'pretty_version' => '5.10.11', - 'version' => '5.10.11.0', - 'reference' => '856eb0901e5f71d6d70d0f6bae001b2a904d63d0', + 'pretty_version' => '5.10.15', + 'version' => '5.10.15.0', + 'reference' => 'bd60262221a018e56016bc06cb525685644ec1d1', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -11,9 +11,9 @@ ), 'versions' => array( 'wpmetabox/meta-box' => array( - 'pretty_version' => '5.10.11', - 'version' => '5.10.11.0', - 'reference' => '856eb0901e5f71d6d70d0f6bae001b2a904d63d0', + 'pretty_version' => '5.10.15', + 'version' => '5.10.15.0', + 'reference' => 'bd60262221a018e56016bc06cb525685644ec1d1', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -22,7 +22,7 @@ 'wpmetabox/support' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'f03f775f4ac3eb99d954e8f06caff97706a78b51', + 'reference' => '6c392347cdb77ed133b8a4227b5ee20db89a5717', 'type' => 'library', 'install_path' => __DIR__ . '/../wpmetabox/support', 'aliases' => array( diff --git a/vendor/wpmetabox/meta-box/vendor/wpmetabox/support/Data.php b/vendor/wpmetabox/meta-box/vendor/wpmetabox/support/Data.php index 813be9a70..0cab42e94 100644 --- a/vendor/wpmetabox/meta-box/vendor/wpmetabox/support/Data.php +++ b/vendor/wpmetabox/meta-box/vendor/wpmetabox/support/Data.php @@ -3,7 +3,15 @@ class Data { public static function get_post_types(): array { - $unsupported = [ + $unsupported = self::unsupported_post_types(); + $post_types = get_post_types( [], 'objects' ); + $post_types = array_diff_key( $post_types, array_flip( $unsupported ) ); + + return $post_types; + } + + public static function unsupported_post_types(): array { + return [ // WordPress built-in post types. 'customize_changeset', 'custom_css', @@ -16,10 +24,7 @@ public static function get_post_types(): array { 'wp_template_part', 'wp_global_styles', 'wp_navigation', - 'wp_template', - 'wp_template_part', - 'wp_global_styles', - 'wp_font_famlity', + 'wp_font_family', 'wp_font_face', // Meta Box post types. @@ -36,10 +41,6 @@ public static function get_post_types(): array { 'elementor_icons', 'elementor_snippet', ]; - $post_types = get_post_types( [], 'objects' ); - $post_types = array_diff_key( $post_types, array_flip( $unsupported ) ); - - return $post_types; } public static function get_taxonomies(): array { diff --git a/wp-stateless-media.php b/wp-stateless-media.php index 7a39b0843..e13abb05b 100644 --- a/wp-stateless-media.php +++ b/wp-stateless-media.php @@ -4,7 +4,7 @@ * Plugin URI: https://stateless.udx.io/ * Description: Upload and serve your WordPress media files from Google Cloud Storage. * Author: UDX - * Version: 4.2.0 + * Version: 4.2.1 * Text Domain: stateless-media * Author URI: https://udx.io * License: GPLv2 or later