diff --git a/.github/workflows/test-php.yml b/.github/workflows/test-php.yml index b783ba263..341f2ec19 100644 --- a/.github/workflows/test-php.yml +++ b/.github/workflows/test-php.yml @@ -24,7 +24,7 @@ jobs: run: composer install --prefer-dist --no-progress --quiet continue-on-error: true - name: Run PHPCS - run: composer run lint + run: composer run lint:errors continue-on-error: false php-unit: diff --git a/class-rop-autoloader.php b/class-rop-autoloader.php index a459495aa..36310ab2c 100644 --- a/class-rop-autoloader.php +++ b/class-rop-autoloader.php @@ -119,7 +119,7 @@ public static function loader( $class_name ) { $filename = 'class-' . str_replace( '_', '-', strtolower( $class_name ) ) . static::$file_ext; foreach ( static::$file_iterator as $file ) { if ( strtolower( $file->getFileName() ) === strtolower( $filename ) && is_readable( $file->getPathName() ) ) { - require( $file->getPathName() ); + require $file->getPathName(); return true; } } diff --git a/composer.json b/composer.json index 436e97d8f..2119f48f5 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ "build": "sh bin/dist.sh", "test": "vendor/bin/phpunit", "lint": "vendor/bin/phpcs --standard=phpcs.xml --extensions=php -s", + "lint:errors": "phpcs --standard=phpcs.xml -n", "format": "vendor/bin/phpcbf --standard=phpcs.xml --report-summary --report-source", "phpstan": "phpstan", "phpstan:generate:baseline": "phpstan --generate-baseline" @@ -52,11 +53,11 @@ "installer-disable": true }, "require-dev": { - "wp-coding-standards/wpcs": "^2.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", + "wp-coding-standards/wpcs": "^3.2", + "dealerdirect/phpcodesniffer-composer-installer": "^1.1.2", "phpunit/phpunit": "9.*", "yoast/phpunit-polyfills": "^2.0", - "codeinwp/phpcs-ruleset": "dev-main", + "automattic/vipwpcs": "^3.0", "phpstan/phpstan": "^2.1", "szepeviktor/phpstan-wordpress": "^2.0" }, diff --git a/composer.lock b/composer.lock index ff0ea431b..f5a139f32 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "414f9a7c89b5140711e2c342d07ecbec", + "content-hash": "9167977876d70ba10bc21d94f6e49056", "packages": [ { "name": "codeinwp/themeisle-sdk", @@ -106,32 +106,32 @@ "source": "https://github.com/abraham/twitteroauth", "issues": "https://github.com/abraham/twitteroauth/issues" }, - "time": "2025-07-14T13:47:00+00:00" + "time": "2025-07-14T12:47:15+00:00" }, { "name": "composer/ca-bundle", - "version": "1.3.7", + "version": "1.5.8", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "76e46335014860eec1aa5a724799a00a2e47cc85" + "reference": "719026bb30813accb68271fee7e39552a58e9f65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/76e46335014860eec1aa5a724799a00a2e47cc85", - "reference": "76e46335014860eec1aa5a724799a00a2e47cc85", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/719026bb30813accb68271fee7e39552a58e9f65", + "reference": "719026bb30813accb68271fee7e39552a58e9f65", "shasum": "" }, "require": { "ext-openssl": "*", "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "psr/log": "^1.0", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8 || ^9", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "type": "library", "extra": { @@ -166,7 +166,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.7" + "source": "https://github.com/composer/ca-bundle/tree/1.5.8" }, "funding": [ { @@ -176,13 +176,9 @@ { "url": "https://github.com/composer", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2023-08-30T09:31:38+00:00" + "time": "2025-08-20T18:49:47+00:00" }, { "name": "facebook/graph-sdk", @@ -294,31 +290,32 @@ "packages-dev": [ { "name": "automattic/vipwpcs", - "version": "2.3.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/Automattic/VIP-Coding-Standards.git", - "reference": "b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6" + "reference": "2b1d206d81b74ed999023cffd924f862ff2753c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6", - "reference": "b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6", + "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/2b1d206d81b74ed999023cffd924f862ff2753c8", + "reference": "2b1d206d81b74ed999023cffd924f862ff2753c8", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", "php": ">=5.4", - "sirbrillig/phpcs-variable-analysis": "^2.11.17", - "squizlabs/php_codesniffer": "^3.7.1", - "wp-coding-standards/wpcs": "^2.3" + "phpcsstandards/phpcsextra": "^1.2.1", + "phpcsstandards/phpcsutils": "^1.0.11", + "sirbrillig/phpcs-variable-analysis": "^2.11.18", + "squizlabs/php_codesniffer": "^3.9.2", + "wp-coding-standards/wpcs": "^3.1.0" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0.0", "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9", "phpcsstandards/phpcsdevtools": "^1.0", - "phpunit/phpunit": "^4 || ^5 || ^6 || ^7" + "phpunit/phpunit": "^4 || ^5 || ^6 || ^7 || ^8 || ^9" }, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", @@ -343,74 +340,42 @@ "source": "https://github.com/Automattic/VIP-Coding-Standards", "wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki" }, - "time": "2023-08-24T15:11:13+00:00" - }, - { - "name": "codeinwp/phpcs-ruleset", - "version": "dev-main", - "source": { - "type": "git", - "url": "https://github.com/Codeinwp/phpcs-ruleset.git", - "reference": "982f9881312252e6213cde07704b74da47b39475" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeinwp/phpcs-ruleset/zipball/982f9881312252e6213cde07704b74da47b39475", - "reference": "982f9881312252e6213cde07704b74da47b39475", - "shasum": "" - }, - "require": { - "automattic/vipwpcs": "^2.0", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "sirbrillig/phpcs-variable-analysis": "^2.10", - "wptrt/wpthemereview": "*" - }, - "default-branch": true, - "bin": [ - "bin/phpcbf-fix-exit-0" - ], - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-3.0-or-later" - ], - "description": "PHPCS coding standards for Themeisle products.", - "support": { - "source": "https://github.com/Codeinwp/phpcs-ruleset/tree/main" - }, - "time": "2021-05-05T16:55:27+00:00" + "time": "2024-05-10T20:31:09+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", + "version": "v1.1.2", "source": { "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1", + "reference": "e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", + "composer-plugin-api": "^2.2", + "php": ">=5.4", "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" + "composer/composer": "^2.2", + "ext-json": "*", + "ext-zip": "*", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcompatibility/php-compatibility": "^9.0", + "yoast/phpunit-polyfills": "^1.0" }, "type": "composer-plugin", "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, "autoload": { "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -420,17 +385,16 @@ "authors": [ { "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" + "email": "opensource@frenck.dev", + "homepage": "https://frenck.dev", + "role": "Open source developer" }, { "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", "keywords": [ "PHPCodeSniffer", "PHP_CodeSniffer", @@ -450,10 +414,29 @@ "tests" ], "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "security": "https://github.com/PHPCSStandards/composer-installer/security/policy", + "source": "https://github.com/PHPCSStandards/composer-installer" }, - "time": "2022-02-04T12:51:07+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-07-17T20:45:56+00:00" }, { "name": "doctrine/instantiator", @@ -527,16 +510,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.13.4", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", "shasum": "" }, "require": { @@ -544,11 +527,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -574,7 +558,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" }, "funding": [ { @@ -582,7 +566,7 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2025-08-01T08:46:24+00:00" }, { "name": "nikic/php-parser", @@ -812,44 +796,43 @@ "time": "2025-07-16T06:41:00+00:00" }, { - "name": "phpcompatibility/php-compatibility", - "version": "9.3.5", + "name": "phpcsstandards/phpcsextra", + "version": "1.4.0", "source": { "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", - "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" + "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", + "reference": "fa4b8d051e278072928e32d817456a7fdb57b6ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", - "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/fa4b8d051e278072928e32d817456a7fdb57b6ca", + "reference": "fa4b8d051e278072928e32d817456a7fdb57b6ca", "shasum": "" }, "require": { - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" - }, - "conflict": { - "squizlabs/php_codesniffer": "2.6.2" + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.1.0", + "squizlabs/php_codesniffer": "^3.13.0 || ^4.0" }, "require-dev": { - "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "phpcsstandards/phpcsdevtools": "^1.2.1", + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ "LGPL-3.0-or-later" ], "authors": [ - { - "name": "Wim Godden", - "homepage": "https://github.com/wimg", - "role": "lead" - }, { "name": "Juliette Reinders Folmer", "homepage": "https://github.com/jrfnl", @@ -857,81 +840,26 @@ }, { "name": "Contributors", - "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" + "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors" } ], - "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", - "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", + "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.", "keywords": [ - "compatibility", - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", - "source": "https://github.com/PHPCompatibility/PHPCompatibility" - }, - "time": "2019-12-27T09:44:58+00:00" - }, - { - "name": "phpcompatibility/phpcompatibility-paragonie", - "version": "1.3.3", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", - "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/293975b465e0e709b571cbf0c957c6c0a7b9a2ac", - "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac", - "shasum": "" - }, - "require": { - "phpcompatibility/php-compatibility": "^9.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "paragonie/random_compat": "dev-master", - "paragonie/sodium_compat": "dev-master" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wim Godden", - "role": "lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "lead" - } - ], - "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.", - "homepage": "http://phpcompatibility.com/", - "keywords": [ - "compatibility", - "paragonie", + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", "phpcs", - "polyfill", "standards", "static analysis" ], "support": { - "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", - "security": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/security/policy", - "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" + "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", + "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSExtra" }, "funding": [ { - "url": "https://github.com/PHPCompatibility", + "url": "https://github.com/PHPCSStandards", "type": "github" }, { @@ -941,67 +869,90 @@ { "url": "https://opencollective.com/php_codesniffer", "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" } ], - "time": "2024-04-24T21:30:46+00:00" + "time": "2025-06-14T07:40:39+00:00" }, { - "name": "phpcompatibility/phpcompatibility-wp", - "version": "2.1.5", + "name": "phpcsstandards/phpcsutils", + "version": "1.1.1", "source": { "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", - "reference": "01c1ff2704a58e46f0cb1ca9d06aee07b3589082" + "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", + "reference": "f7eb16f2fa4237d5db9e8fed8050239bee17a9bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/01c1ff2704a58e46f0cb1ca9d06aee07b3589082", - "reference": "01c1ff2704a58e46f0cb1ca9d06aee07b3589082", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/f7eb16f2fa4237d5db9e8fed8050239bee17a9bd", + "reference": "f7eb16f2fa4237d5db9e8fed8050239bee17a9bd", "shasum": "" }, "require": { - "phpcompatibility/php-compatibility": "^9.0", - "phpcompatibility/phpcompatibility-paragonie": "^1.0" + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.13.0 || ^4.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + "ext-filter": "*", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0 || ^3.0.0" }, "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPCSUtils/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "LGPL-3.0-or-later" ], "authors": [ { - "name": "Wim Godden", + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", "role": "lead" }, { - "name": "Juliette Reinders Folmer", - "role": "lead" + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors" } ], - "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.", - "homepage": "http://phpcompatibility.com/", + "description": "A suite of utility functions for use with PHP_CodeSniffer", + "homepage": "https://phpcsutils.com/", "keywords": [ - "compatibility", + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", "phpcs", + "phpcs3", + "phpcs4", "standards", "static analysis", - "wordpress" + "tokens", + "utility" ], "support": { - "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues", - "security": "https://github.com/PHPCompatibility/PHPCompatibilityWP/security/policy", - "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" + "docs": "https://phpcsutils.com/", + "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", + "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSUtils" }, "funding": [ { - "url": "https://github.com/PHPCompatibility", + "url": "https://github.com/PHPCSStandards", "type": "github" }, { @@ -1011,9 +962,13 @@ { "url": "https://opencollective.com/php_codesniffer", "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" } ], - "time": "2024-04-24T21:37:59+00:00" + "time": "2025-08-10T01:04:45+00:00" }, { "name": "phpstan/phpstan", @@ -1075,35 +1030,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.31", + "version": "9.2.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -1112,7 +1067,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -1141,7 +1096,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, "funding": [ { @@ -1149,7 +1104,7 @@ "type": "github" } ], - "time": "2024-03-02T06:37:42+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1394,45 +1349,45 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.19", + "version": "9.6.25", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" + "reference": "049c011e01be805202d8eebedef49f769a8ec7b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/049c011e01be805202d8eebedef49f769a8ec7b7", + "reference": "049c011e01be805202d8eebedef49f769a8ec7b7", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", + "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.13.4", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", + "sebastian/comparator": "^4.0.9", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.8", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", "sebastian/version": "^3.0.2" }, "suggest": { @@ -1477,7 +1432,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.25" }, "funding": [ { @@ -1488,12 +1443,20 @@ "url": "https://github.com/sebastianbergmann", "type": "github" }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, { "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", "type": "tidelift" } ], - "time": "2024-04-05T04:35:58+00:00" + "time": "2025-08-20T14:38:31+00:00" }, { "name": "sebastian/cli-parser", @@ -1664,16 +1627,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "4.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "67a2df3a62639eab2cc5906065e9805d4fd5dfc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/67a2df3a62639eab2cc5906065e9805d4fd5dfc5", + "reference": "67a2df3a62639eab2cc5906065e9805d4fd5dfc5", "shasum": "" }, "require": { @@ -1726,15 +1689,27 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.9" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2025-08-10T06:51:50+00:00" }, { "name": "sebastian/complexity", @@ -2001,16 +1976,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.7", + "version": "5.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" + "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/b6781316bdcd28260904e7cc18ec983d0d2ef4f6", + "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6", "shasum": "" }, "require": { @@ -2053,15 +2028,27 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.8" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state", + "type": "tidelift" } ], - "time": "2024-03-02T06:35:11+00:00" + "time": "2025-08-10T07:10:35+00:00" }, { "name": "sebastian/lines-of-code", @@ -2234,16 +2221,16 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "539c6691e0623af6dc6f9c20384c120f963465a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0", + "reference": "539c6691e0623af6dc6f9c20384c120f963465a0", "shasum": "" }, "require": { @@ -2285,15 +2272,27 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.6" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" } ], - "time": "2023-02-03T06:07:39+00:00" + "time": "2025-08-10T06:57:39+00:00" }, { "name": "sebastian/resource-operations", @@ -2460,16 +2459,16 @@ }, { "name": "sirbrillig/phpcs-variable-analysis", - "version": "v2.11.18", + "version": "v2.12.0", "source": { "type": "git", "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", - "reference": "ca242a0b7309e0f9d1f73b236e04ecf4ca3248d0" + "reference": "4debf5383d9ade705e0a25121f16c3fecaf433a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/ca242a0b7309e0f9d1f73b236e04ecf4ca3248d0", - "reference": "ca242a0b7309e0f9d1f73b236e04ecf4ca3248d0", + "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/4debf5383d9ade705e0a25121f16c3fecaf433a7", + "reference": "4debf5383d9ade705e0a25121f16c3fecaf433a7", "shasum": "" }, "require": { @@ -2480,9 +2479,8 @@ "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0", "phpcsstandards/phpcsdevcs": "^1.1", "phpstan/phpstan": "^1.7", - "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0", - "sirbrillig/phpcs-import-detection": "^1.1", - "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0@beta" + "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0 || ^10.5.32 || ^11.3.3", + "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0" }, "type": "phpcodesniffer-standard", "autoload": { @@ -2514,20 +2512,20 @@ "source": "https://github.com/sirbrillig/phpcs-variable-analysis", "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" }, - "time": "2024-04-13T16:42:46+00:00" + "time": "2025-03-17T16:17:38+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.1", + "version": "3.13.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909" + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/267a4405fff1d9c847134db3a3c92f1ab7f77909", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5b5e3821314f947dd040c70f7992a64eac89025c", + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c", "shasum": "" }, "require": { @@ -2592,9 +2590,13 @@ { "url": "https://opencollective.com/php_codesniffer", "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" } ], - "time": "2024-03-31T21:03:09+00:00" + "time": "2025-06-17T22:17:01+00:00" }, { "name": "szepeviktor/phpstan-wordpress", @@ -2710,30 +2712,38 @@ }, { "name": "wp-coding-standards/wpcs", - "version": "2.3.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "7da1894633f168fe244afc6de00d141f27517b62" + "reference": "d2421de7cec3274ae622c22c744de9a62c7925af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", - "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/d2421de7cec3274ae622c22c744de9a62c7925af", + "reference": "d2421de7cec3274ae622c22c744de9a62c7925af", "shasum": "" }, "require": { + "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.3.1" + "phpcsstandards/phpcsextra": "^1.4.0", + "phpcsstandards/phpcsutils": "^1.1.0", + "squizlabs/php_codesniffer": "^3.13.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", "phpcompatibility/php-compatibility": "^9.0", - "phpcsstandards/phpcsdevtools": "^1.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpcsstandards/phpcsdevtools": "^1.2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + "ext-iconv": "For improved results", + "ext-mbstring": "For improved results" }, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", @@ -2750,6 +2760,7 @@ "keywords": [ "phpcs", "standards", + "static analysis", "wordpress" ], "support": { @@ -2757,94 +2768,26 @@ "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" - }, - { - "name": "wptrt/wpthemereview", - "version": "0.2.1", - "source": { - "type": "git", - "url": "https://github.com/WPTT/WPThemeReview.git", - "reference": "462e59020dad9399ed2fe8e61f2a21b5e206e420" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/WPTT/WPThemeReview/zipball/462e59020dad9399ed2fe8e61f2a21b5e206e420", - "reference": "462e59020dad9399ed2fe8e61f2a21b5e206e420", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "phpcompatibility/phpcompatibility-wp": "^2.0", - "squizlabs/php_codesniffer": "^3.3.1", - "wp-coding-standards/wpcs": "^2.2.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", - "phpcompatibility/php-compatibility": "^9.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0", - "roave/security-advisories": "dev-master" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Theme Review Team", - "homepage": "https://make.wordpress.org/themes/handbook/", - "role": "Strategy and rule setting" - }, - { - "name": "Ulrich Pogson", - "homepage": "https://github.com/grappler", - "role": "Lead developer" - }, - { - "name": "Juliette Reinders Folmer", - "homepage": "https://github.com/jrfnl", - "role": "Lead developer" - }, - { - "name": "Denis Žoljom", - "homepage": "https://github.com/dingo-d", - "role": "Plugin integration lead" - }, + "funding": [ { - "name": "Contributors", - "homepage": "https://github.com/WPTRT/WPThemeReview/graphs/contributors" + "url": "https://opencollective.com/php_codesniffer", + "type": "custom" } ], - "description": "PHP_CodeSniffer rules (sniffs) to verify theme compliance with the rules for theme hosting on wordpress.org", - "homepage": "https://make.wordpress.org/themes/handbook/review/", - "keywords": [ - "phpcs", - "standards", - "themes", - "wordpress" - ], - "support": { - "issues": "https://github.com/WPTRT/WPThemeReview/issues", - "source": "https://github.com/WPTRT/WPThemeReview" - }, - "time": "2019-11-17T20:05:55+00:00" + "time": "2025-07-24T20:08:31+00:00" }, { "name": "yoast/phpunit-polyfills", - "version": "2.0.1", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/Yoast/PHPUnit-Polyfills.git", - "reference": "4a088f125c970d6d6ea52c927f96fe39b330d0f1" + "reference": "1a6aecc9ebe4a9cea4e1047d0e6c496e52314c27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/4a088f125c970d6d6ea52c927f96fe39b330d0f1", - "reference": "4a088f125c970d6d6ea52c927f96fe39b330d0f1", + "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/1a6aecc9ebe4a9cea4e1047d0e6c496e52314c27", + "reference": "1a6aecc9ebe4a9cea4e1047d0e6c496e52314c27", "shasum": "" }, "require": { @@ -2854,12 +2797,12 @@ "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0.0", "php-parallel-lint/php-parallel-lint": "^1.4.0", - "yoast/yoastcs": "^3.1.0" + "yoast/yoastcs": "^3.2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.x-dev" + "dev-main": "4.x-dev" } }, "autoload": { @@ -2894,13 +2837,12 @@ "security": "https://github.com/Yoast/PHPUnit-Polyfills/security/policy", "source": "https://github.com/Yoast/PHPUnit-Polyfills" }, - "time": "2024-04-05T16:36:44+00:00" + "time": "2025-08-10T05:13:49+00:00" } ], "aliases": [], "minimum-stability": "stable", "stability-flags": { - "codeinwp/phpcs-ruleset": 20, "codeinwp/twitteroauth": 20 }, "prefer-stable": false, diff --git a/cron-system/class-rop-cron-core.php b/cron-system/class-rop-cron-core.php index 0d6cf5b69..becc9d16f 100644 --- a/cron-system/class-rop-cron-core.php +++ b/cron-system/class-rop-cron-core.php @@ -31,7 +31,7 @@ class Rop_Cron_Core { /** * Rop_Cron_Core constructor. */ - function __construct() { + public function __construct() { /** * Register to ROP Cron the share start. @@ -53,7 +53,6 @@ function __construct() { * Register local end-points used by ROP Cron Service. */ add_action( 'init', array( &$this, 'init_endpoint_items' ) ); - } /** @@ -153,7 +152,5 @@ public function server_register_client() { 'request_path' => ':register_account:', ); $call_response = $request_call->create_call_process( $arguments ); - } - } diff --git a/cron-system/includes/class-debug-page.php b/cron-system/includes/class-debug-page.php index 38edb4a94..b196c8b7d 100644 --- a/cron-system/includes/class-debug-page.php +++ b/cron-system/includes/class-debug-page.php @@ -3,7 +3,6 @@ namespace RopCronSystem\Pages; - use RopCronSystem\Curl_Helpers\Rop_Curl_Methods; use RopCronSystem\ROP_Helpers\Rop_Helpers; @@ -27,7 +26,7 @@ class Debug_Page { * * Debug_Page constructor. */ - function __construct() { + public function __construct() { add_action( 'admin_menu', array( &$this, 'debug_page_menu' ) ); add_action( 'admin_enqueue_scripts', array( &$this, 'load_custom_wp_admin_style' ) ); @@ -163,58 +162,58 @@ public function rop_service_debug() { } ?> -
| + | |
|
' . __( 'PHP 7 is recommended', 'tweet-old-post' ) . '';
+ echo ' ' . esc_html__( 'PHP 7 is recommended', 'tweet-old-post' ) . '';
}
?>
- + |
- |
| + | |
|
';
- echo 'libz version: ' . $curl_version['libz_version'] . ' '; - echo 'OpenSSL: ' . $curl_version['ssl_version'] . ' '; + echo 'version: ' . esc_html( $curl_version['version'] ) . ' (' . esc_html( $curl_version['version_number'] ) . ') '; + echo 'libz version: ' . esc_html( $curl_version['libz_version'] ) . ' '; + echo 'OpenSSL: ' . esc_html( $curl_version['ssl_version'] ) . ' '; echo 'Protocols: '; // . implode( ',', $curl_version['protocols'] ) . ' '; echo 'HTTP: ' . ( ( in_array( 'http', $curl_version['protocols'] ) ) ? '✔' : '✖' ) . ' '; echo 'HTTPS: ' . ( ( in_array( 'https', $curl_version['protocols'] ) ) ? '✔' : '✖' ) . ' '; } else { - echo '' . __( 'No version of CURL detected.', 'tweet-old-post' ) . ''; + echo '' . esc_html__( 'No version of CURL detected.', 'tweet-old-post' ) . ''; } ?> - + |
- |
| Revive Social Cron SyStem: ', 'tweet-old-post' ); ?> | +|
| Revive Social Cron SyStem: ', 'tweet-old-post' ); ?> |
- Server:', 'tweet-old-post' ); ?>
- N/A
- - WordPress:', 'tweet-old-post' ); ?> - N/A - - - + Server:', 'tweet-old-post' ); ?> + N/A + + WordPress:', 'tweet-old-post' ); ?> + N/A + + + |
-
|
-
-
+
+
-
+
- + - + |
-
|
-
-
+
+
-
+
- + - + |
-
: - +
', + '', + '', + '', + '', + '
' + ) + ); + ?>' . esc_html__( 'Click here to get started with Revive Social.', 'tweet-old-post' ) . '
', + '' . esc_html__( 'Click here to get started with Revive Social.', 'tweet-old-post' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'left', @@ -105,7 +105,7 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'Your social media accounts will show here once connected.', 'tweet-old-post' ) . '
', + '' . esc_html__( 'Your social media accounts will show here once connected.', 'tweet-old-post' ) . '
', 'position' => array( 'edge' => 'top', 'align' => 'left', @@ -121,7 +121,8 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . sprintf( esc_html__( 'You can add your social media accounts here. %1$sLet\'s do this later%2$s.', 'tweet-old-post' ), '', '' ) . '
', + /* translators: %1$s and %2$s are opening and closing strong tags */ + '' . sprintf( esc_html__( 'You can add your social media accounts here. %1$sLet\'s do this later%2$s.', 'tweet-old-post' ), '', '' ) . '
', 'position' => array( 'edge' => 'bottom', 'align' => 'left', @@ -137,7 +138,7 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'This is the main configuration page of the plugin, we\'ll go through a few of the settings, click it now.', 'tweet-old-post' ) . '
', + '' . esc_html__( 'This is the main configuration page of the plugin, we\'ll go through a few of the settings, click it now.', 'tweet-old-post' ) . '
', 'position' => array( 'edge' => 'top', 'align' => 'left', @@ -153,7 +154,7 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'Here you can set how many hours you\'d like between shares.', 'tweet-old-post' ) . '
', + '' . esc_html__( 'Here you can set how many hours you\'d like between shares.', 'tweet-old-post' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -169,7 +170,7 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'Here you can set how old posts should be before they are eligible to be shared.', 'tweet-old-post' ) . '
', + '' . esc_html__( 'Here you can set how old posts should be before they are eligible to be shared.', 'tweet-old-post' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -185,8 +186,8 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'Here you can set the maximum age of posts that are eligible to be shared.', 'tweet-old-post' ) . '
' . - '' . esc_html__( 'E.g. setting this option to 15 would mean that posts older than 15 days will not be shared.', 'tweet-old-post' ) . '
', + '' . esc_html__( 'Here you can set the maximum age of posts that are eligible to be shared.', 'tweet-old-post' ) . '
' . + '' . esc_html__( 'E.g. setting this option to 15 would mean that posts older than 15 days will not be shared.', 'tweet-old-post' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -202,7 +203,7 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'Checking this option ensures that your posts share perpetually.', 'tweet-old-post' ) . '
', + '' . esc_html__( 'Checking this option ensures that your posts share perpetually.', 'tweet-old-post' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -218,9 +219,10 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'Revive Social works with any post type, from products to posts, to custom post types.', 'tweet-old-post' ) . '
' . - '' . esc_html__( 'You can share media straight from your media library!', 'tweet-old-post' ) . '
' . - '' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', + '' . esc_html__( 'Revive Social works with any post type, from products to posts, to custom post types.', 'tweet-old-post' ) . '
' . + '' . esc_html__( 'You can share media straight from your media library!', 'tweet-old-post' ) . '
' . + /* translators: %1$s, %2$s, %3$s and %4$s are opening and closing link/strong tags */ + '' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -236,10 +238,13 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'Here you can set which WordPress taxonomies you\'d like to include/exclude from sharing.', 'tweet-old-post' ) . '
' . - '' . sprintf( __( '%1$sNote:%2$s', 'tweet-old-post' ), '', '' ) . '
' . - '' . sprintf( __( 'Selecting options here and %1$schecking%2$s the Exclude box will %1$sprevent%2$s posts in those taxonomies from sharing.', 'tweet-old-post' ), '', '' ) . '
' . - '' . sprintf( __( 'Selecting options here and leaving the Exclude box %1$sunchecked%2$s will %1$sonly share%2$s posts in those taxonomies.', 'tweet-old-post' ), '', '' ) . '
', + '' . esc_html__( 'Here you can set which WordPress taxonomies you\'d like to include/exclude from sharing.', 'tweet-old-post' ) . '
' . + /* translators: %1$s and %2$s are opening and closing strong tags */ + '' . sprintf( __( '%1$sNote:%2$s', 'tweet-old-post' ), '', '' ) . '
' . + /* translators: %1$s and %2$s are opening and closing strong tags */ + '' . sprintf( __( 'Selecting options here and %1$schecking%2$s the Exclude box will %1$sprevent%2$s posts in those taxonomies from sharing.', 'tweet-old-post' ), '', '' ) . '
' . + /* translators: %1$s and %2$s are opening and closing strong tags */ + '' . sprintf( __( 'Selecting options here and leaving the Exclude box %1$sunchecked%2$s will %1$sonly share%2$s posts in those taxonomies.', 'tweet-old-post' ), '', '' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -255,8 +260,9 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'Revive Social not only works on autopilot, it can also be used to push new posts to your social networks immediately.', 'tweet-old-post' ) . '
' . - '' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', + '' . esc_html__( 'Revive Social not only works on autopilot, it can also be used to push new posts to your social networks immediately.', 'tweet-old-post' ) . '
' . + /* translators: %1$s, %2$s, %3$s and %4$s are opening and closing link/strong tags */ + '' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -272,8 +278,9 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'You can add multiple custom messages to individual posts as share variations! Revive Social will randomly select one to share.', 'tweet-old-post' ) . '
' . - '' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', + '' . esc_html__( 'You can add multiple custom messages to individual posts as share variations! Revive Social will randomly select one to share.', 'tweet-old-post' ) . '
' . + /* translators: %1$s, %2$s, %3$s and %4$s are opening and closing link/strong tags */ + '' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -289,7 +296,7 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'Once you\'ve connected an account(s) you\'ll be able to configure the settings for the account(s) here.', 'tweet-old-post' ) . '
', + '' . esc_html__( 'Once you\'ve connected an account(s) you\'ll be able to configure the settings for the account(s) here.', 'tweet-old-post' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -305,8 +312,9 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'Custom scheduling allows you to refine the post times and days of your posts.', 'tweet-old-post' ) . '
', - '' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', + '' . esc_html__( 'Custom scheduling allows you to refine the post times and days of your posts.', 'tweet-old-post' ) . '
' . + /* translators: %1$s, %2$s, %3$s and %4$s are opening and closing link/strong tags */ + '' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -322,8 +330,9 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'You\'ll be able to have look at the posts scheduled to go out by Revive Social. You can even skip or block them from sharing in the future.', 'tweet-old-post' ) . '
' . - '' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', + '' . esc_html__( 'You\'ll be able to have look at the posts scheduled to go out by Revive Social. You can even skip or block them from sharing in the future.', 'tweet-old-post' ) . '
' . + /* translators: %1$s, %2$s, %3$s and %4$s are opening and closing link/strong tags */ + '' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -339,8 +348,9 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'You can track the success and failings of your shares here.', 'tweet-old-post' ) . '
' . - '' . sprintf( __( 'The resolution to most of these possible errors can be found %1$s%2$sHere%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', + '' . esc_html__( 'You can track the success and failings of your shares here.', 'tweet-old-post' ) . '
' . + /* translators: %1$s, %2$s, %3$s and %4$s are opening and closing link/strong tags */ + '' . sprintf( __( 'The resolution to most of these possible errors can be found %1$s%2$sHere%3$s%4$s.', 'tweet-old-post' ), '', '', '', '' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -356,7 +366,7 @@ public function create_rop_dashboard_pointers() { ), 'options' => array( 'content' => '' . esc_html__( 'Once you\'ve connected your accounts and setup their Post Format settings, use this button to start the plugin.', 'tweet-old-post' ) . '
', + '' . esc_html__( 'Once you\'ve connected your accounts and setup their Post Format settings, use this button to start the plugin.', 'tweet-old-post' ) . '
', 'position' => array( 'edge' => 'right', 'align' => 'left', @@ -369,7 +379,7 @@ public function create_rop_dashboard_pointers() { 'next_trigger' => array(), 'options' => array( 'content' => '' . esc_html__( 'Switch to the accounts tab now to add your social media accounts to the plugin and begin sharing.', 'tweet-old-post' ) . '
', + '' . esc_html__( 'Switch to the accounts tab now to add your social media accounts to the plugin and begin sharing.', 'tweet-old-post' ) . '
', 'position' => array( 'edge' => 'left', 'align' => 'right', @@ -398,7 +408,7 @@ public function rop_enqueue_pointers() { return; } - $general_settings = new Rop_Global_Settings; + $general_settings = new Rop_Global_Settings(); $is_plugin_screen = false; switch ( $screen->id ) { @@ -423,9 +433,9 @@ public function rop_enqueue_pointers() { response->set_code( '200' ) - ->set_data( $cron_helper->manage_cron( $data ) ); + ->set_data( $cron_helper->manage_cron( $data ) ); return $this->response->to_array(); } @@ -162,7 +162,7 @@ private function update_cron_type_agreement( $data ) { } $this->response->set_code( '200' ) - ->set_data( $response ); + ->set_data( $response ); return $this->response->to_array(); } @@ -237,7 +237,7 @@ private function get_queue( $data ) { $queue->clear_queue(); } $this->response->set_code( '200' ) - ->set_data( $queue->get_ordered_queue() ); + ->set_data( $queue->get_ordered_queue() ); return $this->response->to_array(); } @@ -288,7 +288,7 @@ private function reset_schedule( $data ) { $schedules = new Rop_Scheduler_Model(); $schedules->remove_schedule( $data['account_id'] ); $this->response->set_code( '201' ) - ->set_data( $schedules->get_schedule() ); + ->set_data( $schedules->get_schedule() ); return $this->response->is_not_silent()->to_array(); } @@ -308,7 +308,7 @@ private function reset_schedule( $data ) { private function get_schedule( $data ) { $schedules = new Rop_Scheduler_Model(); $this->response->set_code( '200' ) - ->set_data( $schedules->get_schedule() ); + ->set_data( $schedules->get_schedule() ); return $this->response->to_array(); } @@ -329,11 +329,11 @@ private function get_schedule( $data ) { private function get_shortner_credentials( $data ) { if ( empty( $data['short_url_service'] ) ) { return $this->response->set_code( '200' ) - ->set_data( array() )->to_array(); + ->set_data( array() )->to_array(); } if ( $data['short_url_service'] === 'wp_short_url' ) { return $this->response->set_code( '200' ) - ->set_data( array() )->to_array(); + ->set_data( array() )->to_array(); } $sh_factory = new Rop_Shortner_Factory(); @@ -343,7 +343,7 @@ private function get_shortner_credentials( $data ) { try { $shortner = $sh_factory->build( $data['short_url_service'] ); $this->response->set_code( '200' ) - ->set_data( $shortner->get_credentials( true ) ); + ->set_data( $shortner->get_credentials( true ) ); } catch ( Exception $exception ) { // Service not found or can't be built. Maybe log this exception. $log = new Rop_Logger(); @@ -461,7 +461,7 @@ private function reset_post_format( $data ) { private function get_post_format( $data ) { $post_format = new Rop_Post_Format_Model(); $this->response->set_code( '200' ) - ->set_data( $post_format->get_post_format() ); + ->set_data( $post_format->get_post_format() ); return $this->response->to_array(); } @@ -478,7 +478,7 @@ private function get_post_format( $data ) { private function select_posts() { $posts_selector = new Rop_Posts_Selector_Model(); $this->response->set_code( '200' ) - ->set_data( $posts_selector->select() ); + ->set_data( $posts_selector->select() ); return $this->response->to_array(); } @@ -495,7 +495,7 @@ private function select_posts() { private function get_general_settings() { $settings_model = new Rop_Settings_Model(); $this->response->set_code( '200' ) - ->set_data( $settings_model->get_settings( true ) ); + ->set_data( $settings_model->get_settings( true ) ); return $this->response->to_array(); } @@ -519,7 +519,7 @@ private function get_taxonomies( $data ) { $this->response->set_code( '400' ); if ( $taxonomies != false ) { $this->response->set_code( '200' ) - ->set_data( $taxonomies ); + ->set_data( $taxonomies ); } return $this->response->to_array(); @@ -548,7 +548,7 @@ private function exclude_post( $data ) { } $this->response->set_code( '200' ) - ->set_data( $data ); + ->set_data( $data ); return $this->response->to_array( $data ); } @@ -573,7 +573,7 @@ private function exclude_post_batch( $data ) { $settings_model->add_excluded_posts( $post_ids ); $this->response->set_code( '200' ) - ->set_data( $data ); + ->set_data( $data ); return $this->response->to_array( $data ); } @@ -625,7 +625,7 @@ private function save_general_settings( $data ) { $saved_data = $settings_model->get_settings(); $settings_model->save_settings( $data ); $this->response->set_code( '200' ) - ->set_data( $settings_model->get_settings() ); + ->set_data( $settings_model->get_settings() ); // Save tracking flag. $tracking = filter_var( $data['tracking'], FILTER_VALIDATE_BOOLEAN ); @@ -674,7 +674,7 @@ private function update_settings_toggle( $data ) { $general_settings['custom_messages'] = $data['custom_messages']; $settings_model->save_settings( $general_settings ); $this->response->set_code( '200' ) - ->set_data( $settings_model->get_settings() ); + ->set_data( $settings_model->get_settings() ); return $this->response->to_array(); } @@ -691,7 +691,7 @@ private function update_settings_toggle( $data ) { private function get_available_services() { $global_settings = new Rop_Global_Settings(); $this->response->set_code( '200' ) - ->set_data( $global_settings->get_available_services() ); + ->set_data( $global_settings->get_available_services() ); return $this->response->to_array(); } @@ -708,7 +708,7 @@ private function get_available_services() { private function get_authenticated_services() { $model = new Rop_Services_Model(); $this->response->set_code( '200' ) - ->set_data( $model->get_authenticated_services() ); + ->set_data( $model->get_authenticated_services() ); return $this->response->to_array(); } @@ -750,7 +750,7 @@ private function get_active_accounts() { } $this->response->set_code( '200' ) - ->set_data( $valid_accounts ); + ->set_data( $valid_accounts ); return $this->response->to_array(); } @@ -768,7 +768,7 @@ private function reset_accounts() { $model = new Rop_Services_Model(); $model->reset_authenticated_services(); $this->response->set_code( '200' ) - ->set_data( array() ); + ->set_data( array() ); return $this->response->to_array(); } @@ -793,7 +793,7 @@ private function update_active_accounts( $data ) { } $model = new Rop_Services_Model(); $this->response->set_code( '200' ) - ->set_data( $model->add_active_accounts( $new_active ) ); + ->set_data( $model->add_active_accounts( $new_active ) ); return $this->response->to_array(); } @@ -818,7 +818,7 @@ private function toggle_account( $data ) { $model->delete_active_accounts( $data['account_id'] ); } $this->response->set_code( '200' ) - ->set_data( $data ); + ->set_data( $data ); return $this->response->to_array(); } @@ -832,7 +832,7 @@ private function toggle_account( $data ) { */ private function remove_account( $data ) { $this->response->set_code( '200' ) - ->set_data( $data ); + ->set_data( $data ); $model = new Rop_Services_Model(); $model->remove_service_account( $data['account_id'] ); @@ -964,7 +964,7 @@ private function get_log( $data ) { $log->clear_user_logs(); } $this->response->set_code( '200' ) - ->set_data( $log->get_logs() ); + ->set_data( $log->get_logs() ); return $this->response->to_array(); } @@ -979,8 +979,8 @@ private function get_log( $data ) { private function fb_exception_toast( $data ) { update_option( 'rop_facebook_domain_toast', 'no' ); $this->response->set_code( '200' ) - ->set_message( 'Facebook domain check toast new status is closed' ) - ->set_data( array( 'display' => false ) ); + ->set_message( 'Facebook domain check toast new status is closed' ) + ->set_data( array( 'display' => false ) ); return $this->response->to_array(); } @@ -998,8 +998,8 @@ private function get_toast( $data ) { $log = new Rop_Logger(); $this->response->set_code( '200' ) - ->set_message( 'OK' ) - ->set_data( $log->get_logs() ); + ->set_message( 'OK' ) + ->set_data( $log->get_logs() ); $logs_response = $this->response->to_array(); @@ -1029,7 +1029,7 @@ private function get_toast( $data ) { $logs_response['data'][] = $latest_log_entry; // Add the timestamp of the error into DB to now show this alert multiple times. update_option( 'rop_toast', $time, 'no' ); - $custom_response ++; + ++$custom_response; } } } @@ -1037,7 +1037,7 @@ private function get_toast( $data ) { // We need to inform the user as there are many errors in the log // This will change the status to "Error (check logs)" if ( true === $is_status_logs_alert ) { - $custom_response ++; + ++$custom_response; $logs_response['data'][] = array( 'type' => 'status_error', 'message' => '', @@ -1091,18 +1091,18 @@ private function add_account_fb( $data ) { $db->migrate_post_formats( $active_accounts ); } else { $this->response->set_code( '500' ) - ->set_data( array() ); + ->set_data( array() ); return $this->response->to_array(); } $this->response->set_code( '200' ) - ->set_message( 'OK' ) - ->set_data( array() ); + ->set_message( 'OK' ) + ->set_data( array() ); $rop_facebook_via_rs_app_option = 'rop_facebook_via_rs_app'; if ( ! get_option( $rop_facebook_via_rs_app_option ) ) { - add_option( $rop_facebook_via_rs_app_option, 'true', ' ', 'no' ); + add_option( $rop_facebook_via_rs_app_option, 'true', '', 'no' ); } else { update_option( $rop_facebook_via_rs_app_option, 'true' ); } @@ -1148,18 +1148,18 @@ private function add_account_tw( $data ) { $db->migrate_post_formats( $active_accounts ); } else { $this->response->set_code( '500' ) - ->set_data( array() ); + ->set_data( array() ); return $this->response->to_array(); } $this->response->set_code( '200' ) - ->set_message( 'OK' ) - ->set_data( array() ); + ->set_message( 'OK' ) + ->set_data( array() ); $rop_twitter_via_rs_app_option = 'rop_twitter_via_rs_app'; if ( ! get_option( $rop_twitter_via_rs_app_option ) ) { - add_option( $rop_twitter_via_rs_app_option, 'true', ' ', 'no' ); + add_option( $rop_twitter_via_rs_app_option, 'true', '', 'no' ); } else { update_option( $rop_twitter_via_rs_app_option, 'true' ); } @@ -1201,18 +1201,18 @@ private function add_account_li( $data ) { $db->migrate_post_formats( $active_accounts ); } else { $this->response->set_code( '500' ) - ->set_data( array() ); + ->set_data( array() ); return $this->response->to_array(); } $this->response->set_code( '200' ) - ->set_message( 'OK' ) - ->set_data( array() ); + ->set_message( 'OK' ) + ->set_data( array() ); $rop_linkedin_via_rs_app_option = 'rop_linkedin_via_rs_app'; if ( ! get_option( $rop_linkedin_via_rs_app_option ) ) { - add_option( $rop_linkedin_via_rs_app_option, 'true', ' ', 'no' ); + add_option( $rop_linkedin_via_rs_app_option, 'true', '', 'no' ); } else { update_option( $rop_linkedin_via_rs_app_option, 'true' ); } @@ -1253,18 +1253,18 @@ private function add_account_tumblr( $data ) { $db->migrate_post_formats( $active_accounts ); } else { $this->response->set_code( '500' ) - ->set_data( array() ); + ->set_data( array() ); return $this->response->to_array(); } $this->response->set_code( '200' ) - ->set_message( 'OK' ) - ->set_data( array() ); + ->set_message( 'OK' ) + ->set_data( array() ); $rop_tumblr_via_rs_app_option = 'rop_tumblr_via_rs_app'; if ( ! get_option( $rop_tumblr_via_rs_app_option ) ) { - add_option( $rop_tumblr_via_rs_app_option, 'true', ' ', 'no' ); + add_option( $rop_tumblr_via_rs_app_option, 'true', '', 'no' ); } else { update_option( $rop_tumblr_via_rs_app_option, 'true' ); } @@ -1305,14 +1305,14 @@ private function add_account_gmb( $data ) { $db->migrate_post_formats( $active_accounts ); } else { $this->response->set_code( '500' ) - ->set_data( array() ); + ->set_data( array() ); return $this->response->to_array(); } $this->response->set_code( '200' ) - ->set_message( 'OK' ) - ->set_data( array() ); + ->set_message( 'OK' ) + ->set_data( array() ); return $this->response->to_array(); } @@ -1349,14 +1349,14 @@ private function add_account_vk( $data ) { $db->migrate_post_formats( $active_accounts ); } else { $this->response->set_code( '500' ) - ->set_data( array() ); + ->set_data( array() ); return $this->response->to_array(); } $this->response->set_code( '200' ) - ->set_message( 'OK' ) - ->set_data( array() ); + ->set_message( 'OK' ) + ->set_data( array() ); return $this->response->to_array(); } @@ -1378,14 +1378,19 @@ private function set_license( $data ) { $this->response ->set_code( '403' ) ->set_message( 'Forbidden' ) - ->set_data( array( 'success' => false, 'message' => Rop_I18n::get_labels( 'general.no_permission' ) ) ); + ->set_data( + array( + 'success' => false, + 'message' => Rop_I18n::get_labels( 'general.no_permission' ), + ) + ); return $this->response->to_array(); } // NOTE: The license processor requires the license key, even if we want to deactivate the license. if ( empty( $data['license_key'] ) ) { - $general_settings = new Rop_Global_Settings; + $general_settings = new Rop_Global_Settings(); $license_data = $general_settings->get_license_data(); if ( ! empty( $license_data ) && isset( $license_data->key ) ) { $data['license_key'] = $license_data->key; @@ -1396,7 +1401,12 @@ private function set_license( $data ) { if ( is_wp_error( $response ) ) { return $this->response - ->set_data( array( 'success' => false, 'message' => 'activate' === $data['action'] ? Rop_I18n::get_labels( 'general.validation_failed' ) : Rop_I18n::get_labels( 'general.could_not_change_license' ) ) ) + ->set_data( + array( + 'success' => false, + 'message' => 'activate' === $data['action'] ? Rop_I18n::get_labels( 'general.validation_failed' ) : Rop_I18n::get_labels( 'general.could_not_change_license' ), + ) + ) ->to_array(); } @@ -1426,7 +1436,7 @@ private function add_account_webhook( $data ) { if ( ! $webhook_service->add_webhook( $data ) ) { $this->response->set_code( '422' ) - ->set_data( array() ); + ->set_data( array() ); return $this->response->to_array(); } @@ -1443,14 +1453,14 @@ private function add_account_webhook( $data ) { $db->migrate_post_formats( $active_accounts ); } else { $this->response->set_code( '500' ) - ->set_data( array() ); + ->set_data( array() ); return $this->response->to_array(); } $this->response->set_code( '200' ) - ->set_message( 'OK' ) - ->set_data( array() ); + ->set_message( 'OK' ) + ->set_data( array() ); return $this->response->to_array(); } @@ -1473,7 +1483,7 @@ private function edit_account_webhook( $data ) { if ( ! $webhook_service->add_webhook( $data ) ) { $this->response->set_code( '422' ) - ->set_data( array() ); + ->set_data( array() ); return $this->response->to_array(); } @@ -1483,7 +1493,7 @@ private function edit_account_webhook( $data ) { if ( ! isset( $authenticated_services[ $service_id ] ) ) { $this->response->set_code( '422' ) - ->set_data( array() ); + ->set_data( array() ); return $this->response->to_array(); } @@ -1497,8 +1507,8 @@ private function edit_account_webhook( $data ) { } $this->response->set_code( '200' ) - ->set_message( 'OK' ) - ->set_data( array() ); + ->set_message( 'OK' ) + ->set_data( array() ); return $this->response->to_array(); } @@ -1636,8 +1646,8 @@ private function add_account_bluesky( $data ) { } $this->response->set_code( '200' ) - ->set_message( 'OK' ) - ->set_data( array() ); + ->set_message( 'OK' ) + ->set_data( array() ); return $this->response->to_array(); } diff --git a/includes/admin/class-rop-services-factory.php b/includes/admin/class-rop-services-factory.php index d959ec286..052b6fc08 100644 --- a/includes/admin/class-rop-services-factory.php +++ b/includes/admin/class-rop-services-factory.php @@ -31,7 +31,7 @@ class Rop_Services_Factory { public static function build( $service_name ) { $service = 'Rop_' . str_replace( '-', '_', ucwords( $service_name ) ) . '_Service'; if ( class_exists( $service ) ) { - return new $service; + return new $service(); } // @codeCoverageIgnoreStart throw new Exception( 'Invalid service name given.' ); diff --git a/includes/admin/class-rop-shortner-factory.php b/includes/admin/class-rop-shortner-factory.php index 0c4bacea7..a25bf1179 100644 --- a/includes/admin/class-rop-shortner-factory.php +++ b/includes/admin/class-rop-shortner-factory.php @@ -31,7 +31,7 @@ class Rop_Shortner_Factory { public static function build( $shortner_name ) { $shortner = 'Rop_' . ucwords( str_replace( '.', '', $shortner_name ) ) . '_Shortner'; if ( class_exists( $shortner ) ) { - return new $shortner; + return new $shortner(); } // @codeCoverageIgnoreStart throw new Exception( 'Invalid shortener name given.' ); diff --git a/includes/admin/helpers/class-rop-bluesky-api.php b/includes/admin/helpers/class-rop-bluesky-api.php index da2cd5665..fdb48de50 100644 --- a/includes/admin/helpers/class-rop-bluesky-api.php +++ b/includes/admin/helpers/class-rop-bluesky-api.php @@ -232,8 +232,8 @@ public function get_user_details( $did, $access_token = '' ) { "{$this->api_url}/app.bsky.actor.getProfile?" . http_build_query( array( 'actor' => $did ) ), array( 'headers' => array( - 'Content-Type' => 'application/json', - 'timeout' => 120, + 'Content-Type' => 'application/json', + 'timeout' => 120, 'Authorization' => 'Bearer ' . $access_token, ), ) @@ -298,7 +298,7 @@ public function create_post( $did, $post, $post_type, $hashtags, $access_token = if ( $post_type === 'link' && isset( $post['post_url'] ) && ! empty( $post['post_url'] ) ) { $record['embed'] = array( - '$type' => 'app.bsky.embed.external', + '$type' => 'app.bsky.embed.external', 'external' => array( 'uri' => $post['post_url'], 'title' => isset( $post['title'] ) ? $post['title'] : '', @@ -324,7 +324,7 @@ public function create_post( $did, $post, $post_type, $hashtags, $access_token = if ( false !== $image_blob ) { $record['embed'] = array( - '$type' => 'app.bsky.embed.images', + '$type' => 'app.bsky.embed.images', 'images' => array( array( 'alt' => isset( $post['title'] ) ? $post['title'] : '', diff --git a/includes/admin/helpers/class-rop-content-helper.php b/includes/admin/helpers/class-rop-content-helper.php index d8cb3d076..31c5cb505 100644 --- a/includes/admin/helpers/class-rop-content-helper.php +++ b/includes/admin/helpers/class-rop-content-helper.php @@ -115,7 +115,7 @@ public function token_truncate( $string, $new_length = false ) { $parts_count = count( $parts ); $length = 0; - for ( $last_part = 0; $last_part < $parts_count; ++ $last_part ) { + for ( $last_part = 0; $last_part < $parts_count; ++$last_part ) { $length += strlen( $parts[ $last_part ] ); if ( $length > $this->length ) { break; @@ -155,7 +155,7 @@ public function token_truncate( $string, $new_length = false ) { public function mark_hashtags( $string, $hashtag ) { $location = stripos( $string, ' ' . $hashtag . ' ' ); if ( $location !== false ) { - $location ++; // the actual # location will be past the space + ++$location; // the actual # location will be past the space } elseif ( stripos( $string, $hashtag . ' ' ) === 0 ) { // see if the hashtag is at the beginning $location = 0; @@ -169,5 +169,4 @@ public function mark_hashtags( $string, $hashtag ) { return false; } - } diff --git a/includes/admin/helpers/class-rop-cron-helper.php b/includes/admin/helpers/class-rop-cron-helper.php index 3ed2faddb..12ac06190 100644 --- a/includes/admin/helpers/class-rop-cron-helper.php +++ b/includes/admin/helpers/class-rop-cron-helper.php @@ -277,7 +277,7 @@ public static function get_schedule_key( $namespace ) { * * @since 8.5.0 */ - function cron_status_global_change( $action = false ) { + public function cron_status_global_change( $action = false ) { $key = 'rop_is_sharing_cron_active'; $cron_status = ( true === $action ) ? 'yes' : 'no'; @@ -296,7 +296,6 @@ public function get_status() { } else { return is_int( $this->is_scheduled( self::CRON_NAMESPACE ) ); } - } /** diff --git a/includes/admin/helpers/class-rop-db-upgrade.php b/includes/admin/helpers/class-rop-db-upgrade.php index ce9c0f902..67f338ffa 100644 --- a/includes/admin/helpers/class-rop-db-upgrade.php +++ b/includes/admin/helpers/class-rop-db-upgrade.php @@ -57,7 +57,6 @@ public function is_upgrade_required() { return false; } - } /** @@ -177,7 +176,6 @@ public function migrate_accounts() { $this->migrate_post_formats( $active_accounts ); } }// End if(). - } /** @@ -471,5 +469,4 @@ function ( $d ) use ( $column_key, $index_key ) { $cron->create_cron( true ); } } - } diff --git a/includes/admin/helpers/class-rop-exception-handler.php b/includes/admin/helpers/class-rop-exception-handler.php index e8316775e..708686e4a 100644 --- a/includes/admin/helpers/class-rop-exception-handler.php +++ b/includes/admin/helpers/class-rop-exception-handler.php @@ -91,8 +91,7 @@ public function throw_exception( $header, $message ) { } header( 'HTTP/1.0 ' . $header ); $backtrace = wp_debug_backtrace_summary(); - echo $message . ' BackTrace: ' . $backtrace; + echo esc_html( $message ) . ' BackTrace: ' . esc_html( $backtrace ); exit; } - } diff --git a/includes/admin/helpers/class-rop-log-handler.php b/includes/admin/helpers/class-rop-log-handler.php index c866adfa9..ed5be4571 100644 --- a/includes/admin/helpers/class-rop-log-handler.php +++ b/includes/admin/helpers/class-rop-log-handler.php @@ -19,7 +19,7 @@ class Rop_Log_Handler { * * @var array $current_logs List of logs. */ - static private $current_logs; + private static $current_logs; /** * Hold initialization status. * diff --git a/includes/admin/helpers/class-rop-post-format-helper.php b/includes/admin/helpers/class-rop-post-format-helper.php index bffaeacc2..283dcecaa 100644 --- a/includes/admin/helpers/class-rop-post-format-helper.php +++ b/includes/admin/helpers/class-rop-post-format-helper.php @@ -63,14 +63,12 @@ class Rop_Post_Format_Helper { public function get_formated_object( $post_id, $account_id = 0 ) { if ( ! empty( $account_id ) ) { $this->set_post_format( $account_id ); - } else { - if ( empty( $this->post_format ) ) { + } elseif ( empty( $this->post_format ) ) { return array(); - } } if ( function_exists( 'icl_object_id' ) || class_exists( 'TRP_Translate_Press' ) ) { - $selector = new Rop_Posts_Selector_Model; + $selector = new Rop_Posts_Selector_Model(); $post_id = $selector->rop_wpml_id( $post_id, $this->account_id ); } @@ -153,7 +151,7 @@ public function build_content( $post_id ) { $max_length = $this->post_format['maximum_length']; if ( class_exists( 'Rop_Pro_Post_Format_Helper' ) && 0 < apply_filters( 'rop_pro_plan', -1 ) ) { - $pro_format_helper = new Rop_Pro_Post_Format_Helper; + $pro_format_helper = new Rop_Pro_Post_Format_Helper(); if ( method_exists( $pro_format_helper, 'set_content_helper' ) ) { $pro_format_helper->set_content_helper( $content_helper ); @@ -274,7 +272,6 @@ public function build_content( $post_id ) { ); return $response; - } /** @@ -417,7 +414,6 @@ private function get_custom_length() { } return $this->string_length( $this->post_format['custom_text'] ) + 1; // For the extra space - } /** @@ -496,7 +492,7 @@ function ( $value ) { foreach ( $result as $hashtag ) { if ( $content_helper->mark_hashtags( $content, $hashtag ) !== false && 'tumblr' !== $service ) { // if the hashtag exists in $content $content = $content_helper->mark_hashtags( $content, $hashtag ); // simply add a # there - $hashtags_length --; // subtract 1 for the # we added to $content + --$hashtags_length; // subtract 1 for the # we added to $content } elseif ( $this->string_length( $hashtag . $hashtags ) <= $hashtags_length || $hashtags_length == 0 ) { $hashtags = $hashtags . ' #' . preg_replace( '/-/', '', $hashtag ); } @@ -507,7 +503,6 @@ function ( $value ) { 'hashtags' => $hashtags, 'content' => $content, ); - } /** @@ -540,7 +535,7 @@ private function get_common_hashtags() { private function get_categories_hashtags( $post_id ) { if ( class_exists( 'Rop_Pro_Post_Format_Helper' ) && 0 < apply_filters( 'rop_pro_plan', -1 ) ) { - $pro_format_helper = new Rop_Pro_Post_Format_Helper; + $pro_format_helper = new Rop_Pro_Post_Format_Helper(); } if ( ! isset( $pro_format_helper ) ) { @@ -553,7 +548,6 @@ private function get_categories_hashtags( $post_id ) { } else { return $pro_format_helper->pro_get_categories_hashtags( $post_id ); } - } /** @@ -569,7 +563,7 @@ private function get_categories_hashtags( $post_id ) { private function get_tags_hashtags( $post_id ) { if ( class_exists( 'Rop_Pro_Post_Format_Helper' ) && 0 < apply_filters( 'rop_pro_plan', -1 ) ) { - $pro_format_helper = new Rop_Pro_Post_Format_Helper; + $pro_format_helper = new Rop_Pro_Post_Format_Helper(); } if ( ! isset( $pro_format_helper ) ) { @@ -582,7 +576,6 @@ private function get_tags_hashtags( $post_id ) { } else { return $pro_format_helper->pro_get_tags_hashtags( $post_id ); } - } /** @@ -792,7 +785,7 @@ public static function valid_hashtag_regex() { private function append_custom_text( $content, $post_id ) { if ( class_exists( 'Rop_Pro_Post_Format_Helper' ) && 0 < apply_filters( 'rop_pro_plan', -1 ) ) { - $pro_format_helper = new Rop_Pro_Post_Format_Helper; + $pro_format_helper = new Rop_Pro_Post_Format_Helper(); if ( method_exists( $pro_format_helper, 'set_content_helper' ) ) { $pro_format_helper->set_content_helper( new Rop_Content_Helper() ); @@ -845,7 +838,7 @@ public function build_url( $post_id ) { // WPML compatibility if ( function_exists( 'icl_object_id' ) || class_exists( 'TRP_Translate_Press' ) ) { - $selector = new Rop_Posts_Selector_Model; + $selector = new Rop_Posts_Selector_Model(); $post_url = $selector->rop_wpml_link( $post_url, $this->account_id ); } @@ -924,7 +917,6 @@ public function rop_prepare_utm_link( $post_url, $free = true ) { } return $post_url; - } /** @@ -1098,5 +1090,4 @@ private function get_translate_content( $content ) { $translation_render = $trp->get_component( 'translation_render' ); return $translation_render->translate_page( $content ); } - } diff --git a/includes/admin/models/class-rop-api-response.php b/includes/admin/models/class-rop-api-response.php index 4fa724319..fee5a0174 100644 --- a/includes/admin/models/class-rop-api-response.php +++ b/includes/admin/models/class-rop-api-response.php @@ -198,6 +198,4 @@ public function to_array() { 'data' => $this->data, ); } - - } diff --git a/includes/admin/models/class-rop-post-format-model.php b/includes/admin/models/class-rop-post-format-model.php index ee910a2ff..12097db2b 100644 --- a/includes/admin/models/class-rop-post-format-model.php +++ b/includes/admin/models/class-rop-post-format-model.php @@ -115,7 +115,6 @@ public function add_update_post_format( $account_id, $data ) { $data = wp_parse_args( $data, $this->defaults ); $this->post_format[ $account_id ] = $data; $this->set( 'post_format', $this->post_format ); - } /** @@ -133,5 +132,4 @@ public function remove_post_format( $account_id ) { $this->set( 'post_format', $this->post_format ); } - } diff --git a/includes/admin/models/class-rop-posts-selector-model.php b/includes/admin/models/class-rop-posts-selector-model.php index 95a6b976e..ca93dcb63 100644 --- a/includes/admin/models/class-rop-posts-selector-model.php +++ b/includes/admin/models/class-rop-posts-selector-model.php @@ -102,7 +102,7 @@ public function get_taxonomies( $data = array() ) { if ( ( function_exists( 'icl_object_id' ) || class_exists( 'TRP_Translate_Press' ) ) && empty( $language_code ) ) { // check the first active account and it's post format and see if it has a language code. $first_account_id = array_keys( $this->data['active_accounts'] )[0]; - $post_format_model = new Rop_Post_Format_Model; + $post_format_model = new Rop_Post_Format_Model(); $post_format = $post_format_model->get_post_format( $first_account_id ); $first_account_lang = ! empty( $post_format['wpml_language'] ) ? $post_format['wpml_language'] : ''; @@ -220,7 +220,12 @@ public function get_posts( $selected_post_types, $taxonomies, $exclude, $search $args['post__in'] = $excluded; } else { $post_types = $this->build_post_types( $selected_post_types ); - $tax_queries = $this->build_tax_query( array( 'taxonomies' => $taxonomies, 'exclude' => $exclude ) ); + $tax_queries = $this->build_tax_query( + array( + 'taxonomies' => $taxonomies, + 'exclude' => $exclude, + ) + ); $args['post_type'] = $post_types; $args['tax_query'] = $tax_queries; } @@ -388,7 +393,7 @@ public function select( $account_id = false ) { } elseif ( empty( $results ) && $this->has_buffer_items( $account_id ) && ! $this->settings->get_more_than_once() ) { - $service = new Rop_Services_Model; + $service = new Rop_Services_Model(); $log = new Rop_Logger(); $accounts = get_option( 'rop_one_time_share_accounts' ); @@ -469,7 +474,7 @@ private function query_results( $account_id, $post_types, $tax_queries, $exclude */ $posts = array_diff( $posts, $exclude ); - $number_of_posts_to_share = ( new Rop_Settings_Model )->get_number_of_posts(); + $number_of_posts_to_share = ( new Rop_Settings_Model() )->get_number_of_posts(); $events_per_account = Rop_Scheduler_Model::EVENTS_PER_ACCOUNT; /** @@ -578,11 +583,11 @@ private function build_query_args( $post_types, $tax_queries, $exclude ) { } $min_age = $this->settings->get_minimum_post_age(); if ( ! empty( $min_age ) ) { - $args['date_query'][]['before'] = date( 'Y-m-d', strtotime( '-' . $this->settings->get_minimum_post_age() . ' days' ) ); + $args['date_query'][]['before'] = gmdate( 'Y-m-d', strtotime( '-' . $this->settings->get_minimum_post_age() . ' days' ) ); } $max_age = $this->settings->get_maximum_post_age(); if ( ! empty( $max_age ) ) { - $args['date_query'][]['after'] = date( 'Y-m-d', strtotime( '-' . $this->settings->get_maximum_post_age() . ' days' ) ); + $args['date_query'][]['after'] = gmdate( 'Y-m-d', strtotime( '-' . $this->settings->get_maximum_post_age() . ' days' ) ); } if ( ! empty( $args['date_query'] ) ) { $args['date_query']['relation'] = 'AND'; @@ -640,7 +645,6 @@ public function buffer_has_post_id( $account_id, $post_id ) { } return false; - } /** @@ -820,7 +824,6 @@ public function rop_wpml_id( $post_id, $account_id = '' ) { // Return original passed in post id if none of the conditions are met. return $post_id; } - } /** diff --git a/includes/admin/models/class-rop-queue-model.php b/includes/admin/models/class-rop-queue-model.php index ab7f32c28..1cde1cac1 100644 --- a/includes/admin/models/class-rop-queue-model.php +++ b/includes/admin/models/class-rop-queue-model.php @@ -180,7 +180,6 @@ public function ban_post( $post_id, $account_id ) { $this->update_queue( $queue ); return true; - } /** @@ -259,7 +258,7 @@ public function get_queue() { unset( $post_pool[ $rand_key ] ); $post_pool = array_values( $post_pool ); - $i++; + ++$i; } @@ -382,7 +381,7 @@ public function build_queue_publish_now() { 'custom_instant_share_message' => $custom_instant_share_message, ); } - $index ++; + ++$index; } return $normalized_queue; @@ -480,6 +479,4 @@ public function skip_post( $post_id, $account_id ) { return true; } - - } diff --git a/includes/admin/models/class-rop-scheduler-model.php b/includes/admin/models/class-rop-scheduler-model.php index e138d5807..94ffb52fc 100644 --- a/includes/admin/models/class-rop-scheduler-model.php +++ b/includes/admin/models/class-rop-scheduler-model.php @@ -149,14 +149,14 @@ public function create_schedule( $schedule_data = array() ) { * * @param int $timestamp Timestamp to format. * - * @return int + * @return string */ public static function get_date( $timestamp = 0 ) { if ( empty( $timestamp ) ) { $timestamp = self::get_current_time(); } - return date( self::get_date_format(), $timestamp ); + return gmdate( self::get_date_format(), $timestamp ); } /** @@ -199,7 +199,6 @@ public function add_update_schedule( $account_id, $schedule_data = false ) { $this->set( 'schedules', $this->schedules ); // Refresh events when we change the schedule. $this->refresh_events( $account_id ); - } /** @@ -302,14 +301,13 @@ function ( $value ) use ( &$prev ) { $prev = $value; return true; - } ); $current_events[ $account_id ] = $events; $this->update_timeline( $current_events ); - $retry ++; + ++$retry; if ( empty( $events ) && 0 === $retry ) { $events = $this->get_upcoming_events( $account_id, $retry ); } @@ -350,7 +348,7 @@ public function generate_upcoming_events( $base = 0, $account_id = null, $limit */ if ( ( time() - $this->start_time ) < 15 ) { array_push( $list, self::get_current_time() + 20 ); - $limit --; + --$limit; } if ( $schedule['type'] === 'recurring' ) { @@ -359,7 +357,7 @@ public function generate_upcoming_events( $base = 0, $account_id = null, $limit */ $time = $this->convert_float_to_time( $schedule['interval_r'] ); $event_time = $base; - for ( $i = 0; $i < $limit; $i ++ ) { + for ( $i = 0; $i < $limit; $i++ ) { $event_time = $this->add_to_time( $event_time, $time['hours'], $time['minutes'] ); array_push( $list, $event_time ); } @@ -419,7 +417,7 @@ function ( $time ) { if ( $i === $limit ) { break; } - $i ++; + ++$i; array_push( $list, $event_time ); } @@ -526,7 +524,7 @@ private function get_week_start( $start = 0 ) { if ( empty( $start ) ) { $start = self::get_current_time(); } - $strtotime = date( 'o-\WW', $start ); + $strtotime = gmdate( 'o-\WW', $start ); $start = strtotime( $strtotime ); return intval( $start ); @@ -535,8 +533,8 @@ private function get_week_start( $start = 0 ) { /** * Update the events timeline. * - * @param $new_events $new_events New events timeline. - * @param string $account_id account id. + * @param array' . esc_html( $variation_title ) . '
'; + echo '' . esc_html( $label_remove_variation ) . '
'; + } + echo ''; +} +?> + - + -- {$label_variation_number}{$i} -
-- {$label_new_variation} -
-- {$label_new_variation} -
-- + -
+ \ No newline at end of file diff --git a/includes/class-rop-activator.php b/includes/class-rop-activator.php index 29936369d..dec9adb7e 100644 --- a/includes/class-rop-activator.php +++ b/includes/class-rop-activator.php @@ -46,7 +46,6 @@ public static function activate() { self::rop_create_install_token(); self::rop_set_first_install_date(); - } /** @@ -63,10 +62,9 @@ private static function rop_create_install_token() { $url = get_site_url(); - $token = hash( 'ripemd160', $url . date( 'Y-m-d H:i:s' ) ); + $token = hash( 'ripemd160', $url . gmdate( 'Y-m-d H:i:s' ) ); update_option( ROP_INSTALL_TOKEN_OPTION, $token, false ); - } /** @@ -84,5 +82,4 @@ private static function rop_set_first_install_date() { add_option( 'rop_first_install_date', $install_date, '', 'yes' ); } } - } diff --git a/includes/class-rop-deactivator.php b/includes/class-rop-deactivator.php index cd52ac561..e0a6ce508 100644 --- a/includes/class-rop-deactivator.php +++ b/includes/class-rop-deactivator.php @@ -35,7 +35,5 @@ public static function deactivate() { */ $cron_helper = new Rop_Cron_Helper(); $cron_helper->remove_cron(); - } - } diff --git a/includes/class-rop-i18n.php b/includes/class-rop-i18n.php index 338b1f06d..270cb77b3 100644 --- a/includes/class-rop-i18n.php +++ b/includes/class-rop-i18n.php @@ -45,7 +45,6 @@ public function load_plugin_textdomain() { dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' ); add_filter( 'rop_available_services', array( $this, 'load_service_locals' ), 99 ); - } /** @@ -56,11 +55,11 @@ public function load_plugin_textdomain() { * @return mixed Services localized. */ public function load_service_locals( $services ) { - $services['facebook']['credentials']['secret']['description'] = Rop_I18n::get_labels( 'accounts.fb_app_secret_title' ); - $services['facebook']['credentials']['app_id']['description'] = Rop_I18n::get_labels( 'accounts.fb_app_id_title' ); - $services['facebook']['description'] = Rop_I18n::get_labels( 'accounts.fb_app_desc' ); - $services['twitter']['description'] = Rop_I18n::get_labels( 'accounts.twt_app_desc' ); - $services['telegram']['description'] = Rop_I18n::get_labels( 'accounts.tlg_app_desc' ); + $services['facebook']['credentials']['secret']['description'] = self::get_labels( 'accounts.fb_app_secret_title' ); + $services['facebook']['credentials']['app_id']['description'] = self::get_labels( 'accounts.fb_app_id_title' ); + $services['facebook']['description'] = self::get_labels( 'accounts.fb_app_desc' ); + $services['twitter']['description'] = self::get_labels( 'accounts.twt_app_desc' ); + $services['telegram']['description'] = self::get_labels( 'accounts.tlg_app_desc' ); return $services; } @@ -80,6 +79,7 @@ public static function get_labels( $key = '' ) { 'service_popup_title' => __( 'Service Credentials', 'tweet-old-post' ), 'show_advance_config' => __( 'Use your own keys', 'tweet-old-post' ), 'show_own_keys_config' => __( 'Use my own API keys', 'tweet-old-post' ), + // translators: %1$s: network name (e.g. "X (Twitter)"). 'tw_app_signin_tooltip' => sprintf( __( 'Due to the %1$s changes in network limits, we cannot guarantee stable sharing using this mode. We recommend using your own API keys.', 'tweet-old-post' ), $tw_new_name ), 'tw_new_name' => $tw_new_name, 'fb_app_signin_btn' => __( 'Sign in to Facebook', 'tweet-old-post' ), @@ -89,7 +89,6 @@ public static function get_labels( $key = '' ) { 'gmb_app_signin_btn' => __( 'Sign in to Google My Business', 'tweet-old-post' ), 'vk_app_signin_btn' => __( 'Sign in to Vkontake', 'tweet-old-post' ), 'app_option_signin' => __( 'Or', 'tweet-old-post' ), - 'service_popup_title' => __( 'Service Credentials', 'tweet-old-post' ), 'sign_in_btn' => __( 'Sign In', 'tweet-old-post' ), 'field_required' => __( 'This field is required', 'tweet-old-post' ), 'at' => __( 'at', 'tweet-old-post' ), @@ -108,14 +107,18 @@ public static function get_labels( $key = '' ) { 'reset_selector_btn' => __( 'Reset', 'tweet-old-post' ), 'for' => __( 'for', 'tweet-old-post' ), 'add_account' => __( 'Add Your Accounts:', 'tweet-old-post' ), + // translators: 1: opening anchor tag, 2: closing anchor tag. 'upsell_accounts' => sprintf( __( 'A maximum of 1 Facebook and Twitter account can be connected to the Lite version of Revive Social. Upgrade to unlock more great features including more social networks! Check out the Lite vs Pro %1$stable here%2$s.', 'tweet-old-post' ), '', '' ), 'upsell_accounts_toggle' => 'Active accounts limit reached.', 'toggle_account' => __( 'Toggle account', 'tweet-old-post' ), 'activate_license' => __( 'You need to activate your license key to unlock the Pro features of Revive Social. Add your key on the sidebar.', 'tweet-old-post' ), 'fb_app_id_title' => __( 'Please add the APP ID from your Facebook app.', 'tweet-old-post' ), 'fb_app_secret_title' => __( 'Please add the APP SECRET from your Facebook app.', 'tweet-old-post' ), + // translators: 1: opening anchor tag, 2: closing anchor tag. 'fb_app_desc' => sprintf( __( 'You can check %1$shere%2$s for how to get these details.', 'tweet-old-post' ), '', '' ), + // translators: 1: opening anchor tag, 2: closing anchor tag. 'twt_app_desc' => sprintf( __( 'You can check %1$shere%2$s for how to get these details.', 'tweet-old-post' ), '', '' ), + // translators: %1$s: network/service name. 'service_error' => __( 'The %1$s service can not be used or was not found', 'tweet-old-post' ), 'twitter_warning' => __( ' @@ -128,189 +131,208 @@ public static function get_labels( $key = '' ) { 'only_in_pro' => __( 'Available in Pro', 'tweet-old-post' ), 'limit_reached' => __( 'Limit reached', 'tweet-old-post' ), 'upsell_upgrade_now' => __( 'Upgrade to PRO', 'tweet-old-post' ), + // translators: %1$s: network name (e.g. "X (Twitter)"). 'upsell_extra_network' => __( 'Sharing to %1$s', 'tweet-old-post' ), + // translators: %1$s: network/service name. 'upsell_extra_account' => __( 'Sharing to Additional %1$s Accounts', 'tweet-old-post' ), + // translators: %1$s: network/service name. 'upsell_service_title' => __( '%1$s is a PRO feature', 'tweet-old-post' ), + // translators: %1$s: network/service name. 'upsell_service_body' => __( 'We\'re sorry, %1$s is not available on your plan. Please upgrade to the Pro plan to unlock all these features and get more traffic.', 'tweet-old-post' ), 'edit_headers' => __( 'Edit Headers', 'tweet-old-post' ), 'hide' => __( 'Hide', 'tweet-old-post' ), 'get_latest_pro_version' => __( 'Get the latest Pro version to unlock.', 'tweet-old-post' ), + // translators: %1$s: opening anchor tag, %2$s: closing anchor tag. 'tlg_app_desc' => sprintf( __( 'You can check %1$shere%2$s for how to get these details.', 'tweet-old-post' ), '', '' ), + // translators: %1$s: network/service name. 'upsell_bz_service_body' => __( 'We\'re sorry, %1$s is not available on your plan. Please upgrade to the business plan to unlock all these features and get more traffic.', 'tweet-old-post' ), 'search_account' => __( 'Search account', 'tweet-old-post' ), 'no_account_found' => __( 'No account found for search', 'tweet-old-post' ), ), 'settings' => array( - 'yes_text' => __( 'Yes', 'tweet-old-post' ), - 'available_in_pro' => __( ' This feature is only available in the Pro version.', 'tweet-old-post' ), - 'post_types_exclude_limit' => sprintf( __( 'Upgrade to Pro version to select more than 30 posts. You can upgrade %1$shere%2$s.', 'tweet-old-post' ), '', '' ), + 'yes_text' => __( 'Yes', 'tweet-old-post' ), + 'available_in_pro' => __( ' This feature is only available in the Pro version.', 'tweet-old-post' ), + // translators: %1$s: opening anchor tag (upgrade link), %2$s: closing anchor tag. + 'post_types_exclude_limit' => sprintf( __( 'Upgrade to Pro version to select more than 30 posts. You can upgrade %1$shere%2$s.', 'tweet-old-post' ), '', '' ), 'post_types_exclude_limit_tooltip' => __( 'Upgrade to Pro version to select more than 30 posts.', 'tweet-old-post' ), - 'menu_item' => __( 'General Settings', 'tweet-old-post' ), - 'min_interval_title' => __( 'Minimum Interval Between Shares', 'tweet-old-post' ), - 'min_interval_desc' => __( 'How many hours between each share?', 'tweet-old-post' ), - 'min_days_title' => __( 'Minimum Post Age', 'tweet-old-post' ), - 'min_days_desc' => __( 'Minimum age of posts available for sharing, in days.', 'tweet-old-post' ), - 'max_days_title' => __( 'Maximum Post Age', 'tweet-old-post' ), - 'max_days_desc' => __( 'Maximum age of posts available for sharing, in days.', 'tweet-old-post' ), - 'no_posts_title' => __( 'Number of Posts', 'tweet-old-post' ), - 'no_posts_desc' => __( 'Number of posts to share per account when a share occurs.', 'tweet-old-post' ), - 'share_once_title' => __( 'Share More Than Once?', 'tweet-old-post' ), - 'share_once_desc' => __( + 'menu_item' => __( 'General Settings', 'tweet-old-post' ), + 'min_interval_title' => __( 'Minimum Interval Between Shares', 'tweet-old-post' ), + 'min_interval_desc' => __( 'How many hours between each share?', 'tweet-old-post' ), + 'min_days_title' => __( 'Minimum Post Age', 'tweet-old-post' ), + 'min_days_desc' => __( 'Minimum age of posts available for sharing, in days.', 'tweet-old-post' ), + 'max_days_title' => __( 'Maximum Post Age', 'tweet-old-post' ), + 'max_days_desc' => __( 'Maximum age of posts available for sharing, in days.', 'tweet-old-post' ), + 'no_posts_title' => __( 'Number of Posts', 'tweet-old-post' ), + 'no_posts_desc' => __( 'Number of posts to share per account when a share occurs.', 'tweet-old-post' ), + 'share_once_title' => __( 'Share More Than Once?', 'tweet-old-post' ), + 'share_once_desc' => __( 'If all available posts have been shared to your active accounts, should we automatically restart the sharing?', 'tweet-old-post' ), - 'post_types_title' => __( 'Post Types', 'tweet-old-post' ), - 'post_types_taxonomy_limit' => sprintf( __( 'Upgrade to Pro version to select more than 4 taxonomies. You can upgrade %1$shere%2$s.', 'tweet-old-post' ), '', '' ), - 'post_types_attachament_info' => sprintf( __( 'You need to select the media files which you want to share, find out more information %1$shere%2$s.', 'tweet-old-post' ), '', '' ), - 'post_types_desc' => __( 'Which post types should Revive Social share? Learn more.', 'tweet-old-post' ), - 'update_post_published_date_title' => __( 'Update Post Published Date After Share', 'tweet-old-post' ), - 'update_post_published_date_desc' => sprintf( __( 'Update the post published date after it has been shared to your social media account. %1$sLearn more%2$s.', 'tweet-old-post' ), '', '' ), - 'filter_by_post_types_desc' => __( 'Filter posts list by Post Type', 'tweet-old-post' ), - 'post_types_upsell' => __( + 'post_types_title' => __( 'Post Types', 'tweet-old-post' ), + // translators: %1$s: opening anchor tag, %2$s: closing anchor tag. + 'post_types_taxonomy_limit' => sprintf( __( 'Upgrade to Pro version to select more than 4 taxonomies. You can upgrade %1$shere%2$s.', 'tweet-old-post' ), '', '' ), + // translators: %1$s: opening anchor tag, %2$s: closing anchor tag. + 'post_types_attachament_info' => sprintf( __( 'You need to select the media files which you want to share, find out more information %1$shere%2$s.', 'tweet-old-post' ), '', '' ), + 'post_types_desc' => __( 'Which post types should Revive Social share? Learn more.', 'tweet-old-post' ), + 'update_post_published_date_title' => __( 'Update Post Published Date After Share', 'tweet-old-post' ), + // translators: %1$s: opening anchor tag (learn more), %2$s: closing anchor tag. + 'update_post_published_date_desc' => sprintf( __( 'Update the post published date after it has been shared to your social media account. %1$sLearn more%2$s.', 'tweet-old-post' ), '', '' ), + 'filter_by_post_types_desc' => __( 'Filter posts list by Post Type', 'tweet-old-post' ), + 'post_types_upsell' => __( 'Selecting custom post types is available in the Pro version.', 'tweet-old-post' ), - 'taxonomies_title' => __( 'Taxonomies', 'tweet-old-post' ), - 'taxonomies_desc' => __( + 'taxonomies_title' => __( 'Taxonomies', 'tweet-old-post' ), + // translators: %1$s: opening anchor tag (learn more), %2$s: closing anchor tag. + 'taxonomies_desc' => __( 'Taxonomies available for the selected post types. Use to include or exclude posts. Learn more.', 'tweet-old-post' ), - 'filter_by_taxonomies_desc' => __( 'Filter posts list by Taxonomy', 'tweet-old-post' ), - 'taxonomies_exclude' => __( 'Exclude?', 'tweet-old-post' ), - 'posts_title' => __( 'Posts', 'tweet-old-post' ), - 'posts_desc' => __( 'Posts excluded from sharing, filtered based on previous selections.', 'tweet-old-post' ), - 'ga_title' => __( 'Enable Google Analytics Tracking', 'tweet-old-post' ), - 'ga_desc' => __( + 'filter_by_taxonomies_desc' => __( 'Filter posts list by Taxonomy', 'tweet-old-post' ), + 'taxonomies_exclude' => __( 'Exclude?', 'tweet-old-post' ), + 'posts_title' => __( 'Posts', 'tweet-old-post' ), + 'posts_desc' => __( 'Posts excluded from sharing, filtered based on previous selections.', 'tweet-old-post' ), + 'ga_title' => __( 'Enable Google Analytics Tracking', 'tweet-old-post' ), + 'ga_desc' => __( 'If checked, UTM query tags will be added to URL of shares so that you can better track traffic from Revive Social.', 'tweet-old-post' ), - 'custom_share_title' => __( 'Enable Share Content Variations', 'tweet-old-post' ), - 'custom_share_desc' => __( 'These messages will override the Post Content option in Post Format settings. You can go to each post and add multiple share content variations. Learn more.', 'tweet-old-post' ), - 'custom_share_order_title' => __( 'Share Message Variations In the Order They Are Added.', 'tweet-old-post' ), - 'custom_share_order_desc' => __( 'By default message variations are shared randomly. Checking this box will cause them to share in the order they were added.', 'tweet-old-post' ), - 'instant_share_title' => __( 'Enable Instant Sharing Feature (Post on Publish)', 'tweet-old-post' ), - 'instant_share_desc' => __( 'Allows you to share posts immediately on publish/update. Learn more.', 'tweet-old-post' ), - 'instant_share_default_title' => __( 'Enable Instant Sharing By Default', 'tweet-old-post' ), - 'instant_share_default_desc' => __( 'Instant sharing option will be checked by default when creating new posts.', 'tweet-old-post' ), - 'cron_type_label' => __( 'Cron Job Type', 'tweet-old-post' ), - 'cron_type_label_desc' => sprintf( __( 'Select the between your local built-in WordPress task scheduler, or Revive Social\'s, %1$sLearn More%2$s.', 'tweet-old-post' ), '', '' ), - 'cron_type_label_desc_terms' => __( 'I understand that some site data is stored on the Revive Social\'s Remote Cron System to provide this service Read More Here.', 'tweet-old-post' ), - 'cron_type_notice' => sprintf( __( '%1$sNOTE:%2$s This is a BETA Remote Cron feature to be used mainly if your %1$sposts aren\'t sharing%2$s. If the Remote Cron feature is used, and you notice that your posts are still not sharing, then please %1$sturn the setting back to "Local Cron"%2$s and read the following guide for alternative solutions that are sure to work: %1$s%3$sLearn More%4$s%2$s.', 'tweet-old-post' ), '', '', '', '' ), - 'housekeeping' => __( 'Housekeeping', 'tweet-old-post' ), - 'housekeeping_desc' => __( 'Should we delete all saved settings on deletion of the Revive Social plugin?', 'tweet-old-post' ), - 'save' => __( 'Save', 'tweet-old-post' ), - 'taxonomies_exclude_explicit' => __( 'Exclude taxononmies', 'tweet-old-post' ), - 'save_filters' => __( 'Save filters', 'tweet-old-post' ), - 'search_posts_to_exclude' => __( 'Search post to exclude...', 'tweet-old-post' ), - 'search_posts_show_excluded' => __( 'Show only excluded posts', 'tweet-old-post' ), - 'exclude_matching' => __( 'Exclude all matching', 'tweet-old-post' ), - 'include_single_post' => __( 'Include this post', 'tweet-old-post' ), - 'exclude_single_post' => __( 'Exclude this post', 'tweet-old-post' ), - 'no_posts_found' => __( 'No posts found.', 'tweet-old-post' ), - 'load_more_posts' => __( 'Load more posts.', 'tweet-old-post' ), - 'min_interval_upsell' => __( 'Choosing a lower interval is available in the Pro version.', 'tweet-old-post' ), - 'tracking_field' => __( 'Contributing', 'tweet-old-post' ), - 'tracking' => __( 'Send anonymous data to help us understand how you use the plugin.', 'tweet-old-post' ), - 'tracking_info' => __( 'What do we track?', 'tweet-old-post' ), + 'custom_share_title' => __( 'Enable Share Content Variations', 'tweet-old-post' ), + 'custom_share_desc' => __( 'These messages will override the Post Content option in Post Format settings. You can go to each post and add multiple share content variations. Learn more.', 'tweet-old-post' ), + 'custom_share_order_title' => __( 'Share Message Variations In the Order They Are Added.', 'tweet-old-post' ), + 'custom_share_order_desc' => __( 'By default message variations are shared randomly. Checking this box will cause them to share in the order they were added.', 'tweet-old-post' ), + 'instant_share_title' => __( 'Enable Instant Sharing Feature (Post on Publish)', 'tweet-old-post' ), + 'instant_share_desc' => __( 'Allows you to share posts immediately on publish/update. Learn more.', 'tweet-old-post' ), + 'instant_share_default_title' => __( 'Enable Instant Sharing By Default', 'tweet-old-post' ), + 'instant_share_default_desc' => __( 'Instant sharing option will be checked by default when creating new posts.', 'tweet-old-post' ), + 'cron_type_label' => __( 'Cron Job Type', 'tweet-old-post' ), + // translators: %1$s: opening anchor tag, %2$s: closing anchor tag. + 'cron_type_label_desc' => sprintf( __( 'Select the between your local built-in WordPress task scheduler, or Revive Social\'s, %1$sLearn More%2$s.', 'tweet-old-post' ), '', '' ), + 'cron_type_label_desc_terms' => __( 'I understand that some site data is stored on the Revive Social\'s Remote Cron System to provide this service Read More Here.', 'tweet-old-post' ), + // translators: %1$s: opening strong tag, %2$s: closing strong tag, %3$s: opening anchor tag with documentation link, %4$s: closing anchor tag. + 'cron_type_notice' => sprintf( __( '%1$sNOTE:%2$s This is a BETA Remote Cron feature to be used mainly if your %1$sposts aren\'t sharing%2$s. If the Remote Cron feature is used, and you notice that your posts are still not sharing, then please %1$sturn the setting back to "Local Cron"%2$s and read the following guide for alternative solutions that are sure to work: %1$s%3$sLearn More%4$s%2$s.', 'tweet-old-post' ), '', '', '', '' ), + 'housekeeping' => __( 'Housekeeping', 'tweet-old-post' ), + 'housekeeping_desc' => __( 'Should we delete all saved settings on deletion of the Revive Social plugin?', 'tweet-old-post' ), + 'save' => __( 'Save', 'tweet-old-post' ), + 'taxonomies_exclude_explicit' => __( 'Exclude taxononmies', 'tweet-old-post' ), + 'save_filters' => __( 'Save filters', 'tweet-old-post' ), + 'search_posts_to_exclude' => __( 'Search post to exclude...', 'tweet-old-post' ), + 'search_posts_show_excluded' => __( 'Show only excluded posts', 'tweet-old-post' ), + 'exclude_matching' => __( 'Exclude all matching', 'tweet-old-post' ), + 'include_single_post' => __( 'Include this post', 'tweet-old-post' ), + 'exclude_single_post' => __( 'Exclude this post', 'tweet-old-post' ), + 'no_posts_found' => __( 'No posts found.', 'tweet-old-post' ), + 'load_more_posts' => __( 'Load more posts.', 'tweet-old-post' ), + 'min_interval_upsell' => __( 'Choosing a lower interval is available in the Pro version.', 'tweet-old-post' ), + 'tracking_field' => __( 'Contributing', 'tweet-old-post' ), + 'tracking' => __( 'Send anonymous data to help us understand how you use the plugin.', 'tweet-old-post' ), + 'tracking_info' => __( 'What do we track?', 'tweet-old-post' ), ), 'post_format' => array( - 'yes_text' => __( 'Yes', 'tweet-old-post' ), - 'menu_item' => __( 'Post Format', 'tweet-old-post' ), + 'yes_text' => __( 'Yes', 'tweet-old-post' ), + 'menu_item' => __( 'Post Format', 'tweet-old-post' ), 'language_title' => __( 'Language', 'tweet-old-post' ), - 'language_title_desc' => __( 'We\'ve detected that this is a multilingual website. Select the post language you want to share to this account.', 'tweet-old-post' ), - 'post_content_title' => __( 'Share Content', 'tweet-old-post' ), - 'post_content_desc' => __( 'Which part of the post should we use as the caption?', 'tweet-old-post' ), - 'post_content_option_title' => __( 'Post Title', 'tweet-old-post' ), - 'post_content_option_content' => __( 'Post Content', 'tweet-old-post' ), - 'post_content_option_title_content' => __( 'Post Title & Content', 'tweet-old-post' ), - 'post_content_option_excerpt' => __( 'Post Excerpt', 'tweet-old-post' ), - 'post_content_option_custom_field' => __( 'Custom Field', 'tweet-old-post' ), - 'post_content_option_custom_content' => __( 'Custom Content', 'tweet-old-post' ), - 'post_content_option_yoast_seo_title' => __( 'Yoast SEO Title', 'tweet-old-post' ), + 'language_title_desc' => __( 'We\'ve detected that this is a multilingual website. Select the post language you want to share to this account.', 'tweet-old-post' ), + 'post_content_title' => __( 'Share Content', 'tweet-old-post' ), + 'post_content_desc' => __( 'Which part of the post should we use as the caption?', 'tweet-old-post' ), + 'post_content_option_title' => __( 'Post Title', 'tweet-old-post' ), + 'post_content_option_content' => __( 'Post Content', 'tweet-old-post' ), + 'post_content_option_title_content' => __( 'Post Title & Content', 'tweet-old-post' ), + 'post_content_option_excerpt' => __( 'Post Excerpt', 'tweet-old-post' ), + 'post_content_option_custom_field' => __( 'Custom Field', 'tweet-old-post' ), + 'post_content_option_custom_content' => __( 'Custom Content', 'tweet-old-post' ), + 'post_content_option_yoast_seo_title' => __( 'Yoast SEO Title', 'tweet-old-post' ), 'post_content_option_yoast_seo_description' => __( 'Yoast SEO Description', 'tweet-old-post' ), 'post_content_option_yoast_seo_title_description' => __( 'Yoast SEO Title & Description', 'tweet-old-post' ), - 'custom_meta_title' => __( 'Custom Meta Field', 'tweet-old-post' ), - 'custom_meta_desc' => __( 'Meta field name from which to get the content.', 'tweet-old-post' ), - 'max_char_title' => __( 'Maximum Characters', 'tweet-old-post' ), - 'max_char_desc' => __( 'Maximum length of the message, in characters. Each letter is considered a character.', 'tweet-old-post' ), - 'add_char_title' => __( 'Additional Text', 'tweet-old-post' ), - 'add_char_title_custom_content' => __( 'Message Content', 'tweet-old-post' ), - 'override_share_variations' => __( 'Override Share Content Variations with the current content', 'tweet-old-post' ), - 'add_char_desc' => sprintf( __( 'Add custom content to shared posts. It supports magic tags in the Pro version of Revive Social %1$sLearn More%2$s', 'tweet-old-post' ), '', '' ), - 'add_char_placeholder' => __( '...written by {author} on {date}.', 'tweet-old-post' ), - 'add_char_placeholder_custom_content' => __( '{title} with {content} written by {author} on {date}.', 'tweet-old-post' ), - 'add_pos_title' => __( 'Choose where you want the Additional Text to appear.', 'tweet-old-post' ), - 'add_pos_option_start' => __( 'Beginning of Caption', 'tweet-old-post' ), - 'add_pos_option_end' => __( 'End of Caption', 'tweet-old-post' ), - 'add_link_title' => __( 'Include Link', 'tweet-old-post' ), - 'add_link_desc' => __( 'Should Revive Social include the post permalink or not?', 'tweet-old-post' ), - 'meta_link_title' => __( 'Custom Field', 'tweet-old-post' ), - 'meta_link_desc' => __( 'Fetch URL from custom field?', 'tweet-old-post' ), - 'meta_link_name_title' => __( 'Custom Field', 'tweet-old-post' ), - 'meta_link_name_desc' => __( 'Custom Field from which to get the URL.', 'tweet-old-post' ), + 'custom_meta_title' => __( 'Custom Meta Field', 'tweet-old-post' ), + 'custom_meta_desc' => __( 'Meta field name from which to get the content.', 'tweet-old-post' ), + 'max_char_title' => __( 'Maximum Characters', 'tweet-old-post' ), + 'max_char_desc' => __( 'Maximum length of the message, in characters. Each letter is considered a character.', 'tweet-old-post' ), + 'add_char_title' => __( 'Additional Text', 'tweet-old-post' ), + 'add_char_title_custom_content' => __( 'Message Content', 'tweet-old-post' ), + 'override_share_variations' => __( 'Override Share Content Variations with the current content', 'tweet-old-post' ), + // translators: %1$s: opening anchor tag, %2$s: closing anchor tag. + 'add_char_desc' => sprintf( __( 'Add custom content to shared posts. It supports magic tags in the Pro version of Revive Social %1$sLearn More%2$s', 'tweet-old-post' ), '', '' ), + 'add_char_placeholder' => __( '...written by {author} on {date}.', 'tweet-old-post' ), + 'add_char_placeholder_custom_content' => __( '{title} with {content} written by {author} on {date}.', 'tweet-old-post' ), + 'add_pos_title' => __( 'Choose where you want the Additional Text to appear.', 'tweet-old-post' ), + 'add_pos_option_start' => __( 'Beginning of Caption', 'tweet-old-post' ), + 'add_pos_option_end' => __( 'End of Caption', 'tweet-old-post' ), + 'add_link_title' => __( 'Include Link', 'tweet-old-post' ), + 'add_link_desc' => __( 'Should Revive Social include the post permalink or not?', 'tweet-old-post' ), + 'meta_link_title' => __( 'Custom Field', 'tweet-old-post' ), + 'meta_link_desc' => __( 'Fetch URL from custom field?', 'tweet-old-post' ), + 'meta_link_name_title' => __( 'Custom Field', 'tweet-old-post' ), + 'meta_link_name_desc' => __( 'Custom Field from which to get the URL.', 'tweet-old-post' ), 'taxonomy_based_sharing_upsell' => __( 'Per account Taxonomy filters feature is available in the Pro version (Personal Plan and higher).', 'tweet-old-post' ), 'message_custom_content_upsell' => __( 'Per account Custom Content feature is available in the Pro version (Personal Plan and higher).', 'tweet-old-post' ), - 'use_shortner_title' => __( 'Use URL Shortener', 'tweet-old-post' ), - 'use_shortner_desc' => __( 'Should we use a shortener when adding the links to the content?', 'tweet-old-post' ), - 'shortner_title' => __( 'URL Shortener Service', 'tweet-old-post' ), - 'shortner_desc' => __( 'Which service to use for URL shortening?', 'tweet-old-post' ), - 'shortner_api_field' => __( 'Service API', 'tweet-old-post' ), - 'shortner_field_desc_start' => __( 'Add the', 'tweet-old-post' ), - 'shortner_field_desc_end' => __( 'required by the', 'tweet-old-post' ), - 'hashtags_title' => __( 'Hashtags', 'tweet-old-post' ), - 'hashtags_desc' => __( 'Hashtags for published content.', 'tweet-old-post' ), - 'hashtags_option_no' => __( 'Don\'t add any hashtags', 'tweet-old-post' ), - 'hashtags_option_common' => __( 'Common hashtags for all shares', 'tweet-old-post' ), - 'hashtags_option_cats' => __( 'Create hashtags from categories', 'tweet-old-post' ), - 'hashtags_option_tags' => __( 'Create hashtags from tags', 'tweet-old-post' ), - 'hashtags_option_field' => __( 'Create hashtags from a custom field', 'tweet-old-post' ), - 'hastags_common_title' => __( 'Common Hashtags', 'tweet-old-post' ), - 'hastags_common_desc' => __( 'List of hastags to use separated by comma', 'tweet-old-post' ), - 'hastags_field_title' => __( 'Custom Hashtags', 'tweet-old-post' ), - 'hastags_field_desc' => __( 'The name of the meta field that contains the hashtags.', 'tweet-old-post' ), - 'hashtags_length_title' => __( 'Maximum Hashtags length', 'tweet-old-post' ), - 'hashtags_length_desc' => __( 'The maximum hashtags length to be used when publishing.', 'tweet-old-post' ), - 'hashtags_randomize' => __( 'Randomize hashtags', 'tweet-old-post' ), - 'hashtags_randomize_desc' => __( 'Randomize the list of hashtags on every successful share. You won\'t see this change in the Sharing Queue, the randomization happens at share time.', 'tweet-old-post' ), - 'image_title' => __( 'Share As Image Post', 'tweet-old-post' ), - 'image_desc' => __( 'Should Revive Social share your posts as an image post? Learn more.', 'tweet-old-post' ), - 'image_aspect_ratio_title' => __( 'Automatically correct aspect ratio', 'tweet-old-post' ), - 'image_aspect_ratio_title_desc' => __( 'Should Revive Social automatically crop images with the wrong aspect ratio? Learn more.', 'tweet-old-post' ), - 'utm_campaign_medium' => __( 'Campaign Medium', 'tweet-old-post' ), - 'utm_campaign_medium_desc' => __( 'The marketing medium you want to show in Google Analytics e.g: "social", "website", etc.', 'tweet-old-post' ), - 'utm_campaign_name' => __( 'Campaign Name', 'tweet-old-post' ), - 'utm_campaign_name_desc' => __( 'The campaign name you want to show in Google Analytics e.g: "november_sale" etc.', 'tweet-old-post' ), - 'custom_utm_upsell' => __( 'Custom UTMs are only available in the Pro version.', 'tweet-old-post' ), - 'image_upsell' => __( 'Sharing as an Image Post is available in the Pro version.', 'tweet-old-post' ), - 'full_wpml_support_upsell' => sprintf( __( 'Language-based sharing only available in the %1$sPro version%2$s', 'tweet-old-post' ), '', '' ), + 'use_shortner_title' => __( 'Use URL Shortener', 'tweet-old-post' ), + 'use_shortner_desc' => __( 'Should we use a shortener when adding the links to the content?', 'tweet-old-post' ), + 'shortner_title' => __( 'URL Shortener Service', 'tweet-old-post' ), + 'shortner_desc' => __( 'Which service to use for URL shortening?', 'tweet-old-post' ), + 'shortner_api_field' => __( 'Service API', 'tweet-old-post' ), + 'shortner_field_desc_start' => __( 'Add the', 'tweet-old-post' ), + 'shortner_field_desc_end' => __( 'required by the', 'tweet-old-post' ), + 'hashtags_title' => __( 'Hashtags', 'tweet-old-post' ), + 'hashtags_desc' => __( 'Hashtags for published content.', 'tweet-old-post' ), + 'hashtags_option_no' => __( 'Don\'t add any hashtags', 'tweet-old-post' ), + 'hashtags_option_common' => __( 'Common hashtags for all shares', 'tweet-old-post' ), + 'hashtags_option_cats' => __( 'Create hashtags from categories', 'tweet-old-post' ), + 'hashtags_option_tags' => __( 'Create hashtags from tags', 'tweet-old-post' ), + 'hashtags_option_field' => __( 'Create hashtags from a custom field', 'tweet-old-post' ), + 'hastags_common_title' => __( 'Common Hashtags', 'tweet-old-post' ), + 'hastags_common_desc' => __( 'List of hastags to use separated by comma', 'tweet-old-post' ), + 'hastags_field_title' => __( 'Custom Hashtags', 'tweet-old-post' ), + 'hastags_field_desc' => __( 'The name of the meta field that contains the hashtags.', 'tweet-old-post' ), + 'hashtags_length_title' => __( 'Maximum Hashtags length', 'tweet-old-post' ), + 'hashtags_length_desc' => __( 'The maximum hashtags length to be used when publishing.', 'tweet-old-post' ), + 'hashtags_randomize' => __( 'Randomize hashtags', 'tweet-old-post' ), + 'hashtags_randomize_desc' => __( 'Randomize the list of hashtags on every successful share. You won\'t see this change in the Sharing Queue, the randomization happens at share time.', 'tweet-old-post' ), + 'image_title' => __( 'Share As Image Post', 'tweet-old-post' ), + 'image_desc' => __( 'Should Revive Social share your posts as an image post? Learn more.', 'tweet-old-post' ), + 'image_aspect_ratio_title' => __( 'Automatically correct aspect ratio', 'tweet-old-post' ), + 'image_aspect_ratio_title_desc' => __( 'Should Revive Social automatically crop images with the wrong aspect ratio? Learn more.', 'tweet-old-post' ), + 'utm_campaign_medium' => __( 'Campaign Medium', 'tweet-old-post' ), + 'utm_campaign_medium_desc' => __( 'The marketing medium you want to show in Google Analytics e.g: "social", "website", etc.', 'tweet-old-post' ), + 'utm_campaign_name' => __( 'Campaign Name', 'tweet-old-post' ), + 'utm_campaign_name_desc' => __( 'The campaign name you want to show in Google Analytics e.g: "november_sale" etc.', 'tweet-old-post' ), + 'custom_utm_upsell' => __( 'Custom UTMs are only available in the Pro version.', 'tweet-old-post' ), + 'image_upsell' => __( 'Sharing as an Image Post is available in the Pro version.', 'tweet-old-post' ), + // translators: %1$s: opening anchor tag, %2$s: closing anchor tag. + 'full_wpml_support_upsell' => sprintf( __( 'Language-based sharing only available in the %1$sPro version%2$s', 'tweet-old-post' ), '', '' ), 'wpml_select_language' => __( 'Choose language', 'tweet-old-post' ), - 'media_post_title' => __( 'Media Posts Content', 'tweet-old-post' ), - 'media_post_desc' => __( 'Which content should we share for media posts?', 'tweet-old-post' ), - 'media_post_option_title' => __( 'Title', 'tweet-old-post' ), - 'media_post_option_caption' => __( 'Caption', 'tweet-old-post' ), - 'media_post_option_alt_text' => __( 'Alt Text', 'tweet-old-post' ), - 'media_post_option_description' => __( 'Description', 'tweet-old-post' ), - 'media_post_upsell' => __( 'Media posting is available in the Business version.', 'tweet-old-post' ), - 'no_post_format_error' => __( 'Post Format option empty, "Share scheduled posts to social media on publish" cannot work. Please go to the Post Format tab and click "Save" for this feature to work', 'tweet-old-post' ), - 'active_account_no_post_format_error' => __( 'No post format found for the following network, please go to "Post Format" tab and save your changes for: ', 'tweet-old-post' ), - 'twitter_max_characters_notice' => sprintf( __( '%1$sNote:%2$s Maximum characters supported by Twitter is 280.', 'tweet-old-post' ), '', '' ), + 'media_post_title' => __( 'Media Posts Content', 'tweet-old-post' ), + 'media_post_desc' => __( 'Which content should we share for media posts?', 'tweet-old-post' ), + 'media_post_option_title' => __( 'Title', 'tweet-old-post' ), + 'media_post_option_caption' => __( 'Caption', 'tweet-old-post' ), + 'media_post_option_alt_text' => __( 'Alt Text', 'tweet-old-post' ), + 'media_post_option_description' => __( 'Description', 'tweet-old-post' ), + 'media_post_upsell' => __( 'Media posting is available in the Business version.', 'tweet-old-post' ), + 'no_post_format_error' => __( 'Post Format option empty, "Share scheduled posts to social media on publish" cannot work. Please go to the Post Format tab and click "Save" for this feature to work', 'tweet-old-post' ), + 'active_account_no_post_format_error' => __( 'No post format found for the following network, please go to "Post Format" tab and save your changes for: ', 'tweet-old-post' ), + // translators: %1$s: opening strong tag, %2$s: closing strong tag. + 'twitter_max_characters_notice' => sprintf( __( '%1$sNote:%2$s Maximum characters supported by Twitter is 280.', 'tweet-old-post' ), '', '' ), + // translators: %1$s: opening strong tag, %2$s: closing strong tag. 'instagram_disable_link_recommendation' => sprintf( __( '%1$sNote:%2$s We recommend that you disable links for Instagram posts. If you do leave this option checked, then we recommend that you enable a shortener.', 'tweet-old-post' ), '', '' ), - 'instagram_image_post_default' => sprintf( __( '%1$sNote:%2$s Instagram posts need to be an image.', 'tweet-old-post' ), '', '' ), - 'vk_unsupported_shorteners' => sprintf( __( '%1$sNote:%2$s is.gd shortener is not currently supported by VK.com.', 'tweet-old-post' ), '', '' ), - 'not_available_with_rop_server' => __( 'This feature is not available for X accounts authorized via Revival Social.', 'tweet-old-post' ), - 'custom_meta_field_upsell' => __( 'Custom meta fields are only available in the Pro version.', 'tweet-old-post' ), - 'custom_meta_upsell' => __( 'Custom fields are only available in the Pro version.', 'tweet-old-post' ), - 'hashtag_field_upsell' => __( 'The selected option is only available in the Pro version.', 'tweet-old-post' ), - 'first_comment_title' => __( 'Comment Text', 'tweet-old-post' ), - 'first_comment_desc' => __( 'Should Revive Social add the post link in the first comment when sharing a post?', 'tweet-old-post' ), - 'first_comment_placeholder' => __( 'Read more on {link}', 'tweet-old-post' ), - 'share_link_title' => __( 'Share link in comment', 'tweet-old-post' ), - 'share_link_desc' => __( 'Share the post link in the first comment?', 'tweet-old-post' ), - 'share_link_upsell' => __( 'Share first comment is only available in the Pro version.', 'tweet-old-post' ), + // translators: %1$s: opening strong tag, %2$s: closing strong tag. + 'instagram_image_post_default' => sprintf( __( '%1$sNote:%2$s Instagram posts need to be an image.', 'tweet-old-post' ), '', '' ), + // translators: %1$s: opening strong tag, %2$s: closing strong tag. + 'vk_unsupported_shorteners' => sprintf( __( '%1$sNote:%2$s is.gd shortener is not currently supported by VK.com.', 'tweet-old-post' ), '', '' ), + 'not_available_with_rop_server' => __( 'This feature is not available for X accounts authorized via Revival Social.', 'tweet-old-post' ), + 'custom_meta_field_upsell' => __( 'Custom meta fields are only available in the Pro version.', 'tweet-old-post' ), + 'custom_meta_upsell' => __( 'Custom fields are only available in the Pro version.', 'tweet-old-post' ), + 'hashtag_field_upsell' => __( 'The selected option is only available in the Pro version.', 'tweet-old-post' ), + 'first_comment_title' => __( 'Comment Text', 'tweet-old-post' ), + 'first_comment_desc' => __( 'Should Revive Social add the post link in the first comment when sharing a post?', 'tweet-old-post' ), + 'first_comment_placeholder' => __( 'Read more on {link}', 'tweet-old-post' ), + 'share_link_title' => __( 'Share link in comment', 'tweet-old-post' ), + 'share_link_desc' => __( 'Share the post link in the first comment?', 'tweet-old-post' ), + 'share_link_upsell' => __( 'Share first comment is only available in the Pro version.', 'tweet-old-post' ), ), 'schedule' => array( 'menu_item' => __( 'Custom Schedule', 'tweet-old-post' ), @@ -332,6 +354,7 @@ public static function get_labels( $key = '' ) { 'sharing_not_started' => __( 'Sharing is not started!', 'tweet-old-post' ), 'sharing_not_started_desc' => __( 'You need to start sharing in order to see any posts in the queue.', 'tweet-old-post' ), 'queue_desc' => __( 'You can choose to edit any of the post, skip the sharing or block a specific one from sharing in the future.', 'tweet-old-post' ), + // translators: 1: opening anchor tag (upsell link), 2: closing anchor tag. 'business_or_higher_only' => sprintf( __( 'You can edit the posts from the queue with the Business or Marketer versions of the plugin. View more details %1$shere%2$s.', 'tweet-old-post' ), '', '' ), 'no_posts' => __( 'No queued posts!', 'tweet-old-post' ), 'no_posts_desc' => __( 'Check if you have at least an "Active account", what posts and pages are selected in "General Settings" and if a "Schedule" is defined.', 'tweet-old-post' ), @@ -362,6 +385,7 @@ public static function get_labels( $key = '' ) { ), 'general' => array( 'plugin_name' => __( 'Revive Social', 'tweet-old-post' ), + // translators: 1: admin URL to plugin dashboard. 'status_error_global' => sprintf( __( 'Issues encountered when trying to share content on social media, check the Logs menu for more information. ', 'tweet-old-post' ), esc_url( get_admin_url( get_current_blog_id(), 'admin.php?page=TweetOldPost' ) ) ), 'sharing_not_started' => __( 'Sharing Not Started', 'tweet-old-post' ), 'sharing_to_account' => __( 'Sharing to Accounts', 'tweet-old-post' ), @@ -382,6 +406,7 @@ public static function get_labels( $key = '' ) { 'next_share' => __( 'Next share', 'tweet-old-post' ), 'sharing_now' => __( 'Sharing...', 'tweet-old-post' ), 'cron_interval' => __( 'Once every 5 min', 'tweet-old-post' ), + // translators: %1$s: opening anchor tag (review link), %2$s: closing anchor tag. 'staging_status' => sprintf( __( 'This seems to be a staging or development website. Some post types will not share to your accounts. %1$sLearn How to Turn Off%2$s', 'tweet-old-post' ), '', '' ), 'api_not_available' => __( 'It seems there is an issue with your WordPress configuration and the core REST API functionality is not available. This is crucial as Revive Social relies on this functionality in order to work.', + '', + '', + '', + '', + '
' + ) + ); + ?>', + '', + '', + '', + '', + '
' + ); + ?>