File manager - Edit - /home/monara/public_html/test.athavaneng.com/wordpress.tar
Back
composer.lock 0000644 00000221300 15073230246 0007245 0 ustar 00 { "_readme": [ "This file locks the dependencies of your project to a known state", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], "content-hash": "bfa78242b206b0728143222b5d4f7cec", "packages": [ { "name": "psr/http-message", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", "homepage": "https://github.com/php-fig/http-message", "keywords": [ "http", "http-message", "psr", "psr-7", "request", "response" ], "support": { "source": "https://github.com/php-fig/http-message/tree/master" }, "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/simple-cache", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "Psr\\SimpleCache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "http://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", "keywords": [ "cache", "caching", "psr", "psr-16", "simple-cache" ], "support": { "source": "https://github.com/php-fig/simple-cache/tree/master" }, "time": "2017-10-23T01:57:42+00:00" } ], "packages-dev": [ { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v0.7.2", "source": { "type": "git", "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", "shasum": "" }, "require": { "composer-plugin-api": "^1.0 || ^2.0", "php": ">=5.3", "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { "composer/composer": "*", "php-parallel-lint/php-parallel-lint": "^1.3.1", "phpcompatibility/php-compatibility": "^9.0" }, "type": "composer-plugin", "extra": { "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, "autoload": { "psr-4": { "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Franck Nijhof", "email": "franck.nijhof@dealerdirect.com", "homepage": "http://www.frenck.nl", "role": "Developer / IT Manager" }, { "name": "Contributors", "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", "homepage": "http://www.dealerdirect.com", "keywords": [ "PHPCodeSniffer", "PHP_CodeSniffer", "code quality", "codesniffer", "composer", "installer", "phpcbf", "phpcs", "plugin", "qa", "quality", "standard", "standards", "style guide", "stylecheck", "tests" ], "support": { "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" }, "time": "2022-02-04T12:51:07+00:00" }, { "name": "doctrine/instantiator", "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", "phpbench/phpbench": "^0.16 || ^1", "phpstan/phpstan": "^1.4", "phpstan/phpstan-phpunit": "^1", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", "vimeo/psalm": "^4.22" }, "type": "library", "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", "source": "https://github.com/doctrine/instantiator/tree/1.4.1" }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", "type": "custom" }, { "url": "https://www.patreon.com/phpdoctrine", "type": "patreon" }, { "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", "type": "tidelift" } ], "time": "2022-03-03T08:28:38+00:00" }, { "name": "filp/whoops", "version": "2.14.6", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", "reference": "f7948baaa0330277c729714910336383286305da" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/filp/whoops/zipball/f7948baaa0330277c729714910336383286305da", "reference": "f7948baaa0330277c729714910336383286305da", "shasum": "" }, "require": { "php": "^5.5.9 || ^7.0 || ^8.0", "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "require-dev": { "mockery/mockery": "^0.9 || ^1.0", "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" }, "suggest": { "symfony/var-dumper": "Pretty print complex values better with var-dumper available", "whoops/soap": "Formats errors as SOAP responses" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.7-dev" } }, "autoload": { "psr-4": { "Whoops\\": "src/Whoops/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Filipe Dobreira", "homepage": "https://github.com/filp", "role": "Developer" } ], "description": "php error handling for cool kids", "homepage": "https://filp.github.io/whoops/", "keywords": [ "error", "exception", "handling", "library", "throwable", "whoops" ], "support": { "issues": "https://github.com/filp/whoops/issues", "source": "https://github.com/filp/whoops/tree/2.14.6" }, "funding": [ { "url": "https://github.com/denis-sokolov", "type": "github" } ], "time": "2022-11-02T16:23:29+00:00" }, { "name": "myclabs/deep-copy", "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "conflict": { "doctrine/collections": "<1.6.8", "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { "files": [ "src/DeepCopy/deep_copy.php" ], "psr-4": { "DeepCopy\\": "src/DeepCopy/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Create deep copies (clones) of your objects", "keywords": [ "clone", "copy", "duplicate", "object", "object graph" ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, "funding": [ { "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", "type": "tidelift" } ], "time": "2022-03-03T13:19:32+00:00" }, { "name": "phar-io/manifest", "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Arne Blankerts", "email": "arne@blankerts.de", "role": "Developer" }, { "name": "Sebastian Heuer", "email": "sebastian@phpeople.de", "role": "Developer" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "Developer" } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Arne Blankerts", "email": "arne@blankerts.de", "role": "Developer" }, { "name": "Sebastian Heuer", "email": "sebastian@phpeople.de", "role": "Developer" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "Developer" } ], "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", "source": "https://github.com/phar-io/version/tree/3.2.1" }, "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpunit/php-code-coverage", "version": "7.0.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", "reference": "819f92bba8b001d4363065928088de22f25a3a48" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", "reference": "819f92bba8b001d4363065928088de22f25a3a48", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", "php": ">=7.2", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", "phpunit/php-token-stream": "^3.1.3 || ^4.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1.3" }, "require-dev": { "phpunit/phpunit": "^8.2.2" }, "suggest": { "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { "dev-master": "7.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", "homepage": "https://github.com/sebastianbergmann/php-code-coverage", "keywords": [ "coverage", "testing", "xunit" ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2021-07-26T12:20:09+00:00" }, { "name": "phpunit/php-file-iterator", "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", "shasum": "" }, "require": { "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "FilterIterator implementation that filters files based on a list of suffixes.", "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "keywords": [ "filesystem", "iterator" ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2021-12-02T12:42:26+00:00" }, { "name": "phpunit/php-text-template", "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Simple template engine.", "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ "template" ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" }, "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", "shasum": "" }, "require": { "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.1-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Utility class for timing", "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ "timer" ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2020-11-30T08:20:02+00:00" }, { "name": "phpunit/php-token-stream", "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "4.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Wrapper around PHP's tokenizer extension.", "homepage": "https://github.com/sebastianbergmann/php-token-stream/", "keywords": [ "tokenizer" ], "support": { "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "abandoned": true, "time": "2020-08-04T08:28:15+00:00" }, { "name": "phpunit/phpunit", "version": "8.5.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", "reference": "33c126b09a42de5c99e5e8032b54e8221264a74e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/33c126b09a42de5c99e5e8032b54e8221264a74e", "reference": "33c126b09a42de5c99e5e8032b54e8221264a74e", "shasum": "" }, "require": { "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.10.0", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.2", "phpunit/php-code-coverage": "^7.0.12", "phpunit/php-file-iterator": "^2.0.4", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.1.2", "sebastian/comparator": "^3.0.5", "sebastian/diff": "^3.0.2", "sebastian/environment": "^4.2.3", "sebastian/exporter": "^3.1.5", "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0.1", "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" ], "type": "library", "extra": { "branch-alias": { "dev-master": "8.5-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "The PHP Unit Testing framework.", "homepage": "https://phpunit.de/", "keywords": [ "phpunit", "testing", "xunit" ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.31" }, "funding": [ { "url": "https://phpunit.de/sponsors.html", "type": "custom" }, { "url": "https://github.com/sebastianbergmann", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", "type": "tidelift" } ], "time": "2022-10-28T05:57:37+00:00" }, { "name": "psr/log", "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", "homepage": "https://github.com/php-fig/log", "keywords": [ "log", "psr", "psr-3" ], "support": { "source": "https://github.com/php-fig/log/tree/1.1.4" }, "time": "2021-05-03T11:20:27+00:00" }, { "name": "roots/wordpress", "version": "6.1.1", "source": { "type": "git", "url": "https://github.com/roots/wordpress.git", "reference": "41ff6e23ccbc3a1691406d69fe8c211a225514e2" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/roots/wordpress/zipball/41ff6e23ccbc3a1691406d69fe8c211a225514e2", "reference": "41ff6e23ccbc3a1691406d69fe8c211a225514e2", "shasum": "" }, "require": { "roots/wordpress-core-installer": "^1.0.0", "roots/wordpress-no-content": "self.version" }, "type": "metapackage", "notification-url": "https://packagist.org/downloads/", "license": [ "MIT", "GPL-2.0-or-later" ], "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", "homepage": "https://wordpress.org/", "keywords": [ "blog", "cms", "wordpress" ], "support": { "issues": "https://github.com/roots/wordpress/issues", "source": "https://github.com/roots/wordpress/tree/6.1.1" }, "funding": [ { "url": "https://github.com/roots", "type": "github" }, { "url": "https://www.patreon.com/rootsdev", "type": "patreon" } ], "time": "2022-06-01T16:54:37+00:00" }, { "name": "roots/wordpress-core-installer", "version": "1.100.0", "source": { "type": "git", "url": "https://github.com/roots/wordpress-core-installer.git", "reference": "73f8488e5178c5d54234b919f823a9095e2b1847" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/roots/wordpress-core-installer/zipball/73f8488e5178c5d54234b919f823a9095e2b1847", "reference": "73f8488e5178c5d54234b919f823a9095e2b1847", "shasum": "" }, "require": { "composer-plugin-api": "^1.0 || ^2.0", "php": ">=5.6.0" }, "conflict": { "composer/installers": "<1.0.6" }, "replace": { "johnpbloch/wordpress-core-installer": "*" }, "require-dev": { "composer/composer": "^1.0 || ^2.0", "phpunit/phpunit": ">=5.7.27" }, "type": "composer-plugin", "extra": { "class": "Roots\\Composer\\WordPressCorePlugin" }, "autoload": { "psr-4": { "Roots\\Composer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "authors": [ { "name": "John P. Bloch", "email": "me@johnpbloch.com" }, { "name": "Roots", "email": "team@roots.io" } ], "description": "A custom installer to handle deploying WordPress with composer", "keywords": [ "wordpress" ], "support": { "issues": "https://github.com/roots/wordpress-core-installer/issues", "source": "https://github.com/roots/wordpress-core-installer/tree/master" }, "funding": [ { "url": "https://github.com/roots", "type": "github" }, { "url": "https://www.patreon.com/rootsdev", "type": "patreon" } ], "time": "2020-08-20T00:27:30+00:00" }, { "name": "roots/wordpress-no-content", "version": "6.1.1", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress.git", "reference": "6.1.1" }, "dist": { "type": "zip", "url": "https://downloads.wordpress.org/release/wordpress-6.1.1-no-content.zip", "shasum": "ad2d202747c5356e7b6246fbc339b46aebfa0665" }, "require": { "php": ">= 5.6.20" }, "provide": { "wordpress/core-implementation": "6.1.1" }, "suggest": { "ext-curl": "Performs remote request operations.", "ext-dom": "Used to validate Text Widget content and to automatically configuring IIS7+.", "ext-exif": "Works with metadata stored in images.", "ext-fileinfo": "Used to detect mimetype of file uploads.", "ext-hash": "Used for hashing, including passwords and update packages.", "ext-imagick": "Provides better image quality for media uploads.", "ext-json": "Used for communications with other servers.", "ext-libsodium": "Validates Signatures and provides securely random bytes.", "ext-mbstring": "Used to properly handle UTF8 text.", "ext-mysqli": "Connects to MySQL for database interactions.", "ext-openssl": "Permits SSL-based connections to other hosts.", "ext-pcre": "Increases performance of pattern matching in code searches.", "ext-xml": "Used for XML parsing, such as from a third-party site.", "ext-zip": "Used for decompressing Plugins, Themes, and WordPress update packages." }, "type": "wordpress-core", "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "authors": [ { "name": "WordPress Community", "homepage": "https://wordpress.org/about/" } ], "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", "homepage": "https://wordpress.org/", "keywords": [ "blog", "cms", "wordpress" ], "support": { "docs": "https://developer.wordpress.org/", "forum": "https://wordpress.org/support/", "irc": "irc://irc.freenode.net/wordpress", "issues": "https://core.trac.wordpress.org/", "rss": "https://wordpress.org/news/feed/", "source": "https://core.trac.wordpress.org/browser", "wiki": "https://codex.wordpress.org/" }, "funding": [ { "url": "https://wordpressfoundation.org/donate/", "type": "other" } ], "time": "2022-11-15T19:14:34+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", "shasum": "" }, "require": { "php": ">=5.6" }, "require-dev": { "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2020-11-30T08:15:22+00:00" }, { "name": "sebastian/comparator", "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { "php": ">=7.1", "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "name": "Volker Dusch", "email": "github@wallbash.com" }, { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" } ], "description": "Provides the functionality to compare PHP values for equality", "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2022-09-14T12:31:48+00:00" }, { "name": "sebastian/diff", "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", "shasum": "" }, "require": { "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.5 || ^8.0", "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { "name": "Kore Nordmann", "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff", "udiff", "unidiff", "unified diff" ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2020-11-30T07:59:04+00:00" }, { "name": "sebastian/environment", "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", "shasum": "" }, "require": { "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.5" }, "suggest": { "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { "dev-master": "4.2-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Provides functionality to handle HHVM/PHP environments", "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", "hhvm" ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2020-11-30T07:53:42+00:00" }, { "name": "sebastian/exporter", "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { "php": ">=7.0", "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.1.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "name": "Volker Dusch", "email": "github@wallbash.com" }, { "name": "Adam Harvey", "email": "aharvey@php.net" }, { "name": "Bernhard Schussek", "email": "bschussek@gmail.com" } ], "description": "Provides the functionality to export PHP variables for visualization", "homepage": "http://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2022-09-14T06:00:17+00:00" }, { "name": "sebastian/global-state", "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921", "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921", "shasum": "" }, "require": { "php": ">=7.2", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-dom": "*", "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Snapshotting of global state", "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2022-02-10T06:55:38+00:00" }, { "name": "sebastian/object-enumerator", "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", "shasum": "" }, "require": { "php": ">=7.0", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, "require-dev": { "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2020-11-30T07:40:27+00:00" }, { "name": "sebastian/object-reflector", "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.1-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2020-11-30T07:37:18+00:00" }, { "name": "sebastian/recursion-context", "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "name": "Adam Harvey", "email": "aharvey@php.net" } ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2020-11-30T07:34:24+00:00" }, { "name": "sebastian/resource-operations", "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", "shasum": "" }, "require": { "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { "issues": "https://github.com/sebastianbergmann/resource-operations/issues", "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2020-11-30T07:30:19+00:00" }, { "name": "sebastian/type", "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", "shasum": "" }, "require": { "php": ">=7.2" }, "require-dev": { "phpunit/phpunit": "^8.2" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.1-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], "time": "2020-11-30T07:25:11+00:00" }, { "name": "sebastian/version", "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { "php": ">=5.6" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", "source": "https://github.com/sebastianbergmann/version/tree/master" }, "time": "2016-10-03T07:35:21+00:00" }, { "name": "squizlabs/php_codesniffer", "version": "3.7.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", "php": ">=5.4.0" }, "require-dev": { "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ "bin/phpcs", "bin/phpcbf" ], "type": "library", "extra": { "branch-alias": { "dev-master": "3.x-dev" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Greg Sherwood", "role": "lead" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", "standards" ], "support": { "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, "time": "2022-06-18T07:21:10+00:00" }, { "name": "theseer/tokenizer", "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Arne Blankerts", "email": "arne@blankerts.de", "role": "Developer" } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, "funding": [ { "url": "https://github.com/theseer", "type": "github" } ], "time": "2021-07-28T10:34:58+00:00" }, { "name": "wp-coding-standards/wpcs", "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", "reference": "7da1894633f168fe244afc6de00d141f27517b62" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", "reference": "7da1894633f168fe244afc6de00d141f27517b62", "shasum": "" }, "require": { "php": ">=5.4", "squizlabs/php_codesniffer": "^3.3.1" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", "phpcompatibility/php-compatibility": "^9.0", "phpcsstandards/phpcsdevtools": "^1.0", "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." }, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Contributors", "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" } ], "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", "keywords": [ "phpcs", "standards", "wordpress" ], "support": { "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", "source": "https://github.com/WordPress/WordPress-Coding-Standards", "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" }, "time": "2020-05-13T23:57:56+00:00" } ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=7.0", "ext-mbstring": "*" }, "platform-dev": [], "plugin-api-version": "2.1.0" } src/Handler/Error.php 0000644 00000001630 15073230246 0010514 0 ustar 00 <?php namespace Averta\WordPress\Handler; class Error { /** * Mark something as being incorrectly called. * * The current behavior is to trigger a user error if `WP_DEBUG` is true. * * @param string $function The function that was called. * @param string $message A message explaining what has been done incorrectly. * @param string $version The version of WordPress where the message was added. */ public static function doingWrong( $function, $message, $version ) { _doing_it_wrong( $function, $message, $version ); } /** * Generates a user-level error/warning/notice message * * The current behavior is to trigger a user error if `WP_DEBUG` is true. * * @param string $message The designated error message for this error. */ public static function trigger( $message = '' ) { if ( WP_DEBUG ) { trigger_error( $message, E_USER_NOTICE ); } } } src/Event/HookInterface.php 0000644 00000001757 15073230246 0011662 0 ustar 00 <?php namespace Averta\WordPress\Event; interface HookInterface { /** * Adds a callback function to a hook. * * @param string $hook_name * @param callable $callback * @param int $priority * @param int $accepted_args * * @return mixed */ public function add( $hook_name, $callback, $priority = 10, $accepted_args = 1 ); /** * Removes a callback function from a hook. * * @param string $hook_name * @param callable $callback * @param int $priority * * @return mixed */ public function remove( $hook_name, $callback, $priority = 10 ); /** * Checks if any action has been registered for a hook. * * @param string $hook_name * @param callable|bool $callback * * @return mixed */ public function has( $hook_name, $callback = false ); /** * Retrieves the number of times an hook-event has been fired during the current request. * * @param string $hook_name * * @return mixed */ public function did( $hook_name ); } src/Event/Action.php 0000644 00000002745 15073230246 0010354 0 ustar 00 <?php namespace Averta\WordPress\Event; class Action implements HookInterface { /** * Adds a callback function to an action hook. * * @param string $hook_name * @param callable $callback * @param int $priority * @param int $accepted_args * * @return mixed */ public function add( $hook_name, $callback, $priority = 10, $accepted_args = 1 ){ return add_action( $hook_name, $callback, $priority, $accepted_args ); } /** * Removes a callback function from an action hook. * * @param string $hook_name * @param callable $callback * @param int $priority * * @return mixed */ public function remove( $hook_name, $callback, $priority = 10 ){ return remove_action( $hook_name, $callback, $priority ); } /** * Checks if any action has been registered for a hook. * * @param string $hook_name * @param callable|bool $callback * * @return mixed */ public function has( $hook_name, $callback = false ){ return has_action( $hook_name, $callback ); } /** * Retrieves the number of times an action has been fired during the current request. * * @param string $hook_name * * @return mixed */ public function did( $hook_name ){ return did_action( $hook_name ); } /** * Calls the callback functions that have been added to an action hook. * * @param string $hook_name * @param mixed $arg * * @return mixed */ public function do( $hook_name, ...$arg ){ return do_action( $hook_name, $arg ); } } src/Event/Filter.php 0000644 00000003334 15073230246 0010357 0 ustar 00 <?php namespace Averta\WordPress\Event; class Filter implements HookInterface { /** * Adds a callback function to a filter hook. * * @param string $hook_name * @param callable $callback * @param int $priority * @param int $accepted_args * * @return mixed */ public function add( $hook_name, $callback, $priority = 10, $accepted_args = 1 ){ return add_filter( $hook_name, $callback, $priority, $accepted_args ); } /** * Removes a callback function from a filter hook. * * @param string $hook_name * @param callable $callback * @param int $priority * * @return mixed */ public function remove( $hook_name, $callback, $priority = 10 ){ return remove_filter( $hook_name, $callback, $priority ); } /** * Checks if any filter has been registered for a hook. * * @param string $hook_name * @param callable|bool $callback * * @return mixed */ public function has( $hook_name, $callback = false ){ return has_filter( $hook_name, $callback ); } /** * Returns whether or not a filter hook is currently being processed. * * @param string $hook_name * * @return mixed */ public function did( $hook_name ){ return doing_filter( $hook_name ); } /** * Calls the callback functions that have been added to a filter hook. * * @param string $hook_name * @param $value * * @return mixed */ public function do( $hook_name, $value ){ return apply_filters( $hook_name, $value ); } /** * Calls the callback functions that have been added to a filter hook. * * @param string $hook_name * @param $value * * @return mixed */ public function apply( $hook_name, $value ){ return apply_filters( $hook_name, $value ); } } src/Utility/Cache.php 0000644 00000005023 15073230246 0010514 0 ustar 00 <?php namespace Averta\WordPress\Utility; class Cache{ public static function prevent(){ if ( ! defined( 'DONOTCACHEPAGE' ) ) { define( 'DONOTCACHEPAGE', true ); } if ( ! defined( 'DONOTCACHEDB' ) ) { define( 'DONOTCACHEDB', true ); } if ( ! defined( 'DONOTMINIFY' ) ) { define( 'DONOTMINIFY', true ); } if ( ! defined( 'DONOTCDN' ) ) { define( 'DONOTCDN', true ); } if ( ! defined( 'DONOTCACHCEOBJECT' ) ) { define( 'DONOTCACHCEOBJECT', true ); } // prevent caching. nocache_headers(); } /** * Get the value of a transient. * * If the transient does not exist, does not have a value, or has expired, * then the return value will be false. * * @param string $key Cache key. Expected to not be SQL-escaped. * * @return mixed Value of transient. */ public static function getDatabaseCache( $key ) { global $_wp_using_ext_object_cache; $current_using_cache = $_wp_using_ext_object_cache; $_wp_using_ext_object_cache = false; $result = get_transient( $key ); $_wp_using_ext_object_cache = $current_using_cache; return $result; } /** * Set/update the value of a transient. * * You do not need to serialize values. If the value needs to be serialized, then * it will be serialized before it is set. * * * @param string $key Cache key. Expected to not be SQL-escaped. Must be * 172 characters or fewer in length. * @param mixed $value Transient value. Must be serializable if non-scalar. * Expected to not be SQL-escaped. * @param int $expiration Optional. Time until expiration in seconds. Default 0 (no expiration). * * @return bool False if value was not set and true if value was set. */ public static function setDatabaseCache( $key, $value, $expiration = 0 ) { global $_wp_using_ext_object_cache; $current_using_cache = $_wp_using_ext_object_cache; $_wp_using_ext_object_cache = false; $result = set_transient( $key, $value, $expiration ); $_wp_using_ext_object_cache = $current_using_cache; return $result; } /** * Delete a transient. * * @param string $key Cache key. Expected to not be SQL-escaped. * * @return bool true if successful, false otherwise */ public static function deleteDatabaseCache( $key ) { global $_wp_using_ext_object_cache; $current_using_cache = $_wp_using_ext_object_cache; $_wp_using_ext_object_cache = false; $result = delete_transient( $key ); $_wp_using_ext_object_cache = $current_using_cache; return $result; } } src/Utility/Sanitize.php 0000644 00000042346 15073230246 0011310 0 ustar 00 <?php namespace Averta\WordPress\Utility; class Sanitize { /** * Sanitize title. * * @param string $input * * @return string */ public static function title( $input ) { return sanitize_title( $input ); } /** * Sanitize slug. * * @param string $input * * @return string */ public static function slug( $input ) { return sanitize_title( static::dash( $input ) ); } /** * Sanitize a textarea input field. Removes bad html like <script> and <html>. * * @param string $input * * @return string */ public static function textarea( $input ) { global $allowedposttags; return wp_kses( $input, $allowedposttags ); } /** * Sanitize nothing. * * @param string $input * * @return string */ public static function raw( $input ) { return $input; } /** * Sanitize URL * * Remove all characters except letters, digits and !#$%&'*+-=?^_`{|}~@.[]. * * @param string $url * * @return string */ public static function url( $url ) { return filter_var( $url, FILTER_SANITIZE_URL ); } /** * Sanitize Number int * * Remove all characters except digits, plus and minus sign. * * @param string $input * * @return string */ public static function int( $input ) { return absint( filter_var( $input, FILTER_SANITIZE_NUMBER_INT ) ); } /** * Sanitize Attribute. * * @param string $input * * @return string */ public static function attribute( $input ) { return esc_attr( $input ); } /** * Sanitize SQL * * @param string $input * * @return string */ public static function sql( $input ) { return esc_sql( $input ); } /** * Sanitize text as plaintext. * * @param string $input * * @return string */ public static function plaintext( $input ) { return wp_kses( $input, [] ); } /** * Sanitizes a string from user input or from the database. * * @param string $input * * @return string */ public static function textfield( $input ) { return sanitize_text_field( $input ); } /** * Strips out all characters that are not allowable in an email. * * @param string $input * * @return string */ public static function email( $input ) { return sanitize_email( $input ); } /** * Sanitizes an HTML classname to ensure it only contains valid characters. * * @param string $input * * @return string */ public static function htmlClass( $input ) { return sanitize_html_class( $input ); } /** * Sanitizes a string key. * * Keys are used as internal identifiers. Lowercase alphanumeric characters, dashes, and underscores are allowed. * * @param string $input * * @return string */ public static function key( $input ) { return sanitize_key( $input ); } /** * Sanitize editor data. Much like textarea remove <script> and <html>. * However, if the user can create unfiltered HTML allow it. * * @param string $input * @param bool $force_filter * @param bool $auto_p * @param null $allowed_tags * * @return string */ public static function editor( $input, $force_filter = false, $auto_p = false, $allowed_tags = null ) { if (current_user_can( 'unfiltered_html' ) && !$force_filter) { $output = trim( $input ); } else { global $allowedtags; $output = wp_kses( trim($input), apply_filters('averta/wordpress/sanitize/editor/tags', $allowed_tags ?? $allowedtags) ); } if( $auto_p ) { $output = wpautop($output); } return $output; } /** * Sanitizes content for allowed HTML tags for post content. * * @param string $input Post content to filter. * @return string Filtered post content with allowed HTML tags and attributes intact. */ public static function post( $input ) { return wp_kses_post( $input ); } /** * Sanitizes content for allowed HTML tags. * * @param string $input HTML input * @param null|array $allowed_tags allowed tags for wp_kses * @param null|string $namespace * @param bool $auto_p * * @return string */ public static function html( $input, $allowed_tags = null, $namespace = null, $auto_p = false ) { $tags = apply_filters('averta/wordpress/sanitize/html/tags/' . ($namespace ? $namespace : 'default'), $allowed_tags ? $allowed_tags : self::defaultAllowedTags() ); $output = trim( wp_kses( trim( $input ), $tags ) ); if( $auto_p ) { $output = wpautop( $output ); } return $output; } /** * Sanitizes json for allowed HTML tags. * * @param string $input HTML input * @param null|array $allowed_tags allowed tags for wp_kses * @param null|string $namespace * * @return string */ public static function json( $input, $allowed_tags = null, $namespace = null ) { $tags = apply_filters('averta/wordpress/sanitize/json/tags/' . ($namespace ? $namespace : 'default'), $allowed_tags ? $allowed_tags : self::defaultAllowedTags() ); $output = trim( wp_kses( trim( $input ), $tags ) ); return $output; } /** * Retrieves default WordPress HTML tags * * @return array */ protected static function defaultAllowedTags(){ $tags = [ 'em' => [], 'strong' => [], 'small' => [], 'sub' => [], 'sup' => [], 'b' => [], 'i' => [], 'ul' => [], 'ol' => [], 'hgroup' => [], 'h1' => [], 'h2' => [], 'h3' => [], 'h4' => [], 'h5' => [], 'h6' => [], 'table' => [], 'tbody' => [], 'tfoot' => [], 'thead' => [], 'dd' => [], 'dt' => [], 'dl' => [], 'tr' => [], 'th' => [], 'td' => [], 'figure' => [], 'figcaption' => [], 'caption' => [], 'desc' => [], 'line' => [], 'marker' => [], 'mask' => [], 'metadata' => [], 'pattern' => [], 'textpath' => [], 'use' => [], 'div' => [], 'img' => [ 'src' => true, 'alt' => true, 'title' => true, 'data-*' => true ], 'video' => [ 'autoplay' => true, 'controls' => true, 'height' => true, 'loop' => true, 'muted' => true, 'playsinline' => true, 'poster' => true, 'preload' => true, 'src' => true, 'width' => true, 'data-*' => true ], 'a' => [ 'id' => true, 'class' => true, 'style' => true, 'href' => true, 'title' => true, 'rev' => true, 'rel' => true, 'target' => true, 'download' => ['valueless' => 'y'], 'data-*' => true ], 'li' => [], 'blockquote' => [], 'cite' => [], 'code' => [], 'hr' => [], 'p' => [], 'br' => [], 'link' => [ 'id' => true, 'rel' => true, 'href' => true, 'media' => true, 'as' => true, 'imagesrcset' =>true, 'type' => true ], 'script' => [ 'id' => true, 'src' => true, 'type' => true, 'onload'=> true ], 'style' => [ 'id' => true, 'type' => true ], 'meta' => [ 'charset' => true, 'name' => true, 'content' => true ], 'body' => [ 'id' => true, 'class' => true, 'dir' => true ], 'picture' => [ 'id' => true, 'class' => true, 'style' => true, 'data-*'=> true ], 'source' => [ 'media' => true, 'srcset' => true, 'src' => true, 'data-*' => true ], 'iframe' => [ 'src' => true, 'height' => true, 'width' => true, 'frameborder' => true, 'allowfullscreen' => true, ], 'svg' => [ 'xmlns' => [], 'fill' => [], 'viewbox' => [], 'role' => [], 'aria-hidden' => [], 'focusable' => [], 'width' => [], 'height' => [], 'style' => [], 'class' => [] ], 'path' => [ 'id' => [], 'class' => [], 'd' => [], 'fill' => [], 'fill-rule' => [], 'fill-opacity' => [], 'width' => [], 'height' => [], 'transform' => [], 'stroke-width' => [], 'stroke' => [], 'opacity' => [], 'style' => [] ], 'g' => [ 'id' => [], 'class' => [], 'fill' => [], 'fill-rule' => [], 'width' => [], 'height' => [], 'transform' => [], 'data-name' => [], 'stroke-width' => [], 'stroke' => [], 'opacity' => [], 'style' => [] ], 'rect' => [ 'id' => [], 'class' => [], 'fill' => [], 'width' => [], 'height' => [], 'transform' => [], 'opacity' => [], 'data-name' => [], 'x' => [], 'y' => [], 'rx' => [], 'ry' => [], 'style' => [] ], 'circle' => [ 'id' => [], 'class' => [], 'fill' => [], 'transform' => [], 'data-name' => [], 'cx' => [], 'cy' => [], 'r' => [], 'stroke-width' => [], 'stroke-opacity' => [], 'stroke' => [], 'opacity' => [], 'style' => [], 'fill-opacity' => [] ], 'ellipse' => [ 'id' => [], 'class' => [], 'fill' => [], 'transform' => [], 'opacity' => [], 'data-name' => [], 'style' => [], 'cx' => [], 'cy' => [], 'rx' => [], 'ry' => [] ], 'text' => [ 'fill' => [], 'width' => [], 'height' => [], 'transform' => [], 'font-size' => [], 'font-family' => [], 'font-weight' => [], 'letter-spacing' => [], 'x' => [], 'y' => [], 'opacity' => [] ], 'lineargradient' => [ 'id' => [], 'href'=> [], 'x1' => [], 'x2' => [], 'y1' => [], 'y2' => [], 'spreadMethod' => [], 'gradientUnits' => [] ], 'stop' => [ 'offset' => [], 'stop-color' => [], 'stop-opacity' => [] ], 'radialgradient' => [ 'id' => [], 'cx' => [], 'cy' => [], 'r' => [], 'gradienttransform' => [], 'gradientunits' => [] ], 'animate' => [ 'attributename' => [], 'begin' => [], 'dur' => [], 'values' => [], 'calcmode' => [], 'repeatcount' => [], 'keytimes' => [], 'keysplines' => [] ], 'animatetransform' => [ 'attributename' => [], 'type' => [], 'from' => [], 'to' => [], 'dur' => [], 'repeatcount' => [] ], 'defs' => [], 'clippath' => [], 'filter' => [ 'filterUnits' => [], 'id' => [], 'class' => [], 'width' => [], 'height' => [], 'x' => [], 'y' => [], 'opacity' => [] ], 'feOffset' => [ 'dx' => [], 'dy' => [], 'input' => [], ], 'feGaussianBlur' => [ 'stdDeviation' => [], 'result' => [] ], 'feFlood' => [ 'flood-color' => [] ], 'feComposite' => [ 'operator' => [], 'in' => [], 'in2' => [], ], 'symbol' => [ 'id' => [], 'class' => [], 'viewbox' => [], 'preserveaspectratio' => [] ], 'time' => [ 'id' => [], 'class' => [], 'datetime' => [], 'data-*' => true ] ]; return $tags; } /** * Sanitize Hex Color Value * * If the hex does not validate return a default instead. * * @param string $hex * @param string $default * * @return string */ public static function hex( $hex, $default = '#000000' ) { if ( preg_match("/^\#?([a-fA-F0-9]{3}){1,2}$/", $hex ) ) { return $hex; } return $default; } /** * Sanitize Underscore * * Remove all special characters and replace spaces and dashes with underscores * allowing only a single underscore after trimming whitespace form string and * lower casing * * ` --"2_ _e''X AM!pl'e-"-1_@` -> _2_ex_ample_1_ * * @param string $name * @param bool $keep_dots * * @return mixed|string */ public static function underscore( $name, $keep_dots = false ) { if (is_string( $name )) { if($keep_dots) { $name = preg_replace( '/[\.]+/', '.', $name ); $name = preg_replace("/[^A-Za-z0-9\.\\s\\-\\_?]/",'', strtolower(trim($name)) ); } else { $name = preg_replace( '/[\.]+/', '_', $name ); $name = preg_replace("/[^A-Za-z0-9\\s\\-\\_?]/",'', strtolower(trim($name)) ); } $name = preg_replace( '/[-\\s]+/', '_', $name ); $name = preg_replace( '/_+/', '_', $name ); } return $name; } /** * Sanitize Dash * * Remove all special characters and replace spaces and underscores with dashes * allowing only a single dash after trimming whitespace form string and * lower casing * * ` --"2_ _e\'\'X AM!pl\'e-"-1_@` -> -2-ex-ample-1- * * @param string $name * * @return mixed|string */ public static function dash( $name ) { if (is_string( $name )) { $name = preg_replace( '/[\.]+/', '_', $name ); $name = preg_replace("/[^A-Za-z0-9\\s\\-\\_?]/",'', strtolower(trim($name)) ); $name = preg_replace( '/[_\\s]+/', '-', $name ); $name = preg_replace( '/-+/', '-', $name ); } return $name; } /** * Sanitizes a filename, replacing whitespace with dashes. * * @param $filename * * @return string */ public static function fileName( $filename ){ return sanitize_file_name( $filename ); } /** * Removes only shortcode tags from the given content but keeps content of shortcodes * * @param string $content * @param array $excludeStripShortcodeTags * * @return array|string|string[]|null */ public static function stripShortcodes( $content, $excludeStripShortcodeTags = [] ) { if( ! $content ) return $content; if( ! $excludeStripShortcodeTags ) $excludeStripShortcodeTags = apply_filters( "averta/wordpress/exclude/strip/shortcode/tags", [] ); if( empty( $excludeStripShortcodeTags ) || ! is_array( $excludeStripShortcodeTags ) ) return preg_replace('/\[[^\]]*\]/', '', $content); $exclude_codes = join('|', $excludeStripShortcodeTags ); return preg_replace( "~(?:\[/?)(?!(?:$exclude_codes))[^/\]]+/?\]~s", '', $content ); } } src/Utility/JSON.php 0000644 00000004462 15073230246 0010270 0 ustar 00 <?php namespace Averta\WordPress\Utility; class JSON { /** * Detect is JSON * * @param $args * * @return bool */ public static function isJson(...$args) { if(is_array($args[0]) || is_object($args[0])) { return false; } if (trim($args[0]) === '') { return false; } json_decode(...$args); return (json_last_error() == JSON_ERROR_NONE); } /** * Remove extra white-spaces and tabs from json string * * @param string $json * * @return string */ public static function normalize( $json ) { if( ! is_string( $json ) ) { return $json; } if (trim( $json ) === '') { return ''; } $decoded = json_decode( $json ); return (json_last_error() == JSON_ERROR_NONE) ? wp_json_encode( $decoded ) : $json; } /** * Encode a variable into JSON, with some sanity checks. * * @param mixed $value The value being encoded. Can be any type except a resource. * All string data must be UTF-8 encoded. * @param int $flags Options to be passed to json_encode(). Default 0. * @param int $depth Set the maximum depth. Must be greater than zero. * * @return false|string */ public static function encode( $value, $flags = 0, $depth = 512 ) { return wp_json_encode( $value, $flags, $depth ); } /** * Takes a JSON encoded string and converts it into a PHP variable. * * @param string $json The json string being decoded. * @param bool|null $associative When true, JSON objects will be returned as associative arrays; when false, JSON objects will be returned as objects. * When null, JSON objects will be returned as associative arrays or objects depending on whether JSON_OBJECT_AS_ARRAY is set in the flags. * @param int $depth Maximum nesting depth of the structure being decoded. * @param int $flags Bitmask of JSON_BIGINT_AS_STRING, JSON_INVALID_UTF8_IGNORE, JSON_INVALID_UTF8_SUBSTITUTE, JSON_OBJECT_AS_ARRAY, JSON_THROW_ON_ERROR * * @return mixed */ public static function decode( $json, $associative = null, $depth = 512, $flags = 0 ) { return json_decode( $json, $associative, $depth, $flags ); } } src/Utility/Post.php 0000644 00000012237 15073230246 0010443 0 ustar 00 <?php namespace Averta\WordPress\Utility; use Averta\Core\Utility\Str; class Post { /** * Generates an excerpt and trims it by characters from the content outside of loop * * @param int $postId ID of the post. * @param int $maxCharLength The maximum number of words in a post excerpt. * @param array $excludeStripShortcodeTags * @param bool $skipMoreTag * * @return string */ public static function getExcerptTrimmedByChars( $postId = null, $maxCharLength = null, $excludeStripShortcodeTags = null, $skipMoreTag = false ) { $post = get_post( $postId ); if( ! isset( $post ) ) return ''; // If post password required and it doesn't match the cookie. if ( post_password_required( $post ) ){ return __( 'There is no excerpt because this is a protected post.' ); } $excerptMore = apply_filters( 'excerpt_more', " ..." ); $excerptMore = apply_filters( 'averta/wordpress/excerpt/trim/chars/more', $excerptMore ); if ( $post->post_excerpt ){ $excerpt = apply_filters( 'get_the_excerpt', $post->post_excerpt ); } else { $content = apply_filters( 'the_content', $post->post_content ); // Remove Gutenberg Blocks $content = preg_replace('/<!--(.|\s)*?-->/', '', $content); // check for <!--more--> tag if ( ! $skipMoreTag && preg_match( '/<!--more(.*?)?-->/', $content, $matches ) ) { $content = explode( $matches[0], $content, 2 ); if ( ! empty( $matches[1] ) ){ $moreLinkText = strip_tags( wp_kses_no_null( trim( $matches[1] ) ) ); $excerptMore = ! empty( $moreLinkText ) ? $moreLinkText : $excerptMore; } $content = $content[0]; } // Clean post content $excerpt = strip_tags( Sanitize::stripShortcodes( $content, $excludeStripShortcodeTags ) ); // Remove special characters $excerpt = preg_replace('/[^A-Za-z0-9\s]/', '', $excerpt ); } $excerpt = !empty( $maxCharLength ) ? Str::trimByChars( $excerpt, $maxCharLength, $excerptMore ) : $excerpt; return apply_filters( 'averta/wordpress/excerpt/trim/chars/result', $excerpt, $post, $maxCharLength, $excerptMore ); } /** * Generates an excerpt and trims it by words from the content outside of loop * * @param int $postId ID of the post. * @param int $excerptLength The maximum number of words in a post excerpt. * @param array $excludeStripShortcodeTags * @param bool $skipMoreTag * * @return string */ public static function getExcerptTrimmedByWords( $postId = null, $excerptLength = null, $excludeStripShortcodeTags = null, $skipMoreTag = false ) { $post = get_post( $postId ); if( ! isset( $post ) ) return ''; // If post password required and it doesn't match the cookie. if ( post_password_required( $post ) ) return __( 'There is no excerpt because this is a protected post.' ); if ( $post->post_excerpt ) { $result = apply_filters( 'get_the_excerpt', $post->post_excerpt ); } else { $content = $post->post_content; $content = apply_filters( 'the_content', $content ); // If excerpt length is defined use it, otherwise use default excerpt length $excerptLength = empty( $excerptLength ) ? apply_filters( 'excerpt_length', 55 ) : $excerptLength; $excerptMore = apply_filters( 'excerpt_more', " ..." ); // check for <!--more--> tag if ( ! $skipMoreTag && preg_match( '/<!--more(.*?)?-->/', $content, $matches ) ) { $content = explode( $matches[0], $content, 2 ); if ( ! empty( $matches[1] ) ){ $moreLinkText = strip_tags( wp_kses_no_null( trim( $matches[1] ) ) ); $excerptMore = ! empty( $moreLinkText ) ? $moreLinkText : $excerptMore; } return $content[0] . $excerptMore; } // Clean post content $excerpt = strip_tags( Sanitize::stripShortcodes( $content, $excludeStripShortcodeTags ) ); $result = wp_trim_words( $excerpt, $excerptLength, $excerptMore ); } return apply_filters( 'averta/wordpress/excerpt/trim/words/result', $result ); } /** * Retrieves a post meta field for the given post ID. * * @param int $postId ID of the object metadata is for. * @param string $metaKey Metadata key. If not specified, retrieve all metadata for the specified object. * @param string $default Default metadata value for the specified meta key * * @return mixed|string */ public static function getMeta( $postId, $metaKey = '', $default = '' ){ $post = get_post( $postId ); if( empty( $post ) || empty( $post->ID ) ) return $default; $metaValue = get_metadata( 'post', $post->ID, $metaKey, true ); return '' === $metaValue ? $default : $metaValue; } } src/Utility/Extract.php 0000644 00000005765 15073230246 0011140 0 ustar 00 <?php namespace Averta\WordPress\Utility; class Extract { /** * Extract all images from content * * @param string $text The text to extract images from. * * @return bool|array List of images in array */ public static function imagesFromText( $text ) { preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', $text, $matches ); return isset( $matches ) && count( $matches[0] ) ? $matches : false; } /** * Get first image src from content * * @param string $text The content to extract image from. * * @return string First image URL on success and empty string if nothing found */ public static function firstImageSrcFromText( $text ) { $images = self::imagesFromText( $text ); return ( $images && count( $images[1]) ) ? $images[1][0] : ''; } /** * Get first image tag from string * * @param string $text The text to extract image from. * * @return string First image tag on success and empty string if nothing found */ public static function firstImageFromText( $text ) { $images = self::imagesFromText( $text ); return ( $images && count( $images[0]) ) ? $images[0][0] : ''; } /** * Crawls the content and checks if the shortcode is present in the content or not * - If list of $attributes was passed, it tries to extract and collect the value of attributes * - and returns an array containing the values * * @param string $content Content to search for shortcodes. * @param string $shortcodeName Shortcode tag name to check. * @param array $attributes List of shortcode attribute which should be extracted * * @return array|bool False if shortcode does not exist in the content. * An array containing attribute values if $attributes is not empty and shortcode exists in the content * True if shortcode exits in the content */ public static function shortcodeAttributes( $content, $shortcodeName, $attributes = [] ){ $hasShortcode = false; if ( false === strpos( $content, '[' ) ) { return false; } preg_match_all( '/' . get_shortcode_regex( [ $shortcodeName ] ) . '/', $content, $matches, PREG_SET_ORDER ); if ( empty( $matches ) ) { return false; } $extractedAttributes = []; foreach ( $matches as $shortcode ) { // if shortcode found in the content if ( $shortcodeName === $shortcode[2] ) { $hasShortcode = $hasShortcode || 1; if( empty( $attributes ) && $hasShortcode ){ return true; } if( empty( $shortcode[3] ) ){ continue; } if( is_array( $attributes ) ){ foreach( $attributes as $attributeName ){ preg_match( '/'. $attributeName .'=["|\']([^\"\']+)["|\']/m', $shortcode[3], $attrMatches, PREG_OFFSET_CAPTURE, 0); if( !empty( $attrMatches[1][0] ) ){ $extractedAttributes[ $attributeName ][] = $attrMatches[1][0]; } } } } } if( !empty( $extractedAttributes ) ){ return $extractedAttributes; } return $hasShortcode; } } src/Utility/Plugin.php 0000644 00000000664 15073230246 0010755 0 ustar 00 <?php namespace Averta\WordPress\Utility; class Plugin { /** * Determines whether a plugin is active. * * @param string $plugin_basename Path to the plugin file relative to the plugins directory. * * @return mixed */ public static function isActive( $plugin_basename ){ include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); return is_plugin_active( $plugin_basename ); } } src/Utility/Escape.php 0000644 00000002640 15073230246 0010713 0 ustar 00 <?php namespace Averta\WordPress\Utility; class Escape { /** * Escape HTML. * * @param string $input * * @return string */ public static function html( $input ) { return esc_html( $input ); } /** * Escape Attribute. * * @param string $input * * @return string */ public static function attribute( $input ) { return esc_attr( $input ); } /** * Escape URL. * * @param string $input * * @return string */ public static function url( $input ) { return esc_url( $input ); } /** * Escape SQL. * * @param string $input * * @return string */ public static function sql( $input ) { return esc_sql( $input ); } /** * Escape Inline Javascript. * * @param string $input * * @return string */ public static function js( $input ) { return esc_js( $input ); } /** * Escape Inline Javascript. * * @param string $input * * @return string */ public static function textarea( $input ) { return esc_textarea( $input ); } /** * Escape post content. * * @param string $input * * @return string */ public static function content( $input ) { return wp_kses_post( $input ); } } src/File/UploadsDirectory.php 0000644 00000003446 15073230246 0012230 0 ustar 00 <?php namespace Averta\WordPress\File; class UploadsDirectory { /** * Array of information about the upload directory. * * @var array */ private $uploads_directory; /** * UploadsDirectory constructor. * * @param string|null $time (Optional) Time formatted in 'yyyy/mm'. Default value: null * @param bool $create_dir (Optional) Whether to check and create the uploads directory. Default true for backward compatibility.Default value: true * @param bool $refresh_cache (Optional) Whether to refresh the cache. Default value: false */ public function __construct( $time = null, $create_dir = true, $refresh_cache = false ) { $this->uploads_directory = wp_upload_dir( $time, $create_dir, $refresh_cache ); } /** * Base directory and sub directory or full path to upload directory. * @example C:\path\to\wordpress\wp-content\uploads\2010\05 * * @return mixed */ public function getPath(){ return $this->uploads_directory['path']; } /** * Base url and sub directory or absolute URL to upload directory. * @example http://example.com/wp-content/uploads/2010/05 * * @return mixed */ public function getUrl(){ return $this->uploads_directory['url']; } /** * Path without subdir. * @example C:\path\to\wordpress\wp-content\uploads * * @return mixed */ public function getBaseDirectory(){ return $this->uploads_directory['basedir']; } /** * URL path without subdir. * @example http://example.com/wp-content/uploads * * @return mixed */ public function getBaseUrl(){ return $this->uploads_directory['baseurl']; } /** * Sub directory if uploads use year/month folders option is on. * @example /2010/05 * * @return mixed */ public function getSubDirectory(){ return $this->uploads_directory['subdir']; } } src/File/FileSystem.php 0000644 00000014036 15073230246 0011015 0 ustar 00 <?php namespace Averta\WordPress\File; class FileSystem { protected $wpFilesystem; public function __construct() { global $wp_filesystem; if ( ! function_exists( 'get_filesystem_method' ) || empty( $wp_filesystem ) ) { require_once ( ABSPATH.'/wp-admin/includes/file.php' ); WP_Filesystem(); } $this->wpFilesystem = $wp_filesystem; } /** * Validates filesystem credentials. */ public function validate( $url = null ) { if ( get_filesystem_method() === 'direct' ) {} return true; } /** * Reads a file if exists. * * @param string $filename File name. * * @return string */ public function read( $filename ) { if ( ! $this->validate() ){ return false; } return $this->wpFilesystem->get_contents( $filename ); } /** * Creates and stores content in a file * * @param string $file_location The address that we plan to create the file in. * @param string $content The content for writing in the file * @param int $chmod * * @return boolean Returns true if the file is created and updated successfully, false on failure */ public function write( $file_location = '', $content = '', $chmod = 0644 ) { if ( ! $this->validate() ){ return false; } $_chmod = defined( 'FS_CHMOD_FILE' ) ? FS_CHMOD_FILE : $chmod; // Write the content, if possible if ( wp_mkdir_p( dirname( $file_location ) ) && ! $this->wpFilesystem->put_contents( $file_location, $content, $_chmod ) ) { // If writing the content in the file was not successful return false; } else { return true; } } /** * Whether the file/path exists or not. * * @param string $file File name or file path. * * @return bool */ public function exists( $file ) { if ( ! $this->validate() ){ return false; } return $this->wpFilesystem->exists( $file ); } /** * Whether the path is a file or not. * * @return bool */ public function isFile( $file ) { if ( ! $this->validate() ){ return false; } return $this->wpFilesystem->is_file( $file ); } /** * Whether the path is a directory or not. * * @return bool */ public function isDir( $path ) { if ( ! $this->validate() ){ return false; } return $this->wpFilesystem->is_dir( $path ); } /** * Creates a folder path recursively. * * @param string $path Path Full path to directory to create * @param bool $recursive Whether to create directory recursively or not * * @return bool */ public function mkdir( $path, $recursive = false ) { if ( ! $this->validate() ){ return false; } if( $recursive ){ return wp_mkdir_p( $path ); } return $this->wpFilesystem->mkdir( $path ); } /** * Removes folder path and contents. * * @return bool * @global $wp_filesytem * @since 0.9.0 * */ public function rmdir( $path, $recursive = false ) { if ( ! $this->validate() ){ return false; } return $this->wpFilesystem->rmdir( $path, $recursive ); } /** * Gets details for files in a directory or a specific file. * * * @param string $path Path to directory or file. * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files. * Default true. * @param bool $recursive Optional. Whether to recursively include file details in nested directories. * Default false. * @return array|false { * Array of files. False if unable to list directory contents. * * @type string $name Name of the file or directory. * @type string $perms *nix representation of permissions. * @type string $permsn Octal representation of permissions. * @type string $owner Owner name or ID. * @type int $size Size of file in bytes. * @type int $lastmodunix Last modified unix timestamp. * @type mixed $lastmod Last modified month (3 letter) and day (without leading 0). * @type int $time Last modified time. * @type string $type Type of resource. 'f' for file, 'd' for directory. * @type mixed $files If a directory and `$recursive` is true, contains another array of files. * } */ public function scan( $path, $include_hidden = true, $recursive = false ) { if ( ! $this->validate() ){ return false; } return $this->wpFilesystem->dirlist( $path, $include_hidden, $recursive ); } /** * Copy files from source to destination * * @param string $source * @param string $destination * @param false $overwrite * @param false $mode * * @return bool True on success, false on failure. */ public function copy( $source, $destination, $overwrite = false, $mode = false ) { if ( ! $this->validate() ){ return false; } return $this->wpFilesystem->copy( $source, $destination, $overwrite, $mode ); } /** * Move files from source to destination * * @param string $source * @param string $destination * @param false $overwrite * * @return bool True on success, false on failure. */ public function move( $source, $destination, $overwrite = false ) { if ( ! $this->validate() ){ return false; } return $this->wpFilesystem->move( $source, $destination, $overwrite ); } /** * Gets the file modification time. * * @param string $file Path to file. * * @return mixed */ public function mtime( $file ) { return $this->wpFilesystem->mtime( $file ); } /** * Retrieves FileSystem instance. * * @return mixed */ public function proxy(){ return $this->wpFilesystem; } } src/File/Asset.php 0000644 00000000072 15073230246 0010003 0 ustar 00 <?php namespace Averta\WordPress\File; class Asset { } src/Database/Migration.php 0000644 00000014255 15073230246 0011512 0 ustar 00 <?php namespace Averta\WordPress\Database; /** * Creates and manages the structure of WP custom tables. */ class Migration{ /** * Current tables migration version */ const MIGRATION_VERSION = "1.0.0"; /** * Prefix for version option_name in options table */ const VERSION_PREFIX = "plugin_slug_"; /** * Table prefix */ const TABLE_PREFIX = 'plugin_slug_'; /** * Table names * Example: ['documents', 'options'] */ protected $table_names = []; /** * Constructor */ public function __construct() { add_filter( 'wpmu_drop_tables' , array( $this, 'wpmu_drop_tables' ), 11, 2 ); add_action( 'wp_initialize_site', array( $this, 'ms_site_initialized' ), 12, 2 ); } /** * Returns prefixfied name of table or tables * * @param string property name * * @since 1.0 * @return string|array */ public function __get( $name ){ if( in_array( $name, $this->table_names ) ){ global $wpdb; return $wpdb->prefix . static::TABLE_PREFIX . $name; // Get list of table names } elseif( 'tables' == $name ){ global $wpdb; $tables = []; foreach ($this->table_names as $table_name ){ $tables[ $table_name ] = $wpdb->prefix . static::TABLE_PREFIX . $table_name; } return $tables; } else { return NULL; } } /** * Uncomment the following method and define table structures * protected function create_table_{table_name}() { $sql_create_table = "CREATE TABLE IF NOT EXISTS {$this->{table_name}} ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, name text NOT NULL, slug varchar(100) NOT NULL, author bigint(20) unsigned NOT NULL DEFAULT '0', created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, modified_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, content longtext NOT NULL, status varchar(20) NOT NULL DEFAULT 'draft', password varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (id), KEY created_at (created_at), KEY slug (slug) ) {$this->charset_collate()};\n"; $this->dbDelta( $sql_create_table ); } */ /** * Create tables * * Should be invoked on plugin activation * * @since 1.0 * @return null */ protected function create_tables() { // call create_table_{table_name} of all tables if are defined foreach ( $this->table_names as $table_name ){ $method_name = 'create_table_' . $table_name; if( method_exists( $this, $method_name ) ){ $this->$method_name(); } } do_action( 'averta/database/tables/created', $this->tables ); } /** * Updates tables * * @param $last_executed_version * * @since 1.0 * @return null */ protected function update_tables( $last_executed_version ) { /** * Example: * Execute table changes for new version 1.0.1 * * if( version_compare( '1.0.1', $last_executed_version, '>' ) ){ $this->runSql( "ALTER TABLE {$this->table_name} DROP COLUMN type" ); } */ do_action( 'averta/database/tables/updated', $this->tables ); } /** * Updates tables if update is required * * @param bool $force force to create tables if not exists * * @since 1.0 * @return bool is any update required for tables? */ public function migrate( $force = false ){ $last_executed_version = $this->get_last_executed_migration_version(); // check if the update is required if( ! $force && ( $last_executed_version == static::MIGRATION_VERSION ) ) return false; $this->create_tables(); $this->update_tables( $last_executed_version ); // update tables version to current version $this->update_last_executed_migration_version( static::MIGRATION_VERSION ); return true; } /** * Inserts custom tables for a new site into the database. * * @since WP 5.1.0 * * @param int|WP_Site $site_id Site ID or object. * @param array $args * * @return bool|null */ public function ms_site_initialized( $site_id, array $args = array() ){ if ( empty( $site_id ) ) { return null; } if ( ! $site = get_site( $site_id ) ) { return null; } $switch = false; if ( get_current_blog_id() !== $site->id ) { $switch = true; switch_to_blog( $site->id ); } $this->migrate( true ); if ( $switch ) { restore_current_blog(); } return true; } /** * Drop all custom tables of this class * * @since 1.0 * @return void */ protected function delete_tables(){ global $wpdb; foreach ( $this->tables as $table_name) { $wpdb->query("DROP TABLE IF EXISTS $table_name"); } } /** * Filter custom tables to drop when the blog is deleted * * @since 1.0 * @return array $tables */ public function wpmu_drop_tables( $tables, $blog_id ){ global $wpdb; foreach ( $this->table_names as $table_name ){ $tables[] = $wpdb->prefix . $blog_id . '_' . static::TABLE_PREFIX . $name; } return $tables; } /** * Creates new tables and updates existing tables to a new structure. * * @param string $sql * @since 1.0 */ protected function dbDelta( $sql = '' ){ if( ! function_exists( 'dbDelta' ) ){ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); } dbDelta( $sql ); } /** * Executes SQL * * @param string $sql * @since 1.0 */ protected function runSql( $sql = '' ){ global $wpdb; $wpdb->query( $sql ); } /** * Retrieves migration version * * @since 1.0 * @return string */ protected function get_migration_version_id(){ return static::VERSION_PREFIX . 'db_version'; } /** * Updates current migration version * * @param $version The version to be saved * * @since 1.0 * @return bool */ protected function update_last_executed_migration_version( $version ){ return update_option( $this->get_migration_version_id(), $version ); } /** * Retrieves Last executed migration version * * @since 1.0 * @return mixed|void */ protected function get_last_executed_migration_version(){ return get_option( $this->get_migration_version_id(), '1.0.0' ); } /** * Gets database charset collate * * @return string */ protected function charset_collate(){ global $wpdb; return $wpdb->get_charset_collate(); } } src/Cache/DatabaseCache.php 0000644 00000002061 15073230246 0011500 0 ustar 00 <?php namespace Averta\WordPress\Cache; class DatabaseCache extends WPCache { /** * {@inheritDoc} */ public function get( $key, $default = false ) { global $_wp_using_ext_object_cache; $current_using_cache = $_wp_using_ext_object_cache; $_wp_using_ext_object_cache = false; $result = parent::get( $key, $default ); $_wp_using_ext_object_cache = $current_using_cache; return $result; } /** * {@inheritDoc} */ public function set( $key, $value, $ttl = null ): bool { global $_wp_using_ext_object_cache; $current_using_cache = $_wp_using_ext_object_cache; $_wp_using_ext_object_cache = false; $result = parent::set( $key, $value, $ttl ); $_wp_using_ext_object_cache = $current_using_cache; return $result; } /** * {@inheritDoc} */ public function delete( $key ): bool { global $_wp_using_ext_object_cache; $current_using_cache = $_wp_using_ext_object_cache; $_wp_using_ext_object_cache = false; $result = parent::delete( $key ); $_wp_using_ext_object_cache = $current_using_cache; return $result; } } src/Cache/WPCache.php 0000644 00000013144 15073230246 0010326 0 ustar 00 <?php namespace Averta\WordPress\Cache; use Averta\WordPress\Utility\Sanitize; use DateInterval; use Psr\Http\Message\RequestInterface; use Psr\SimpleCache\CacheInterface; class WPCache implements CacheInterface{ /** * The list of transient keys * * @var array */ private $inUseKeys = []; /** * A prefix for all transient keys * * @var string */ protected $keyPrefix = ''; /** * Cache constructor. * * @param null $cachePrefix */ public function __construct( $cachePrefix = null ) { if( ! is_null( $cachePrefix ) ){ $this->keyPrefix = $cachePrefix; } } /** * Get the value of a transient. * * If the transient does not exist, does not have a value, or has expired, * then the return value will be false. * * @param string $key Cache key. Expected to not be SQL-escaped. * * @param bool $default Default cache value * * @return mixed Value of transient. */ public function get( $key, $default = false ) { $key = $this->validateKey( $key ); $value = get_transient( $key ); if ( false === $value ) { $value = $default; } return $value; } /** * Set/update the value of a transient. * * You do not need to serialize values. If the value needs to be serialized, then * it will be serialized before it is set. * * * @param string $key Cache key. Expected to not be SQL-escaped. Must be * 172 characters or fewer in length. * @param mixed $value Transient value. Must be serializable if non-scalar. * Expected to not be SQL-escaped. * @param int $ttl Optional. Time until expiration in seconds. Default 0 (no expiration). * * @return bool False if value was not set and true if value was set. */ public function set( $key, $value, $ttl = null ): bool { $key = $this->validateKey( $key ); $this->addToKeysList( $key ); if ( $ttl instanceof DateInterval ) { $ttl = $this->convertDateIntervalToInteger( $ttl ); } return set_transient( $key, $value, intval($ttl) ); } /** * Delete a transient. * * @param string $key Cache key. Expected to not be SQL-escaped. * * @return bool true if successful, false otherwise */ public function delete( $key ): bool { $key = $this->validateKey( $key ); $this->deleteFromKeyList( $key ); return delete_transient( $key ); } /** * Convert a request object to a unique key * * @param RequestInterface $request * * @return string */ public function hashRequest( RequestInterface $request ) { $requestArgs = $request->getQueryParams(); $requestArgs['url'] = $request->getRequestTarget(); $requestArgs['url'] = remove_query_arg( ['flush', 'clearCache'], $requestArgs['url'] ); // exclude flush params from hash request key unset( $requestArgs['flush'] ); unset( $requestArgs['clearCache'] ); $requestArgs = $this->beforeHashRequest( $requestArgs, $request ); return Sanitize::textfield( md5( serialize( $requestArgs ) ) ); } /** * Prepares request args for hashing * Override this method to change requestArgs before hash * * @param array $requestArgs * @param RequestInterface $request * * @return array */ protected function beforeHashRequest( array $requestArgs, RequestInterface $request ){ return $requestArgs; } public function has( $key ): bool { return $this->get( $key, false ) !== false; } public function getMultiple( $keys, $default = null ) { $result = []; foreach ( $keys as $key ) { $result[ $key ] = $this->get( $key, $default ); } return $result; } public function setMultiple( $values, $ttl = null ): bool { foreach ( $values as $key => $value ) { if ( $this->set( $key, $value, $ttl ) ) { continue; } return false; } return true; } public function deleteMultiple( $keys ): bool { foreach ( $keys as $key ) { if ( $this->delete( $key ) ) { continue; } return false; } return true; } public function clear(): bool { if( ! empty( $this->keyPrefix ) ) { global $wpdb; $wpdb->query($wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s", "_transient_{$this->keyPrefix}%", "_transient_timeout_{$this->keyPrefix}%" )); } return $this->deleteMultiple( $this->inUseKeys() ); } /** * @param DateInterval $ttl * * @return int */ private function convertDateIntervalToInteger( DateInterval $ttl ) : int { return ( new DateTime() ) ->setTimestamp(0) ->add( $ttl ) ->getTimestamp(); } /** * Adds a key to cache key list * * @param string $key */ private function addToKeysList( $key ): void { $this->inUseKeys[ $key ] = $key; } /** * Removes a key from cache key list * * @param string $key */ private function deleteFromKeyList( $key ): void { unset( $this->inUseKeys[ $key ] ); } private function inUseKeys(): array { return $this->inUseKeys; } protected function validateKey( $key ){ if ( strpos( $key, $this->keyPrefix ) === 0 ) { $key = substr( $key, strlen( $this->keyPrefix ) ); } return $this->keyPrefix . $key; } public function prevent(){ if ( ! defined( 'DONOTCACHEPAGE' ) ) { define( 'DONOTCACHEPAGE', true ); } if ( ! defined( 'DONOTCACHEDB' ) ) { define( 'DONOTCACHEDB', true ); } if ( ! defined( 'DONOTMINIFY' ) ) { define( 'DONOTMINIFY', true ); } if ( ! defined( 'DONOTCDN' ) ) { define( 'DONOTCDN', true ); } if ( ! defined( 'DONOTCACHCEOBJECT' ) ) { define( 'DONOTCACHCEOBJECT', true ); } // prevent caching. nocache_headers(); } } src/Models/WPOptions.php 0000644 00000004726 15073230246 0011204 0 ustar 00 <?php namespace Averta\WordPress\Models; /** * An interface for WordPress Options API. */ class WPOptions { /** * The prefix added to all option keys. * * @var string */ private $prefix = '__'; /** * Create new Options instance. * * @param string $prefix The prefix that will be added to option names automatically. */ public function __construct( $prefix ) { $this->prefix = $prefix; } /** * Retrieves an option value. * * @param string $option The option name (without the prefix). * @param mixed $default Optional. Default value to return if the option does not exist. Default null. * @param bool $raw Optional. Use the raw option name (i.e. don't call get_option_name). Default false. * * @return mixed Value set for the option. */ public function get( $option, $default = null, $raw = false ) { $value = \get_option( $raw ? $option : $this->get_option_name( $option ), $default ); if ( is_array( $default ) && '' === $value ) { $value = []; } return $value; } /** * Sets or updates an option. * * @param string $option The option name (without the prefix). * @param mixed $value The value to store. * @param bool $autoload Optional. Whether to load the option when WordPress * starts up. For existing options, $autoload can only * be updated using update_option() if $value is also * changed. Default true. * @param bool $raw Optional. Use the raw option name (i.e. don't call get_option_name). Default false. * * @return bool False if value was not updated and true if value was updated. */ public function set( $option, $value, $autoload = true, $raw = false ) { return \update_option( $raw ? $option : $this->get_option_name( $option ), $value, $autoload ); } /** * Deletes an option. * * @param string $option The option name (without the prefix). * @param bool $raw Optional. Use the raw option name (i.e. don't call get_option_name). Default false. * * @return bool True, if option is successfully deleted. False on failure. */ public function delete( $option, $raw = false ) { return \delete_option( $raw ? $option : $this->get_option_name( $option ) ); } /** * Retrieves the complete option name to use. * * @param string $option The option name (without the prefix). * * @return string */ public function get_option_name( $option ) { return "{$this->prefix}{$option}"; } } .idea/php.xml 0000644 00000005463 15073230246 0007047 0 ustar 00 <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="PhpIncludePathManager"> <include_path> <path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" /> <path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" /> <path value="$PROJECT_DIR$/vendor/filp/whoops" /> <path value="$PROJECT_DIR$/vendor/phar-io/version" /> <path value="$PROJECT_DIR$/vendor/phar-io/manifest" /> <path value="$PROJECT_DIR$/vendor/psr/simple-cache" /> <path value="$PROJECT_DIR$/vendor/psr/log" /> <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" /> <path value="$PROJECT_DIR$/vendor/composer" /> <path value="$PROJECT_DIR$/vendor/doctrine/instantiator" /> <path value="$PROJECT_DIR$/vendor/sebastian/global-state" /> <path value="$PROJECT_DIR$/vendor/sebastian/comparator" /> <path value="$PROJECT_DIR$/vendor/wp-coding-standards/wpcs" /> <path value="$PROJECT_DIR$/vendor/sebastian/type" /> <path value="$PROJECT_DIR$/vendor/dealerdirect/phpcodesniffer-composer-installer" /> <path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" /> <path value="$PROJECT_DIR$/vendor/webmozart/assert" /> <path value="$PROJECT_DIR$/vendor/sebastian/version" /> <path value="$PROJECT_DIR$/vendor/sebastian/exporter" /> <path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" /> <path value="$PROJECT_DIR$/vendor/sebastian/environment" /> <path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" /> <path value="$PROJECT_DIR$/vendor/sebastian/diff" /> <path value="$PROJECT_DIR$/vendor/squizlabs/php_codesniffer" /> <path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" /> <path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" /> <path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" /> <path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" /> <path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" /> <path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" /> <path value="$PROJECT_DIR$/vendor/phpunit/php-timer" /> <path value="$PROJECT_DIR$/vendor/phpspec/prophecy" /> <path value="$PROJECT_DIR$/vendor/phpunit/phpunit" /> <path value="$PROJECT_DIR$/vendor/phpunit/php-token-stream" /> <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" /> <path value="$PROJECT_DIR$/vendor/theseer/tokenizer" /> <path value="$PROJECT_DIR$/vendor/psr/http-message" /> </include_path> </component> <component name="PhpProjectSharedConfiguration" php_language_level="7.0" /> <component name="PhpUnit"> <phpunit_settings> <PhpUnitSettings custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" /> </phpunit_settings> </component> </project>