From dc85447ee100ab72f858e01a1873350220529ae3 Mon Sep 17 00:00:00 2001 From: Artsiom Siamashka Date: Thu, 5 Mar 2026 15:38:17 +0100 Subject: [PATCH] Replaced plugin with local copy, removed unused plugins, updated dependencies --- .gitignore | 1 + composer.json | 32 ++- composer.lock | 197 ++++++++---------- .../disable-image-threshold.php | 9 + .../plugins/subscribe-to-lc/js/subscribe.js | 24 --- .../subscribe-to-lc/subscribe-to-lc.php | 63 ------ .../plugins/wp-rest-api-event/HttpClient.php | 80 ------- .../event/EventSubscriber.php | 159 -------------- .../wp-rest-api-event/wp-rest-api-event.php | 28 --- 9 files changed, 109 insertions(+), 484 deletions(-) create mode 100644 htdocs/wp-content/plugins/disable-image-threshold/disable-image-threshold.php delete mode 100644 htdocs/wp-content/plugins/subscribe-to-lc/js/subscribe.js delete mode 100644 htdocs/wp-content/plugins/subscribe-to-lc/subscribe-to-lc.php delete mode 100755 htdocs/wp-content/plugins/wp-rest-api-event/HttpClient.php delete mode 100755 htdocs/wp-content/plugins/wp-rest-api-event/event/EventSubscriber.php delete mode 100644 htdocs/wp-content/plugins/wp-rest-api-event/wp-rest-api-event.php diff --git a/.gitignore b/.gitignore index c505791..e74f42a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ htdocs/wp-content/mu-plugins/* htdocs/wp-content/plugins/* !htdocs/wp-content/plugins/index.php !htdocs/wp-content/plugins/faq +!htdocs/wp-content/plugins/disable-image-threshold htdocs/wp-content/themes/* !htdocs/wp-content/themes/lawcarta diff --git a/composer.json b/composer.json index ee49257..d36f905 100644 --- a/composer.json +++ b/composer.json @@ -2,25 +2,23 @@ "name": "lawcarta/wordpress", "description": "LawCarta WordPress Site", "require": { - "wpackagist-plugin/svg-support": "~2.5", - "wpackagist-plugin/toggle-wpautop": "~1.3", - "wpackagist-plugin/tinymce-advanced": "~5.9", - "wpackagist-plugin/contact-form-7": "~5.7", + "wpackagist-plugin/contact-form-7-mailchimp-extension": "~0.9", + "wpackagist-plugin/contact-form-7": "~6.1", + "wpackagist-plugin/duplicator": "~1.5", "wpackagist-plugin/flamingo": "~2.2", - "wpackagist-plugin/really-simple-captcha": "~2.0", - "wpackagist-plugin/enhanced-media-library": "~2.8", - "wpackagist-plugin/wp-rest-api-v2-menus": "~0.12", - "wpackagist-plugin/taxonomy-terms-order": "~1.7", - "wpackagist-plugin/wordpress-seo": "~20", - "wpackagist-plugin/post-types-order": "~2", - "wpackagist-plugin/post-smtp": "~2.4", - "wpackagist-plugin/meta-tag-manager": "~3", - "wpackagist-plugin/disable-big-image-threshold": "~1", - "wpackagist-plugin/wps-hide-login": "~1.9", - "humanmade/s3-uploads": "~2.3", - "wpackagist-plugin/google-sitemap-generator": "4.1.21", + "wpackagist-plugin/google-sitemap-generator": "~4.1", + "wpackagist-plugin/honeypot": "~2.3", "wpackagist-plugin/mailchimp-for-wp": "4.10.1", - "wpackagist-plugin/duplicator": "~1.5" + "wpackagist-plugin/meta-tag-manager": "~3.3", + "wpackagist-plugin/post-smtp": "~3.8", + "wpackagist-plugin/really-simple-captcha": "~2", + "wpackagist-plugin/svg-support": "~2.5", + "wpackagist-plugin/taxonomy-terms-order": "~1.7", + "wpackagist-plugin/tinymce-advanced": "~5.9", + "wpackagist-plugin/toggle-wpautop": "~1.3", + "wpackagist-plugin/wordpress-seo": "~27.1", + "wpackagist-plugin/wps-hide-login": "~1.9", + "humanmade/s3-uploads": "~3.0" }, "repositories": [ { diff --git a/composer.lock b/composer.lock index b29555b..063f92c 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": "f87ae7cb9b1e86428b259057af11a038", + "content-hash": "7757a6cea3935665988a9b67861c47bd", "packages": [ { "name": "aws/aws-crt-php", @@ -62,16 +62,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.371.4", + "version": "3.371.5", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "957f8a5ecc30670c95dfc37a9d04660899fc44e0" + "reference": "d40b962154a146901f71561519f9d9c5a3863a6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/957f8a5ecc30670c95dfc37a9d04660899fc44e0", - "reference": "957f8a5ecc30670c95dfc37a9d04660899fc44e0", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d40b962154a146901f71561519f9d9c5a3863a6e", + "reference": "d40b962154a146901f71561519f9d9c5a3863a6e", "shasum": "" }, "require": { @@ -153,45 +153,43 @@ "support": { "forum": "https://github.com/aws/aws-sdk-php/discussions", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.371.4" + "source": "https://github.com/aws/aws-sdk-php/tree/3.371.5" }, - "time": "2026-03-03T19:52:06+00:00" + "time": "2026-03-04T19:06:59+00:00" }, { "name": "composer/installers", - "version": "v1.12.0", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19" + "reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/d20a64ed3c94748397ff5973488761b22f6d3f19", - "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19", + "url": "https://api.github.com/repos/composer/installers/zipball/12fb2dfe5e16183de69e784a7b84046c43d97e8e", + "reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0 || ^2.0" - }, - "replace": { - "roundcube/plugin-installer": "*", - "shama/baton": "*" + "composer-plugin-api": "^1.0 || ^2.0", + "php": "^7.2 || ^8.0" }, "require-dev": { - "composer/composer": "1.6.* || ^2.0", - "composer/semver": "^1 || ^3", - "phpstan/phpstan": "^0.12.55", - "phpstan/phpstan-phpunit": "^0.12.16", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.3" + "composer/composer": "^1.10.27 || ^2.7", + "composer/semver": "^1.7.2 || ^3.4.0", + "phpstan/phpstan": "^1.11", + "phpstan/phpstan-phpunit": "^1", + "symfony/phpunit-bridge": "^7.1.1", + "symfony/process": "^5 || ^6 || ^7" }, "type": "composer-plugin", "extra": { "class": "Composer\\Installers\\Plugin", "branch-alias": { - "dev-main": "1.x-dev" - } + "dev-main": "2.x-dev" + }, + "plugin-modifies-install-path": true }, "autoload": { "psr-4": { @@ -212,7 +210,6 @@ "description": "A multi-framework Composer library installer", "homepage": "https://composer.github.io/installers/", "keywords": [ - "Craft", "Dolibarr", "Eliasis", "Hurad", @@ -233,7 +230,6 @@ "Whmcs", "WolfCMS", "agl", - "aimeos", "annotatecms", "attogram", "bitrix", @@ -242,6 +238,7 @@ "cockpit", "codeigniter", "concrete5", + "concreteCMS", "croogo", "dokuwiki", "drupal", @@ -252,7 +249,6 @@ "grav", "installer", "itop", - "joomla", "known", "kohana", "laravel", @@ -261,6 +257,7 @@ "magento", "majima", "mako", + "matomo", "mediawiki", "miaoxing", "modulework", @@ -280,9 +277,7 @@ "silverstripe", "sydes", "sylius", - "symfony", "tastyigniter", - "typo3", "wordpress", "yawik", "zend", @@ -290,7 +285,7 @@ ], "support": { "issues": "https://github.com/composer/installers/issues", - "source": "https://github.com/composer/installers/tree/v1.12.0" + "source": "https://github.com/composer/installers/tree/v2.3.0" }, "funding": [ { @@ -306,7 +301,7 @@ "type": "tidelift" } ], - "time": "2021-09-13T08:19:44+00:00" + "time": "2024-06-24T20:46:46+00:00" }, { "name": "guzzlehttp/guzzle", @@ -635,32 +630,44 @@ }, { "name": "humanmade/s3-uploads", - "version": "2.3.0", + "version": "3.0.13", "source": { "type": "git", "url": "https://github.com/humanmade/S3-Uploads.git", - "reference": "3b995ba6d1ccde4354efb9564c3e244f871bbcda" + "reference": "c09bd3057747b181eeb9c22e380da9d904ba260a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/humanmade/S3-Uploads/zipball/3b995ba6d1ccde4354efb9564c3e244f871bbcda", - "reference": "3b995ba6d1ccde4354efb9564c3e244f871bbcda", + "url": "https://api.github.com/repos/humanmade/S3-Uploads/zipball/c09bd3057747b181eeb9c22e380da9d904ba260a", + "reference": "c09bd3057747b181eeb9c22e380da9d904ba260a", "shasum": "" }, "require": { - "aws/aws-sdk-php": "~3.18", - "composer/installers": "~1.0" + "aws/aws-sdk-php": "^3.366", + "composer/installers": "~1.0 || ^2.0", + "php": ">=8.0" + }, + "require-dev": { + "humanmade/psalm-plugin-wordpress": "^3.1", + "pcov/clobber": "^2.0", + "phpunit/phpunit": "^9.6", + "vimeo/psalm": "^5.0", + "yoast/phpunit-polyfills": "^4.0" }, "type": "wordpress-plugin", + "autoload": { + "classmap": [ + "inc/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0+" ], "authors": [ { - "name": "Human Made Limited", - "email": "support@humanmade.co.uk", - "homepage": "http://hmn.md/" + "name": "Human Made", + "homepage": "https://humanmade.com/" } ], "description": "WordPress plugin to store uploads on S3", @@ -672,7 +679,7 @@ "issues": "https://github.com/humanmade/s3-uploads/issues", "source": "https://github.com/humanmade/s3-uploads" }, - "time": "2021-03-18T10:55:13+00:00" + "time": "2026-02-25T17:57:09+00:00" }, { "name": "mtdowling/jmespath.php", @@ -1251,15 +1258,15 @@ }, { "name": "wpackagist-plugin/contact-form-7", - "version": "5.9.8", + "version": "6.1.5", "source": { "type": "svn", "url": "https://plugins.svn.wordpress.org/contact-form-7/", - "reference": "tags/5.9.8" + "reference": "tags/6.1.5" }, "dist": { "type": "zip", - "url": "https://downloads.wordpress.org/plugin/contact-form-7.5.9.8.zip" + "url": "https://downloads.wordpress.org/plugin/contact-form-7.6.1.5.zip" }, "require": { "composer/installers": "^1.0 || ^2.0" @@ -1268,22 +1275,22 @@ "homepage": "https://wordpress.org/plugins/contact-form-7/" }, { - "name": "wpackagist-plugin/disable-big-image-threshold", - "version": "1.0", + "name": "wpackagist-plugin/contact-form-7-mailchimp-extension", + "version": "0.9.76", "source": { "type": "svn", - "url": "https://plugins.svn.wordpress.org/disable-big-image-threshold/", - "reference": "tags/1.0" + "url": "https://plugins.svn.wordpress.org/contact-form-7-mailchimp-extension/", + "reference": "tags/0.9.76" }, "dist": { "type": "zip", - "url": "https://downloads.wordpress.org/plugin/disable-big-image-threshold.1.0.zip" + "url": "https://downloads.wordpress.org/plugin/contact-form-7-mailchimp-extension.0.9.76.zip" }, "require": { "composer/installers": "^1.0 || ^2.0" }, "type": "wordpress-plugin", - "homepage": "https://wordpress.org/plugins/disable-big-image-threshold/" + "homepage": "https://wordpress.org/plugins/contact-form-7-mailchimp-extension/" }, { "name": "wpackagist-plugin/duplicator", @@ -1303,24 +1310,6 @@ "type": "wordpress-plugin", "homepage": "https://wordpress.org/plugins/duplicator/" }, - { - "name": "wpackagist-plugin/enhanced-media-library", - "version": "2.9.4", - "source": { - "type": "svn", - "url": "https://plugins.svn.wordpress.org/enhanced-media-library/", - "reference": "tags/2.9.4" - }, - "dist": { - "type": "zip", - "url": "https://downloads.wordpress.org/plugin/enhanced-media-library.2.9.4.zip" - }, - "require": { - "composer/installers": "^1.0 || ^2.0" - }, - "type": "wordpress-plugin", - "homepage": "https://wordpress.org/plugins/enhanced-media-library/" - }, { "name": "wpackagist-plugin/flamingo", "version": "2.6.1", @@ -1341,15 +1330,15 @@ }, { "name": "wpackagist-plugin/google-sitemap-generator", - "version": "4.1.21", + "version": "4.1.23", "source": { "type": "svn", "url": "https://plugins.svn.wordpress.org/google-sitemap-generator/", - "reference": "tags/4.1.21" + "reference": "tags/4.1.23" }, "dist": { "type": "zip", - "url": "https://downloads.wordpress.org/plugin/google-sitemap-generator.4.1.21.zip" + "url": "https://downloads.wordpress.org/plugin/google-sitemap-generator.4.1.23.zip" }, "require": { "composer/installers": "^1.0 || ^2.0" @@ -1357,6 +1346,24 @@ "type": "wordpress-plugin", "homepage": "https://wordpress.org/plugins/google-sitemap-generator/" }, + { + "name": "wpackagist-plugin/honeypot", + "version": "2.3.04", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/honeypot/", + "reference": "tags/2.3.04" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/honeypot.2.3.04.zip" + }, + "require": { + "composer/installers": "^1.0 || ^2.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/honeypot/" + }, { "name": "wpackagist-plugin/mailchimp-for-wp", "version": "4.10.1", @@ -1395,15 +1402,15 @@ }, { "name": "wpackagist-plugin/post-smtp", - "version": "2.9.14", + "version": "3.8.0", "source": { "type": "svn", "url": "https://plugins.svn.wordpress.org/post-smtp/", - "reference": "tags/2.9.14" + "reference": "tags/3.8.0" }, "dist": { "type": "zip", - "url": "https://downloads.wordpress.org/plugin/post-smtp.2.9.14.zip" + "url": "https://downloads.wordpress.org/plugin/post-smtp.3.8.0.zip" }, "require": { "composer/installers": "^1.0 || ^2.0" @@ -1411,24 +1418,6 @@ "type": "wordpress-plugin", "homepage": "https://wordpress.org/plugins/post-smtp/" }, - { - "name": "wpackagist-plugin/post-types-order", - "version": "2.4.3", - "source": { - "type": "svn", - "url": "https://plugins.svn.wordpress.org/post-types-order/", - "reference": "tags/2.4.3" - }, - "dist": { - "type": "zip", - "url": "https://downloads.wordpress.org/plugin/post-types-order.2.4.3.zip" - }, - "require": { - "composer/installers": "^1.0 || ^2.0" - }, - "type": "wordpress-plugin", - "homepage": "https://wordpress.org/plugins/post-types-order/" - }, { "name": "wpackagist-plugin/really-simple-captcha", "version": "2.4", @@ -1521,15 +1510,15 @@ }, { "name": "wpackagist-plugin/wordpress-seo", - "version": "20.13", + "version": "27.1.1", "source": { "type": "svn", "url": "https://plugins.svn.wordpress.org/wordpress-seo/", - "reference": "tags/20.13" + "reference": "tags/27.1.1" }, "dist": { "type": "zip", - "url": "https://downloads.wordpress.org/plugin/wordpress-seo.20.13.zip" + "url": "https://downloads.wordpress.org/plugin/wordpress-seo.27.1.1.zip" }, "require": { "composer/installers": "^1.0 || ^2.0" @@ -1537,24 +1526,6 @@ "type": "wordpress-plugin", "homepage": "https://wordpress.org/plugins/wordpress-seo/" }, - { - "name": "wpackagist-plugin/wp-rest-api-v2-menus", - "version": "0.12.1", - "source": { - "type": "svn", - "url": "https://plugins.svn.wordpress.org/wp-rest-api-v2-menus/", - "reference": "tags/0.12.1" - }, - "dist": { - "type": "zip", - "url": "https://downloads.wordpress.org/plugin/wp-rest-api-v2-menus.0.12.1.zip" - }, - "require": { - "composer/installers": "^1.0 || ^2.0" - }, - "type": "wordpress-plugin", - "homepage": "https://wordpress.org/plugins/wp-rest-api-v2-menus/" - }, { "name": "wpackagist-plugin/wps-hide-login", "version": "1.9.18", diff --git a/htdocs/wp-content/plugins/disable-image-threshold/disable-image-threshold.php b/htdocs/wp-content/plugins/disable-image-threshold/disable-image-threshold.php new file mode 100644 index 0000000..4b9b3bf --- /dev/null +++ b/htdocs/wp-content/plugins/disable-image-threshold/disable-image-threshold.php @@ -0,0 +1,9 @@ +Almost finished...

We need to confirm your email address.

To complete the subscription process, please click the link in the email we just sent you." - customAlert(msg); - } - form[0].reset() - }, - error: function (jqXHR) { - console.log(jqXHR) - } - }); - return false; - }) -}); diff --git a/htdocs/wp-content/plugins/subscribe-to-lc/subscribe-to-lc.php b/htdocs/wp-content/plugins/subscribe-to-lc/subscribe-to-lc.php deleted file mode 100644 index 078bc37..0000000 --- a/htdocs/wp-content/plugins/subscribe-to-lc/subscribe-to-lc.php +++ /dev/null @@ -1,63 +0,0 @@ - 'subscribetolc_widget', - ] - ); - } - - public function widget($args, $instance) - { - extract($args); - if (empty($code)) { - return; - } - - wp_enqueue_script('subscribe-to-lc-js', plugin_dir_url(__FILE__).'js/subscribe.js'); - - ?> - -
-
-
- - - - -
-
-
- - $eventType, - ]; - - return $this->doPostRequest(LAWCARTA_WP_REST_API_EVENT_LOG_URL, $data); - } - - /** - * @param $data - * @return null|string - */ - public function sendRequest($data) - { - return $this->doPostRequest(LAWCARTA_WP_REST_API_REQUEST_URL, $data); - } - - /** - * @param $sysLogId - * @param $data - * @return string|\WP_Error - */ - public function sendResponse($sysLogId, $data) - { - $data['sysLogId'] = $sysLogId; - return $this->doPostRequest(LAWCARTA_WP_REST_API_RESPONSE_URL, $data); - } - - /** - * @param $url - * @param $data - * @return string|\WP_Error - */ - private function doPostRequest($url, $data) - { - $response = wp_remote_post($url, [ - 'headers' => [ - 'Content-Type' => 'application/json', - ], - 'body' => json_encode($data), - 'sslverify' => false - - ]); - $sysLogId = null; - /** @var \WP_HTTP_Requests_Response $httpResponse */ - if(!empty($response['http_response'])){ - $httpResponse = $response['http_response']; - if ($httpResponse->get_status() == 200) { - $body = isset($response['body']) ? json_decode($response['body'], true) : null; - $sysLogId = $body['sysLogId'] ?? null; - } - } - - return $sysLogId; - } - - /** - * @return HttpClient - */ - public static function create() - { - return new self(); - } -} \ No newline at end of file diff --git a/htdocs/wp-content/plugins/wp-rest-api-event/event/EventSubscriber.php b/htdocs/wp-content/plugins/wp-rest-api-event/event/EventSubscriber.php deleted file mode 100755 index 99c1667..0000000 --- a/htdocs/wp-content/plugins/wp-rest-api-event/event/EventSubscriber.php +++ /dev/null @@ -1,159 +0,0 @@ -sendRequest(self::getSuperGlobals()); - } - - public static function onResponse(array $response, array $r, $url) - { - // todo: add response handler - } - - public static function onParseRequest() - { - // todo: add request data from wp - } - - public static function onShutdown() - { - $client = HttpClient::create(); - $client->sendResponse(self::$parentSysLogId, array_merge(self::getSuperGlobals(), [ - 'headers_list' => headers_list(), - 'response_code' => http_response_code() - ])); - } - - public static function onDemoRequest() - { - $client = HttpClient::create(); - $client->logEvent('demo-request', self::getSuperGlobals()); - } - - public static function setGlobals() - { - self::$get = $_GET; - self::$post = $_POST; - self::$cookie = $_COOKIE; - self::$session = $_SESSION; - self::$env = $_ENV; - self::$request = $_REQUEST; - self::$server = $_SERVER; - self::$userIp = self::getTheUserIp(); - self::$sessionId = $_COOKIE['PHPSESSID'] ?? null; - - - if (function_exists('getallheaders')) { - self::$headers = getallheaders(); - } elseif (function_exists('http_get_request_headers')) { - self::$headers = http_get_request_headers(); - } - } - - /** - * @return array - */ - private static function getSuperGlobals() - { - return [ - 'request' => self::$request, - 'server' => self::$server, - 'get' => self::$get, - 'post' => self::$post, - 'cookie' => self::$cookie, - 'env' => self::$env, - 'headers' => self::$headers, - 'user_ip' => self::$userIp, - 'session_id' => self::$sessionId, - ]; - } - - private static function getTheUserIp() - { - if ( ! empty($_SERVER['HTTP_CLIENT_IP'])) { - $ip = $_SERVER['HTTP_CLIENT_IP']; - } elseif ( ! empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { - $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; - } else { - $ip = $_SERVER['REMOTE_ADDR']; - } - - return $ip; - } -} \ No newline at end of file diff --git a/htdocs/wp-content/plugins/wp-rest-api-event/wp-rest-api-event.php b/htdocs/wp-content/plugins/wp-rest-api-event/wp-rest-api-event.php deleted file mode 100644 index b762798..0000000 --- a/htdocs/wp-content/plugins/wp-rest-api-event/wp-rest-api-event.php +++ /dev/null @@ -1,28 +0,0 @@ -