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.or }}}
+ +