<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[46290] trunk: Build/Test Tools: Introduce automated PHP compatibility checking.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/46290">46290</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/46290","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>desrosj</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-09-25 13:46:55 +0000 (Wed, 25 Sep 2019)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Build/Test Tools: Introduce automated PHP compatibility checking.
This change introduces a new Composer script, `compat` that will scan the codebase for (detectable) potential PHP compatibility issues using the `PHP_CodeSniffer` and a custom ruleset based off of the `PHPCompayibilityWP` ruleset (`phpcompat.xml.dist`).
The command will be run as a separate job within each Travis build. While many compatibility issues and false positives have already been corrected in this commit and other Trac tickets, there are still some remaining. For that reason, the job is allowed to fail while the remainder of the potential compatibility issues are investigated and addressed. After those are resolved, the job should be set as required to pass to help prevent new compatibility issues from being introduced.
Props desrosj, jrf, all PHPCompatibilityWP and PHPCompatibility contributors.
Fixes <a href="https://core.trac.wordpress.org/ticket/46152">#46152</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktravisyml">trunk/.travis.yml</a></li>
<li><a href="#trunkcomposerjson">trunk/composer.json</a></li>
<li><a href="#trunkcomposerlock">trunk/composer.lock</a></li>
<li><a href="#trunksrcwpadminincludesclasswpdebugdataphp">trunk/src/wp-admin/includes/class-wp-debug-data.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpsitehealthphp">trunk/src/wp-admin/includes/class-wp-site-health.php</a></li>
<li><a href="#trunksrcwpadminincludesfilephp">trunk/src/wp-admin/includes/file.php</a></li>
<li><a href="#trunksrcwpadminincludesupgradephp">trunk/src/wp-admin/includes/upgrade.php</a></li>
<li><a href="#trunksrcwpincludesauthortemplatephp">trunk/src/wp-includes/author-template.php</a></li>
<li><a href="#trunksrcwpincludesdeprecatedphp">trunk/src/wp-includes/deprecated.php</a></li>
<li><a href="#trunksrcwpincludesfunctionsphp">trunk/src/wp-includes/functions.php</a></li>
<li><a href="#trunksrcwpincludesgeneraltemplatephp">trunk/src/wp-includes/general-template.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkphpcompatxmldist">trunk/phpcompat.xml.dist</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktravisyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.travis.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.travis.yml 2019-09-25 08:19:17 UTC (rev 46289)
+++ trunk/.travis.yml 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,6 +29,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> name: PHP Linting
</span><span class="cx" style="display: block; padding: 0 10px"> - env: WP_TRAVISCI=travis:js WP_INSTALL=false
</span><span class="cx" style="display: block; padding: 0 10px"> name: JS Tests
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - env: WP_TRAVISCI=test:compat COMPOSER_INSTALL=true NPM_INSTALL=false WP_INSTALL=false
+ name: "PHP Compatibility Check"
</ins><span class="cx" style="display: block; padding: 0 10px"> - env: LOCAL_PHP=7.3-fpm WP_TRAVISCI=test:php
</span><span class="cx" style="display: block; padding: 0 10px"> name: "PHPUnit Tests: PHP 7.3"
</span><span class="cx" style="display: block; padding: 0 10px"> - env: LOCAL_PHP=7.3-fpm LOCAL_PHP_MEMCACHED=true WP_TRAVISCI=test:php
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -46,6 +48,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - env: LOCAL_PHP=8.0-fpm WP_TRAVISCI=test:php
</span><span class="cx" style="display: block; padding: 0 10px"> name: "PHPUnit Tests: PHP 8.0"
</span><span class="cx" style="display: block; padding: 0 10px"> allow_failures:
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - env: WP_TRAVISCI=test:compat COMPOSER_INSTALL=true NPM_INSTALL=false WP_INSTALL=false
</ins><span class="cx" style="display: block; padding: 0 10px"> - env: LOCAL_PHP=7.4-fpm WP_TRAVISCI=test:php
</span><span class="cx" style="display: block; padding: 0 10px"> - env: LOCAL_PHP=8.0-fpm WP_TRAVISCI=test:php
</span><span class="cx" style="display: block; padding: 0 10px"> fast_finish: true
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -120,6 +123,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> docker-compose run --rm php composer format &&
</span><span class="cx" style="display: block; padding: 0 10px"> docker-compose run --rm php composer lint:errors &&
</span><span class="cx" style="display: block; padding: 0 10px"> docker-compose run --rm php composer lint tests
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ elif [[ "$WP_TRAVISCI" == "test:compat" ]]; then
+ docker-compose run --rm php composer compat
</ins><span class="cx" style="display: block; padding: 0 10px"> else
</span><span class="cx" style="display: block; padding: 0 10px"> npm run grunt $WP_TRAVISCI
</span><span class="cx" style="display: block; padding: 0 10px"> fi
</span></span></pre></div>
<a id="trunkcomposerjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/composer.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/composer.json 2019-09-25 08:19:17 UTC (rev 46289)
+++ trunk/composer.json 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,9 +14,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "require-dev": {
</span><span class="cx" style="display: block; padding: 0 10px"> "dealerdirect/phpcodesniffer-composer-installer": "~0.5.0",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wp-coding-standards/wpcs": "~2.1.0"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wp-coding-standards/wpcs": "~2.1.0",
+ "phpcompatibility/phpcompatibility-wp": "^2.1.0"
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "scripts": {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source",
</ins><span class="cx" style="display: block; padding: 0 10px"> "format": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --report=summary,source --cache -d memory_limit=256M",
</span><span class="cx" style="display: block; padding: 0 10px"> "lint": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --report=summary,source --cache -d memory_limit=256M",
</span><span class="cx" style="display: block; padding: 0 10px"> "lint:errors": "@lint -n"
</span></span></pre></div>
<a id="trunkcomposerlock"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/composer.lock</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/composer.lock 2019-09-25 08:19:17 UTC (rev 46289)
+++ trunk/composer.lock 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,7 +4,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
</span><span class="cx" style="display: block; padding: 0 10px"> "This file is @generated automatically"
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "content-hash": "56c797c5309702adf0f49bd274a364f3",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "content-hash": "ca8f46e0b3cba61c076c033cc7143d3a",
</ins><span class="cx" style="display: block; padding: 0 10px"> "packages": [],
</span><span class="cx" style="display: block; padding: 0 10px"> "packages-dev": [
</span><span class="cx" style="display: block; padding: 0 10px"> {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -74,6 +74,166 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "time": "2018-10-26T13:21:45+00:00"
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "name": "phpcompatibility/php-compatibility",
+ "version": "9.3.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
+ "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9999344e47e7af6b00e1a898eacc4e4368fb7196",
+ "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3",
+ "squizlabs/php_codesniffer": "^2.3 || ^3.0.2"
+ },
+ "conflict": {
+ "squizlabs/php_codesniffer": "2.6.2"
+ },
+ "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."
+ },
+ "type": "phpcodesniffer-standard",
+ "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",
+ "role": "lead"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
+ }
+ ],
+ "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
+ "homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
+ "keywords": [
+ "compatibility",
+ "phpcs",
+ "standards"
+ ],
+ "time": "2019-09-05T18:36:49+00:00"
+ },
+ {
+ "name": "phpcompatibility/phpcompatibility-paragonie",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
+ "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
+ "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
+ "shasum": ""
+ },
+ "require": {
+ "phpcompatibility/php-compatibility": "^9.0"
+ },
+ "require-dev": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5",
+ "paragonie/random_compat": "dev-master",
+ "paragonie/sodium_compat": "dev-master"
+ },
+ "suggest": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || 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",
+ "phpcs",
+ "polyfill",
+ "standards"
+ ],
+ "time": "2019-08-28T15:58:19+00:00"
+ },
+ {
+ "name": "phpcompatibility/phpcompatibility-wp",
+ "version": "2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
+ "reference": "41bef18ba688af638b7310666db28e1ea9158b2f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/41bef18ba688af638b7310666db28e1ea9158b2f",
+ "reference": "41bef18ba688af638b7310666db28e1ea9158b2f",
+ "shasum": ""
+ },
+ "require": {
+ "phpcompatibility/php-compatibility": "^9.0",
+ "phpcompatibility/phpcompatibility-paragonie": "^1.0"
+ },
+ "require-dev": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5"
+ },
+ "suggest": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || 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 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/",
+ "keywords": [
+ "compatibility",
+ "phpcs",
+ "standards",
+ "wordpress"
+ ],
+ "time": "2019-08-28T14:22:28+00:00"
+ },
+ {
</ins><span class="cx" style="display: block; padding: 0 10px"> "name": "squizlabs/php_codesniffer",
</span><span class="cx" style="display: block; padding: 0 10px"> "version": "3.4.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "source": {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -176,7 +336,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "prefer-stable": false,
</span><span class="cx" style="display: block; padding: 0 10px"> "prefer-lowest": false,
</span><span class="cx" style="display: block; padding: 0 10px"> "platform": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "php": ">=5.6"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "php": ">=5.6"
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "platform-dev": []
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunkphpcompatxmldist"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/phpcompat.xml.dist</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/phpcompat.xml.dist (rev 0)
+++ trunk/phpcompat.xml.dist 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,64 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?xml version="1.0"?>
+<ruleset name="WordPress PHP Compatibility">
+ <description>Apply PHP compatibility checks to all WordPress Core files</description>
+
+ <rule ref="PHPCompatibilityWP"/>
+
+ <!-- WordPress Core currently supports PHP 5.6+ -->
+ <config name="testVersion" value="5.6-"/>
+
+ <!-- Only scan PHP files. -->
+ <arg name="extensions" value="php"/>
+
+ <!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
+ <arg name="cache"/>
+
+ <!-- Set the memory limit to 256M.
+ For most standard PHP configurations, this means the memory limit will temporarily be raised.
+ Ref: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#specifying-phpini-settings
+ -->
+ <ini name="memory_limit" value="256M"/>
+
+ <!-- Strip the filepaths down to the relevant bit. -->
+ <arg name="basepath" value="./"/>
+
+ <!-- Check up to 20 files simultaneously. -->
+ <arg name="parallel" value="20"/>
+
+ <!-- Show sniff codes in all reports -->
+ <arg value="ps"/>
+
+ <!-- For now, only the files in src are scanned. -->
+ <file>./src/</file>
+
+ <!-- Code which doesn't go into production may have different requirements. -->
+ <exclude-pattern>/node_modules/*</exclude-pattern>
+
+ <!--
+ Currently, there are no dependencies managed by Composer.
+ This will need to be modified when that changes to ensure external packages meet compatibility requirements.
+ -->
+ <exclude-pattern>/vendor/*</exclude-pattern>
+
+ <!--
+ PHPCompatibilityParagonieRandomCompat prevents false positives in `random_compat`.
+ However, because these files are included in a non-standard path, false positives are triggered in WordPress Core.
+ -->
+ <rule ref="PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated">
+ <exclude-pattern>/random_compat/byte_safe_strings\.php$</exclude-pattern>
+ </rule>
+ <rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_dev_urandomDeprecatedRemoved">
+ <exclude-pattern>/random_compat/random_bytes_mcrypt\.php$</exclude-pattern>
+ </rule>
+ <rule ref="PHPCompatibility.Extensions.RemovedExtensions.mcryptDeprecatedRemoved">
+ <exclude-pattern>/random_compat/random_bytes_mcrypt\.php$</exclude-pattern>
+ </rule>
+ <rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_create_ivDeprecatedRemoved">
+ <exclude-pattern>/random_compat/random_bytes_mcrypt\.php$</exclude-pattern>
+ </rule>
+
+ <!-- Whitelist the WP DB Class for use of `mysql_` extension in PHP < 7.0. -->
+ <rule ref="PHPCompatibility.Extensions.RemovedExtensions">
+ <exclude-pattern>/src/wp-includes/wp-db\.php</exclude-pattern>
+ </rule>
+</ruleset>
</ins></span></pre></div>
<a id="trunksrcwpadminincludesclasswpdebugdataphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-debug-data.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-debug-data.php 2019-09-25 08:19:17 UTC (rev 46289)
+++ trunk/src/wp-admin/includes/class-wp-debug-data.php 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -728,7 +728,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $wpdb->use_mysqli ) && $wpdb->use_mysqli ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $client_version = $wpdb->dbh->client_info;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_client_info
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_client_info,PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( preg_match( '|[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}|', mysql_get_client_info(), $matches ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $client_version = $matches[0];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpsitehealthphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-site-health.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-site-health.php 2019-09-25 08:19:17 UTC (rev 46289)
+++ trunk/src/wp-admin/includes/class-wp-site-health.php 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -158,7 +158,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_server_info
</span><span class="cx" style="display: block; padding: 0 10px"> $mysql_server_type = mysqli_get_server_info( $wpdb->dbh );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_server_info
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_server_info,PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved
</ins><span class="cx" style="display: block; padding: 0 10px"> $mysql_server_type = mysql_get_server_info( $wpdb->dbh );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1171,7 +1171,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_client_info
</span><span class="cx" style="display: block; padding: 0 10px"> $mysql_client_version = mysqli_get_client_info();
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_client_info
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_client_info,PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved
</ins><span class="cx" style="display: block; padding: 0 10px"> $mysql_client_version = mysql_get_client_info();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpadminincludesfilephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/file.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/file.php 2019-09-25 08:19:17 UTC (rev 46289)
+++ trunk/src/wp-admin/includes/file.php 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1280,6 +1280,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'php' => phpversion(),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound
</ins><span class="cx" style="display: block; padding: 0 10px"> 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1313,6 +1314,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'php' => phpversion(),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound
</ins><span class="cx" style="display: block; padding: 0 10px"> 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'polyfill_is_fast' => false,
</span><span class="cx" style="display: block; padding: 0 10px"> 'max_execution_time' => ini_get( 'max_execution_time' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1386,6 +1388,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'skipped_key' => $skipped_key,
</span><span class="cx" style="display: block; padding: 0 10px"> 'skipped_sig' => $skipped_signature,
</span><span class="cx" style="display: block; padding: 0 10px"> 'php' => phpversion(),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound
</ins><span class="cx" style="display: block; padding: 0 10px"> 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span></span></pre></div>
<a id="trunksrcwpadminincludesupgradephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/upgrade.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/upgrade.php 2019-09-25 08:19:17 UTC (rev 46289)
+++ trunk/src/wp-admin/includes/upgrade.php 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2475,7 +2475,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $setting Option name.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return mixed
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function __get_option( $setting ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function __get_option( $setting ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $setting == 'home' && defined( 'WP_HOME' ) ) {
</span></span></pre></div>
<a id="trunksrcwpincludesauthortemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/author-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/author-template.php 2019-09-25 08:19:17 UTC (rev 46289)
+++ trunk/src/wp-includes/author-template.php 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -565,6 +565,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.2.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access private
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function __clear_multi_author_cache() { //phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function __clear_multi_author_cache() { //phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
</ins><span class="cx" style="display: block; padding: 0 10px"> delete_transient( 'is_multi_author' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludesdeprecatedphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/deprecated.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/deprecated.php 2019-09-25 08:19:17 UTC (rev 46289)
+++ trunk/src/wp-includes/deprecated.php 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1798,7 +1798,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @deprecated 2.8.0 Use _n()
</span><span class="cx" style="display: block; padding: 0 10px"> * @see _n()
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function __ngettext( ...$args ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function __ngettext( ...$args ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
</ins><span class="cx" style="display: block; padding: 0 10px"> _deprecated_function( __FUNCTION__, '2.8.0', '_n()' );
</span><span class="cx" style="display: block; padding: 0 10px"> return _n( ...$args );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1810,7 +1810,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @deprecated 2.8.0 Use _n_noop()
</span><span class="cx" style="display: block; padding: 0 10px"> * @see _n_noop()
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function __ngettext_noop( ...$args ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function __ngettext_noop( ...$args ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
</ins><span class="cx" style="display: block; padding: 0 10px"> _deprecated_function( __FUNCTION__, '2.8.0', '_n_noop()' );
</span><span class="cx" style="display: block; padding: 0 10px"> return _n_noop( ...$args );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/functions.php 2019-09-25 08:19:17 UTC (rev 46289)
+++ trunk/src/wp-includes/functions.php 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5743,7 +5743,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return true True.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function __return_true() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function __return_true() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5758,7 +5758,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return false False.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function __return_false() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function __return_false() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5771,7 +5771,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int 0.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function __return_zero() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function __return_zero() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
</ins><span class="cx" style="display: block; padding: 0 10px"> return 0;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5784,7 +5784,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array Empty array.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function __return_empty_array() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function __return_empty_array() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
</ins><span class="cx" style="display: block; padding: 0 10px"> return array();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5797,7 +5797,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return null Null value.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function __return_null() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function __return_null() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
</ins><span class="cx" style="display: block; padding: 0 10px"> return null;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5812,7 +5812,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Empty string.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function __return_empty_string() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function __return_empty_string() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
</ins><span class="cx" style="display: block; padding: 0 10px"> return '';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/general-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/general-template.php 2019-09-25 08:19:17 UTC (rev 46289)
+++ trunk/src/wp-includes/general-template.php 2019-09-25 13:46:55 UTC (rev 46290)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4684,7 +4684,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $type The type of checked|selected|disabled|readonly we are doing
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string html attribute or empty string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function __checked_selected_helper( $helper, $current, $echo, $type ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function __checked_selected_helper( $helper, $current, $echo, $type ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( (string) $helper === (string) $current ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $result = " $type='$type'";
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span></span></pre>
</div>
</div>
</body>
</html>