diff --git a/changelog.txt b/changelog.txt index 749a23433..7f689b913 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ * COMPATIBILITY - Gravity Forms Compatibility replaced with [WP-Stateless – Gravity Forms Addon](https://wordpress.org/plugins/wp-stateless-gravity-forms-addon/). * COMPATIBILITY - Gravity Forms Signature Compatibility replaced with [WP-Stateless – Gravity Forms Signature Addon](https://wordpress.org/plugins/wp-stateless-gravity-forms-signature-addon/). * COMPATIBILITY - Divi Theme Compatibility replaced with [WP-Stateless – Divi Theme Addon](https://wordpress.org/plugins/wp-stateless-divi-theme-addon/). +* COMPATIBILITY - SiteOrigin CSS Compatibility replaced with [WP-Stateless – SiteOrigin CSS Addon](https://wordpress.org/plugins/wp-stateless-siteorigin-css-addon/). * ENHANCEMENT - CLI command `wp stateless migrate` supports `auto` parameter to run all required Data Optimizations automatically. * ENHANCEMENT - Updated Client library for Google APIs from 2.15.1 to 2.17.0. * ENHANCEMENT - updated `firebase/php-jwt` library from from 6.9.0 to 6.10.1. @@ -19,6 +20,8 @@ * FIX - CLI command `wp stateless migrate` correctly works with `--progress` parameter in multisite. * FIX - fixed synchronization for Compatibility files in Stateless Mode. * FIX - CLI command `wp stateless upgrade` fixed when running with `--b` switch. +* FIX - fixed SiteOrigin Widgets Bundle Compatibility in `Stateless` mode. +* FIX - fixed WPForms Compatibility in `Stateless` mode. * FIX - limit index size for compatibility with different DB engines [757](https://github.com/udx/wp-stateless/issues/757). * FIX - correctly disable `Cache-Busting` setting for Ephemeral Mode [758](https://github.com/udx/wp-stateless/issues/758), credits [@Jessedev1](https://github.com/Jessedev1). * FIX - Data Optimization UI adjustments. diff --git a/changes.md b/changes.md index cac1c144e..5f0b34c59 100644 --- a/changes.md +++ b/changes.md @@ -4,6 +4,7 @@ * COMPATIBILITY - Gravity Forms Compatibility replaced with [WP-Stateless – Gravity Forms Addon](https://wordpress.org/plugins/wp-stateless-gravity-forms-addon/). * COMPATIBILITY - Gravity Forms Signature Compatibility replaced with [WP-Stateless – Gravity Forms Signature Addon](https://wordpress.org/plugins/wp-stateless-gravity-forms-signature-addon/). * COMPATIBILITY - Divi Theme Compatibility replaced with [WP-Stateless – Divi Theme Addon](https://wordpress.org/plugins/wp-stateless-divi-theme-addon/). +* COMPATIBILITY - SiteOrigin CSS Compatibility replaced with [WP-Stateless – SiteOrigin CSS Addon](https://wordpress.org/plugins/wp-stateless-siteorigin-css-addon/). * ENHANCEMENT - CLI command `wp stateless migrate` supports `auto` parameter to run all required Data Optimizations automatically. * ENHANCEMENT - Updated Client library for Google APIs from 2.15.1 to 2.17.0. * ENHANCEMENT - updated `firebase/php-jwt` library from from 6.9.0 to 6.10.1. @@ -18,6 +19,8 @@ * FIX - CLI command `wp stateless migrate` correctly works with `--progress` parameter in multisite. * FIX - fixed synchronization for Compatibility files in Stateless Mode. * FIX - CLI command `wp stateless upgrade` fixed when running with `--b` switch. +* FIX - fixed SiteOrigin Widgets Bundle Compatibility in `Stateless` mode. +* FIX - fixed WPForms Compatibility in `Stateless` mode. * FIX - limit index size for compatibility with different DB engines [757](https://github.com/udx/wp-stateless/issues/757). * FIX - correctly disable `Cache-Busting` setting for Ephemeral Mode [758](https://github.com/udx/wp-stateless/issues/758), credits [@Jessedev1](https://github.com/Jessedev1). * FIX - Data Optimization UI adjustments. diff --git a/composer.lock b/composer.lock index 8b9aee833..72c191228 100644 --- a/composer.lock +++ b/composer.lock @@ -264,15 +264,15 @@ }, { "name": "udx/lib-ud-api-client", - "version": "1.2.4", + "version": "1.2.1", "source": { "type": "git", "url": "git@github.com:udx/lib-ud-api-client", - "reference": "1.2.4" + "reference": "1.2.1" }, "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.1.zip" }, "require": { "php": ">=5.3" @@ -305,20 +305,80 @@ "wordpress" ] }, + { + "name": "udx/lib-utility", + "version": "0.4.0", + "source": { + "type": "git", + "url": "git@github.com:udx/lib-utility", + "reference": "0.4.0" + }, + "dist": { + "type": "zip", + "url": "https://github.com/udx/lib-utility/archive/0.4.0.zip" + }, + "require-dev": { + "phpunit/phpunit": "4.1.*" + }, + "type": "library", + "extra": { + "installer-name": "lib-utility", + "component": { + "name": "utility", + "scripts": [ + "scripts/*.js" + ] + } + }, + "autoload": { + "classmap": [ + "lib" + ] + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andy Potanin", + "email": "andy.potanin@usabilitydynamics.com", + "homepage": "https://www.usabilitydynamics.com", + "role": "Developer" + }, + { + "name": "Maxim Peshkov", + "email": "maxim.peshkov@usabilitydynamics.com", + "homepage": "https://www.usabilitydynamics.com", + "role": "Developer" + }, + { + "name": "Anton Korotkov", + "email": "anton.korotkov@usabilitydynamics.com", + "homepage": "https://www.usabilitydynamics.com", + "role": "Developer" + } + ], + "keywords": [ + "job", + "process", + "utility" + ] + }, { "name": "udx/lib-wp-bootstrap", - "version": "1.3.3", + "version": "1.3.0", "source": { "type": "git", "url": "git@github.com:udx/lib-wp-bootstrap", - "reference": "1.3.3" + "reference": "1.3.0" }, "dist": { "type": "zip", - "url": "https://github.com/udx/lib-wp-bootstrap/archive/1.3.3.zip" + "url": "https://github.com/udx/lib-wp-bootstrap/archive/1.3.0.zip" }, "require": { - "php": ">=5.3" + "php": ">=5.3", + "udx/lib-utility": "~0.3" }, "type": "library", "extra": { @@ -596,16 +656,16 @@ }, { "name": "league/mime-type-detection", - "version": "1.15.0", + "version": "1.16.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301" + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", - "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9", "shasum": "" }, "require": { @@ -636,7 +696,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.15.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.16.0" }, "funding": [ { @@ -648,7 +708,7 @@ "type": "tidelift" } ], - "time": "2024-01-28T23:22:08+00:00" + "time": "2024-09-21T08:32:55+00:00" }, { "name": "psr/container", @@ -705,16 +765,16 @@ }, { "name": "symfony/console", - "version": "v5.4.39", + "version": "v5.4.44", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f3e591c48688a0cfa1a3296205926c05e84b22b1" + "reference": "5b5a0aa66e3296e303e22490f90f521551835a83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f3e591c48688a0cfa1a3296205926c05e84b22b1", - "reference": "f3e591c48688a0cfa1a3296205926c05e84b22b1", + "url": "https://api.github.com/repos/symfony/console/zipball/5b5a0aa66e3296e303e22490f90f521551835a83", + "reference": "5b5a0aa66e3296e303e22490f90f521551835a83", "shasum": "" }, "require": { @@ -784,7 +844,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.39" + "source": "https://github.com/symfony/console/tree/v5.4.44" }, "funding": [ { @@ -800,7 +860,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T08:26:06+00:00" + "time": "2024-09-20T07:56:40+00:00" }, { "name": "symfony/deprecation-contracts", @@ -871,16 +931,16 @@ }, { "name": "symfony/finder", - "version": "v5.4.39", + "version": "v5.4.43", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "f6a96e4fcd468a25fede16ee665f50ced856bd0a" + "reference": "ae25a9145a900764158d439653d5630191155ca0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/f6a96e4fcd468a25fede16ee665f50ced856bd0a", - "reference": "f6a96e4fcd468a25fede16ee665f50ced856bd0a", + "url": "https://api.github.com/repos/symfony/finder/zipball/ae25a9145a900764158d439653d5630191155ca0", + "reference": "ae25a9145a900764158d439653d5630191155ca0", "shasum": "" }, "require": { @@ -914,7 +974,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.39" + "source": "https://github.com/symfony/finder/tree/v5.4.43" }, "funding": [ { @@ -930,24 +990,24 @@ "type": "tidelift" } ], - "time": "2024-04-18T08:26:06+00:00" + "time": "2024-08-13T14:03:51+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -993,7 +1053,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -1009,24 +1069,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -1071,7 +1131,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -1087,24 +1147,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -1152,7 +1212,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -1168,24 +1228,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -1232,7 +1292,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -1248,24 +1308,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -1308,7 +1368,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" }, "funding": [ { @@ -1324,24 +1384,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -1388,7 +1448,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -1404,7 +1464,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/service-contracts", diff --git a/lib/classes/class-module.php b/lib/classes/class-module.php index 3fc6ad565..d7d67c7c5 100644 --- a/lib/classes/class-module.php +++ b/lib/classes/class-module.php @@ -70,11 +70,6 @@ public function __construct() { */ new SimpleLocalAvatars(); - /** - * Support for SiteOrigin CSS - */ - new SOCSS(); - /** * Support for SiteOrigin Widgets Bundle */ diff --git a/lib/classes/compatibility/siteorigin-css.php b/lib/classes/compatibility/siteorigin-css.php deleted file mode 100644 index 8076ee474..000000000 --- a/lib/classes/compatibility/siteorigin-css.php +++ /dev/null @@ -1,236 +0,0 @@ -plugin_version = defined('SOCSS_VERSION') ? SOCSS_VERSION : ''; - - add_filter('siteorigin_custom_css_file', array($this, 'get_custom_css_file'), 20, 1); - add_filter('set_url_scheme', array($this, 'set_url_scheme'), 20, 3); - add_action('admin_menu', array($this, 'action_admin_menu'), 3); - add_filter('sm:sync::syncArgs', array($this, 'sync_args'), 10, 4); - add_filter('sm:sync::nonMediaFiles', array($this, 'get_sync_files'), 20); - } - - /** - * Get the position of 'so-css/' dir in the filename. - * - * @param $name - * @return bool - */ - protected function get_so_css($name) { - return strpos($name, self::STORAGE_PATH); - } - - /** - * Change Upload BaseURL when CDN Used. - */ - public function action_admin_menu() { - if ( current_user_can('edit_theme_options') && isset($_POST['siteorigin_custom_css_save']) ) { - try { - $prefix = apply_filters('wp_stateless_file_name', 'so-css', 0); - do_action('sm:sync::deleteFiles', $prefix); - } catch (Exception $e) { - } - } - } - - /** - * Change Upload BaseURL when CDN Used. - * @param $url - * @param $scheme - * @param $orig_scheme - * @return string - */ - public function set_url_scheme($url, $scheme, $orig_scheme) { - $position = $this->get_so_css($url); - - if ( $position !== false ) { - $name = substr($url, $position); - - $upload_data = wp_upload_dir(); - // We need to get the absolute path before adding the bucket dir to name. - $absolutePath = ud_get_stateless_media()->is_mode('stateless') - ? ud_get_stateless_media()->get_gs_path() - : $upload_data['basedir']; - - $absolutePath .= '/' . $name; - - $name = apply_filters('wp_stateless_file_name', $name, 0); - - do_action('sm:sync::syncFile', $name, $absolutePath); - - $url = ud_get_stateless_media()->get_gs_host() . '/' . $name; - } - return $url; - } - - /** - * Get custom CSS params. - * 'siteorigin_custom_css_file' hook doesn't pass the $theme and $post_id, so we need to get them from the backtrace. - */ - protected function get_custom_css_params() { - $theme = null; - $post_id = null; - - $functions = [ - 'get_custom_css', - 'save_custom_css_file', - 'enqueue_custom_css', - ]; - - $backtrace = debug_backtrace(); - - foreach ( $backtrace as $trace ) { - if ( !isset( $trace['function'] ) || !isset( $trace['class'] ) - || $trace['class'] !== 'SiteOrigin_CSS' || !in_array( $trace['function'], $functions ) ) { - continue; - } - - $args = $trace['args'] ?? []; - - switch( $trace['function'] ) { - case 'save_custom_css_file': - $theme = $args[1] ?? null; - $post_id = $args[2] ?? null; - break; - default: - $theme = $args[0] ?? null; - $post_id = $args[1] ?? null; - } - } - - return [$theme, $post_id]; - } - - /** - * Get custom CSS file name. Create a file if it doesn't exist to make it accessible. - * - * @param string $custom_css_file - * @return array - */ - public function get_custom_css_file($custom_css_file) { - if ( !ud_get_stateless_media()->is_mode('stateless') ) { - return $custom_css_file; - } - - if ( class_exists('\SiteOrigin_CSS') ) { - $so_css = \SiteOrigin_CSS::single(); - - if ( $so_css && WP_Filesystem() ) { - global $wp_filesystem; - - list($theme, $post_id) = $this->get_custom_css_params(); - - $filename = $so_css->get_css_file_name( $theme, $post_id ); - - $position = $this->get_so_css($filename); - - if ( $position === false ) { - return $custom_css_file; - } - - $name = substr($filename, $position); - - $custom_css_file['file'] = ud_get_stateless_media()->get_gs_path() . '/' . $name; - $custom_css_file['url'] = ud_get_stateless_media()->get_gs_host() . '/' . $name; - - if ( !$wp_filesystem->exists($custom_css_file['file']) ) { - $wp_filesystem->put_contents( $custom_css_file['file'], ' ' ); - } - } - } - - return $custom_css_file; - } - - /** - * Update args when uploading/syncing file to GCS. - * - * @param array $args - * @param string $name - * @param string $file - * @param bool $force - * - * @return array - */ - public function sync_args($args, $name, $file, $force) { - if ( $this->get_so_css($name) !== 0 ) { - return $args; - } - - if ( ud_get_stateless_media()->is_mode('stateless') ) { - $args['name_with_root'] = false; - } - - $args['source'] = 'SiteOrigin CSS'; - $args['source_version'] = defined('SOCSS_VERSION') ? SOCSS_VERSION : ''; - - return $args; - } - - /** - * Get the list of files to sync. - * - * @param array $file_list - * @return array - */ - public function get_sync_files($file_list) { - if ( !method_exists('\wpCloud\StatelessMedia\Utility', 'get_files') ) { - Helper::log('WP-Stateless version too old, please update.'); - - return $file_list; - } - - $dir = apply_filters('wp_stateless_addon_sync_files_path', '', self::STORAGE_PATH); - - if (is_dir($dir)) { - // Getting all the files from dir recursively. - $files = Utility::get_files($dir); - - // validating and adding to the $files array. - foreach ($files as $file) { - if (!file_exists($file)) { - continue; - } - - $file = self::STORAGE_PATH . str_replace( $dir, '', wp_normalize_path($file) ); - $file = trim($file, '/'); - - if ( !in_array($file, $file_list) ) { - $file_list[] = $file; - } - } - } - - return $file_list; - } - - } - } -} diff --git a/readme.md b/readme.md index beffe0b8f..4091094f1 100644 --- a/readme.md +++ b/readme.md @@ -39,6 +39,7 @@ New to Google Cloud? Google is offering you a [$300 credit](https://console.clou * [Gravity Forms Signature Addon](https://wordpress.org/plugins/wp-stateless-gravity-forms-signature-addon/) * [WooCommerce Addon](https://wordpress.org/plugins/wp-stateless-woocommerce-addon/) * [Divi Theme Addon](https://wordpress.org/plugins/wp-stateless-divi-theme-addon/) +* [SiteOrigin CSS Addon](https://wordpress.org/plugins/wp-stateless-siteorigin-css-addon/) * [BuddyBoss Platform Addon](https://wordpress.org/plugins/wp-stateless-buddyboss-platform-addon/) ### Support, Feedback, & Contribute diff --git a/readme.txt b/readme.txt index 11cc9ebac..79169b667 100644 --- a/readme.txt +++ b/readme.txt @@ -49,6 +49,7 @@ New to Google Cloud? Google is offering you a [$300 credit](https://console.clou * [Gravity Forms Signature Addon](https://wordpress.org/plugins/wp-stateless-gravity-forms-signature-addon/) * [WooCommerce Addon](https://wordpress.org/plugins/wp-stateless-woocommerce-addon/) * [Divi Theme Addon](https://wordpress.org/plugins/wp-stateless-divi-theme-addon/) +* [SiteOrigin CSS Addon](https://wordpress.org/plugins/wp-stateless-siteorigin-css-addon/) * [BuddyBoss Platform Addon](https://wordpress.org/plugins/wp-stateless-buddyboss-platform-addon/) = Support, Feedback, & Contribute = @@ -134,6 +135,7 @@ Before upgrading to WP-Stateless 3.0, please, make sure you tested it on your de * COMPATIBILITY - Gravity Forms Compatibility replaced with [WP-Stateless – Gravity Forms Addon](https://wordpress.org/plugins/wp-stateless-gravity-forms-addon/). * COMPATIBILITY - Gravity Forms Signature Compatibility replaced with [WP-Stateless – Gravity Forms Signature Addon](https://wordpress.org/plugins/wp-stateless-gravity-forms-signature-addon/). * COMPATIBILITY - Divi Theme Compatibility replaced with [WP-Stateless – Divi Theme Addon](https://wordpress.org/plugins/wp-stateless-divi-theme-addon/). +* COMPATIBILITY - SiteOrigin CSS Compatibility replaced with [WP-Stateless – SiteOrigin CSS Addon](https://wordpress.org/plugins/wp-stateless-siteorigin-css-addon/). * ENHANCEMENT - CLI command `wp stateless migrate` supports `auto` parameter to run all required Data Optimizations automatically. * ENHANCEMENT - Updated Client library for Google APIs from 2.15.1 to 2.17.0. * ENHANCEMENT - updated `firebase/php-jwt` library from from 6.9.0 to 6.10.1. @@ -148,6 +150,8 @@ Before upgrading to WP-Stateless 3.0, please, make sure you tested it on your de * FIX - CLI command `wp stateless migrate` correctly works with `--progress` parameter in multisite. * FIX - fixed synchronization for Compatibility files in Stateless Mode. * FIX - CLI command `wp stateless upgrade` fixed when running with `--b` switch. +* FIX - fixed SiteOrigin Widgets Bundle Compatibility in `Stateless` mode. +* FIX - fixed WPForms Compatibility in `Stateless` mode. * FIX - limit index size for compatibility with different DB engines [757](https://github.com/udx/wp-stateless/issues/757). * FIX - correctly disable `Cache-Busting` setting for Ephemeral Mode [758](https://github.com/udx/wp-stateless/issues/758), credits [@Jessedev1](https://github.com/Jessedev1). * FIX - Data Optimization UI adjustments. diff --git a/static/data/addons.php b/static/data/addons.php index 54c91b628..b7a9c98a5 100644 --- a/static/data/addons.php +++ b/static/data/addons.php @@ -87,4 +87,14 @@ // 'hubspot_link' => 'https://cta-service-cms2.hubspot.com/web-interactives/public/v1/track/click?encryptedPayload=AVxigLKBdXT3iKKssnyU5oSlJCOfudt7i6nV%2F5ojUf63FZt1MjnlQ%2BEP2JTU9DfhHfCCMUS9eZkfBezgAUKkinw0pOw0yKUWSYGw89SIF9OyVci07g94GTyYx0j17tt3LC7jZ34Nhe4GfQQHXvkad%2FNNTRoumwcNoV5csmLHPEnEwq7XWsYPSN73GTzxEwySOMWBk%2FTt%2BROYZDCM3Ks%3D&portalId=20504491', ], + 'siteorigin-css' => [ + 'title' => 'SiteOrigin CSS', + 'plugin_files' => ['so-css/so-css.php'], + 'addon_file' => 'wp-stateless-siteorigin-css-addon/wp-stateless-siteorigin-css-addon.php', + 'icon' => 'https://ps.w.org/so-css/assets/icon.svg', + 'repo' => 'udx/wp-stateless-siteorigin-css-addon', + 'wp' => 'https://wordpress.org/plugins/wp-stateless-siteorigin-css-addon/', + 'hubspot_id' => '151480507684', + ], + ]; diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 46a03bf9c..940b775a2 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -57,7 +57,6 @@ 'wpCloud\\StatelessMedia\\Migrator' => $baseDir . '/lib/classes/class-migrator.php', 'wpCloud\\StatelessMedia\\Module' => $baseDir . '/lib/classes/class-module.php', 'wpCloud\\StatelessMedia\\Polylang' => $baseDir . '/lib/classes/compatibility/polylang-pro.php', - 'wpCloud\\StatelessMedia\\SOCSS' => $baseDir . '/lib/classes/compatibility/siteorigin-css.php', 'wpCloud\\StatelessMedia\\SOWidgetCSS' => $baseDir . '/lib/classes/compatibility/siteorigin-widget-bundle.php', 'wpCloud\\StatelessMedia\\Settings' => $baseDir . '/lib/classes/class-settings.php', 'wpCloud\\StatelessMedia\\ShortPixel' => $baseDir . '/lib/classes/compatibility/shortpixel.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 1625b1ef0..c8c37c4b8 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -98,7 +98,6 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb 'wpCloud\\StatelessMedia\\Migrator' => __DIR__ . '/../..' . '/lib/classes/class-migrator.php', 'wpCloud\\StatelessMedia\\Module' => __DIR__ . '/../..' . '/lib/classes/class-module.php', 'wpCloud\\StatelessMedia\\Polylang' => __DIR__ . '/../..' . '/lib/classes/compatibility/polylang-pro.php', - 'wpCloud\\StatelessMedia\\SOCSS' => __DIR__ . '/../..' . '/lib/classes/compatibility/siteorigin-css.php', 'wpCloud\\StatelessMedia\\SOWidgetCSS' => __DIR__ . '/../..' . '/lib/classes/compatibility/siteorigin-widget-bundle.php', 'wpCloud\\StatelessMedia\\Settings' => __DIR__ . '/../..' . '/lib/classes/class-settings.php', 'wpCloud\\StatelessMedia\\ShortPixel' => __DIR__ . '/../..' . '/lib/classes/compatibility/shortpixel.php', diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 2a8f027aa..9ef6e03d4 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' => 'd5c85f0a678126bb93d49d18eb6d4bfae8cd189e', + 'reference' => '519a091ec9ed8904a3106fc6c5c8bf4faf58564b', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -58,7 +58,7 @@ 'wpcloud/wp-stateless' => array( 'pretty_version' => 'dev-latest', 'version' => 'dev-latest', - 'reference' => 'd5c85f0a678126bb93d49d18eb6d4bfae8cd189e', + 'reference' => '519a091ec9ed8904a3106fc6c5c8bf4faf58564b', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(),