sdc-build-wp 4.1.0 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/composer.json +2 -3
- package/composer.lock +3 -313
- package/index.js +38 -21
- package/lib/blocks.js +8 -6
- package/lib/style.js +17 -0
- package/package.json +1 -1
- package/vendor/composer/autoload_classmap.php +0 -37
- package/vendor/composer/autoload_psr4.php +0 -1
- package/vendor/composer/autoload_real.php +2 -0
- package/vendor/composer/autoload_static.php +0 -53
- package/vendor/composer/installed.json +1 -329
- package/vendor/composer/installed.php +3 -39
- package/vendor/composer/platform_check.php +26 -0
- package/lib/bustCache.js +0 -14
- package/vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md +0 -22
- package/vendor/dealerdirect/phpcodesniffer-composer-installer/README.md +0 -285
- package/vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json +0 -71
- package/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php +0 -637
- package/vendor/phpcsstandards/phpcsextra/CHANGELOG.md +0 -590
- package/vendor/phpcsstandards/phpcsextra/LICENSE +0 -165
- package/vendor/phpcsstandards/phpcsextra/Modernize/Docs/FunctionCalls/DirnameStandard.xml +0 -40
- package/vendor/phpcsstandards/phpcsextra/Modernize/Sniffs/FunctionCalls/DirnameSniff.php +0 -382
- package/vendor/phpcsstandards/phpcsextra/Modernize/ruleset.xml +0 -5
- package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Docs/Arrays/ArrayBraceSpacingStandard.xml +0 -94
- package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Docs/Arrays/CommaAfterLastStandard.xml +0 -43
- package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/ArrayBraceSpacingSniff.php +0 -305
- package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/CommaAfterLastSniff.php +0 -226
- package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/ruleset.xml +0 -5
- package/vendor/phpcsstandards/phpcsextra/README.md +0 -573
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/DisallowShortArraySyntaxStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/DuplicateArrayKeyStandard.xml +0 -44
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/MixedArrayKeyTypesStandard.xml +0 -40
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/MixedKeyedUnkeyedArrayStandard.xml +0 -31
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/DisallowAnonClassParenthesesStandard.xml +0 -24
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/DisallowFinalClassStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/ModifierKeywordOrderStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/RequireAnonClassParenthesesStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/RequireFinalClassStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/ConstructorDestructorReturnStandard.xml +0 -64
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/ForeachUniqueAssignmentStandard.xml +0 -26
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoDoubleNegativeStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoEchoSprintfStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/StaticInFinalClassStandard.xml +0 -43
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/LowercaseClassResolutionKeywordStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/ModifierKeywordOrderStandard.xml +0 -30
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/UppercaseMagicConstantsStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/DisallowAlternativeSyntaxStandard.xml +0 -35
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/DisallowLonelyIfStandard.xml +0 -49
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/IfElseDeclarationStandard.xml +0 -37
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Files/SeparateFunctionsFromOOStandard.xml +0 -45
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/FunctionDeclarations/NoLongClosuresStandard.xml +0 -42
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/FunctionDeclarations/RequireFinalMethodsInTraitsStandard.xml +0 -33
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Lists/DisallowLongListSyntaxStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Lists/DisallowShortListSyntaxStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/DisallowCurlyBraceSyntaxStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/DisallowDeclarationWithoutNameStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/EnforceCurlyBraceSyntaxStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/OneDeclarationPerFileStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/NamingConventions/NoReservedKeywordParameterNamesStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/OOStructures/AlphabeticExtendsImplementsStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/ConcatPositionStandard.xml +0 -31
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowLogicalAndOrStandard.xml +0 -30
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowShortTernaryStandard.xml +0 -26
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowStandalonePostIncrementDecrementStandard.xml +0 -44
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/StrictComparisonsStandard.xml +0 -29
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/TypeSeparatorSpacingStandard.xml +0 -33
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/LowercasePHPTagStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/OneStatementInShortEchoTagStandard.xml +0 -41
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowMixedGroupUseStandard.xml +0 -39
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseClassStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseConstStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseFunctionStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/KeywordSpacingStandard.xml +0 -29
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/LowercaseFunctionConstStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/NoLeadingBackslashStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/NoUselessAliasesStandard.xml +0 -30
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/AnonClassKeywordSpacingStandard.xml +0 -31
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/CommaSpacingStandard.xml +0 -94
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/DisallowInlineTabsStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/PrecisionAlignmentStandard.xml +0 -29
- package/vendor/phpcsstandards/phpcsextra/Universal/Helpers/DummyTokenizer.php +0 -60
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php +0 -89
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php +0 -297
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/MixedArrayKeyTypesSniff.php +0 -174
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/MixedKeyedUnkeyedArraySniff.php +0 -134
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/DisallowAnonClassParenthesesSniff.php +0 -112
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/DisallowFinalClassSniff.php +0 -116
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/ModifierKeywordOrderSniff.php +0 -188
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/RequireAnonClassParenthesesSniff.php +0 -81
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/RequireFinalClassSniff.php +0 -102
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php +0 -211
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/ForeachUniqueAssignmentSniff.php +0 -153
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/NoDoubleNegativeSniff.php +0 -269
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/NoEchoSprintfSniff.php +0 -131
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/StaticInFinalClassSniff.php +0 -216
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/LowercaseClassResolutionKeywordSniff.php +0 -106
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/ModifierKeywordOrderSniff.php +0 -199
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/UppercaseMagicConstantsSniff.php +0 -89
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/DisallowAlternativeSyntaxSniff.php +0 -216
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/DisallowLonelyIfSniff.php +0 -348
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/IfElseDeclarationSniff.php +0 -164
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Files/SeparateFunctionsFromOOSniff.php +0 -190
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/FunctionDeclarations/NoLongClosuresSniff.php +0 -233
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/FunctionDeclarations/RequireFinalMethodsInTraitsSniff.php +0 -120
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Lists/DisallowLongListSyntaxSniff.php +0 -71
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Lists/DisallowShortListSyntaxSniff.php +0 -86
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/DisallowCurlyBraceSyntaxSniff.php +0 -81
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/DisallowDeclarationWithoutNameSniff.php +0 -80
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/EnforceCurlyBraceSyntaxSniff.php +0 -81
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/OneDeclarationPerFileSniff.php +0 -96
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/NamingConventions/NoReservedKeywordParameterNamesSniff.php +0 -190
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/OOStructures/AlphabeticExtendsImplementsSniff.php +0 -275
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/ConcatPositionSniff.php +0 -204
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowLogicalAndOrSniff.php +0 -112
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowShortTernarySniff.php +0 -76
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowStandalonePostIncrementDecrementSniff.php +0 -197
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/StrictComparisonsSniff.php +0 -116
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/TypeSeparatorSpacingSniff.php +0 -85
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/LowercasePHPTagSniff.php +0 -87
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/OneStatementInShortEchoTagSniff.php +0 -101
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowMixedGroupUseSniff.php +0 -248
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseClassSniff.php +0 -211
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseConstSniff.php +0 -211
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseFunctionSniff.php +0 -211
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/KeywordSpacingSniff.php +0 -207
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/LowercaseFunctionConstSniff.php +0 -156
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/NoLeadingBackslashSniff.php +0 -170
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/NoUselessAliasesSniff.php +0 -155
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/AnonClassKeywordSpacingSniff.php +0 -79
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/CommaSpacingSniff.php +0 -408
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php +0 -173
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/PrecisionAlignmentSniff.php +0 -445
- package/vendor/phpcsstandards/phpcsextra/Universal/ruleset.xml +0 -5
- package/vendor/phpcsstandards/phpcsextra/composer.json +0 -69
- package/vendor/phpcsstandards/phpcsutils/.phpdoc.xml.dist +0 -36
- package/vendor/phpcsstandards/phpcsutils/CHANGELOG.md +0 -1106
- package/vendor/phpcsstandards/phpcsutils/LICENSE +0 -165
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php +0 -551
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCFile.php +0 -781
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCTokens.php +0 -123
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/Helper.php +0 -202
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php +0 -44
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestFileNotFound.php +0 -47
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestMarkerNotFound.php +0 -43
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestTargetNotFound.php +0 -50
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Fixers/SpacesFixer.php +0 -246
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/Cache.php +0 -218
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrList.php +0 -687
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrListWithCache.php +0 -269
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/NoFileCache.php +0 -164
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/StableCollections.php +0 -75
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/UtilityMethodTestCase.php +0 -459
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php +0 -837
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php +0 -55
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Arrays.php +0 -227
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Conditions.php +0 -156
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Context.php +0 -232
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ControlStructures.php +0 -276
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FunctionDeclarations.php +0 -828
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/GetTokensAsString.php +0 -262
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Lists.php +0 -359
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/MessageHelper.php +0 -145
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Namespaces.php +0 -389
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/NamingConventions.php +0 -116
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Numbers.php +0 -322
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ObjectDeclarations.php +0 -359
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Operators.php +0 -252
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Orthography.php +0 -120
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Parentheses.php +0 -419
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/PassedParameters.php +0 -510
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Scopes.php +0 -143
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TextStrings.php +0 -331
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/UseStatements.php +0 -432
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Variables.php +0 -333
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/ruleset.xml +0 -4
- package/vendor/phpcsstandards/phpcsutils/README.md +0 -297
- package/vendor/phpcsstandards/phpcsutils/composer.json +0 -92
- package/vendor/phpcsstandards/phpcsutils/phpcsutils-autoload.php +0 -68
- package/vendor/wp-coding-standards/wpcs/CHANGELOG.md +0 -1654
- package/vendor/wp-coding-standards/wpcs/LICENSE +0 -21
- package/vendor/wp-coding-standards/wpcs/README.md +0 -261
- package/vendor/wp-coding-standards/wpcs/WordPress/AbstractArrayAssignmentRestrictionsSniff.php +0 -261
- package/vendor/wp-coding-standards/wpcs/WordPress/AbstractClassRestrictionsSniff.php +0 -257
- package/vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionParameterSniff.php +0 -111
- package/vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionRestrictionsSniff.php +0 -358
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/ArrayIndentationStandard.xml +0 -116
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/ArrayKeySpacingRestrictionsStandard.xml +0 -31
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/MultipleStatementAlignmentStandard.xml +0 -50
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/CodeAnalysis/EscapedNotTranslatedStandard.xml +0 -24
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/DateTime/CurrentTimeTimestampStandard.xml +0 -35
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/DateTime/RestrictedFunctionsStandard.xml +0 -54
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/PrefixAllGlobalsStandard.xml +0 -119
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidHookNameStandard.xml +0 -35
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidPostTypeSlugStandard.xml +0 -121
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/IniSetStandard.xml +0 -40
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/StrictInArrayStandard.xml +0 -53
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/YodaConditionsStandard.xml +0 -27
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Security/SafeRedirectStandard.xml +0 -23
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CapabilitiesStandard.xml +0 -69
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CapitalPDangitStandard.xml +0 -43
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/ClassNameCaseStandard.xml +0 -23
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CronIntervalStandard.xml +0 -45
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedClassesStandard.xml +0 -23
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedFunctionsStandard.xml +0 -23
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedParameterValuesStandard.xml +0 -23
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedParametersStandard.xml +0 -40
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourceParametersStandard.xml +0 -92
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourcesStandard.xml +0 -57
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/PostsPerPageStandard.xml +0 -73
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/CastStructureSpacingStandard.xml +0 -27
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/ControlStructureSpacingStandard.xml +0 -150
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml +0 -19
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/OperatorSpacingStandard.xml +0 -61
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ArrayWalkingFunctionsHelper.php +0 -108
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ConstantsHelper.php +0 -135
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ContextHelper.php +0 -394
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/DeprecationHelper.php +0 -84
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/EscapingFunctionsTrait.php +0 -256
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/FormattingFunctionsHelper.php +0 -60
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/IsUnitTestTrait.php +0 -238
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ListHelper.php +0 -101
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/MinimumWPVersionTrait.php +0 -159
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/PrintingFunctionsTrait.php +0 -122
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/RulesetPropertyHelper.php +0 -73
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/SanitizationHelperTrait.php +0 -418
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/SnakeCaseHelper.php +0 -60
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/UnslashingFunctionsHelper.php +0 -59
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ValidationHelper.php +0 -349
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/VariableHelper.php +0 -262
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPDBTrait.php +0 -115
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPGlobalVariablesHelper.php +0 -312
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPHookHelper.php +0 -113
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniff.php +0 -72
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php +0 -252
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayIndentationSniff.php +0 -550
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php +0 -174
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/MultipleStatementAlignmentSniff.php +0 -583
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/CodeAnalysis/AssignmentInTernaryConditionSniff.php +0 -173
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php +0 -89
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php +0 -301
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php +0 -761
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/PreparedSQLSniff.php +0 -242
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/RestrictedClassesSniff.php +0 -57
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/RestrictedFunctionsSniff.php +0 -63
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/SlowDBQuerySniff.php +0 -58
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DateTime/CurrentTimeTimestampSniff.php +0 -168
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DateTime/RestrictedFunctionsSniff.php +0 -59
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Files/FileNameSniff.php +0 -313
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php +0 -1297
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidFunctionNameSniff.php +0 -188
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php +0 -277
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidPostTypeSlugSniff.php +0 -230
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php +0 -289
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DevelopmentFunctionsSniff.php +0 -63
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php +0 -100
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DontExtractSniff.php +0 -52
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/IniSetSniff.php +0 -193
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/NoSilencedErrorsSniff.php +0 -245
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/POSIXFunctionsSniff.php +0 -73
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/PregQuoteDelimiterSniff.php +0 -70
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/RestrictedPHPFunctionsSniff.php +0 -45
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/StrictInArraySniff.php +0 -122
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/TypeCastsSniff.php +0 -90
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/YodaConditionsSniff.php +0 -124
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/EscapeOutputSniff.php +0 -903
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/NonceVerificationSniff.php +0 -422
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/PluginMenuSlugSniff.php +0 -126
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/SafeRedirectSniff.php +0 -45
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/ValidatedSanitizedInputSniff.php +0 -244
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Utils/I18nTextDomainFixerSniff.php +0 -862
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/AlternativeFunctionsSniff.php +0 -371
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CapabilitiesSniff.php +0 -478
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CapitalPDangitSniff.php +0 -315
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/ClassNameCaseSniff.php +0 -897
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CronIntervalSniff.php +0 -321
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedClassesSniff.php +0 -152
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php +0 -1708
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php +0 -291
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedParametersSniff.php +0 -509
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php +0 -160
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DiscouragedFunctionsSniff.php +0 -54
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/EnqueuedResourceParametersSniff.php +0 -241
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/EnqueuedResourcesSniff.php +0 -108
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php +0 -436
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php +0 -977
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/PostsPerPageSniff.php +0 -102
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/CastStructureSpacingSniff.php +0 -59
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php +0 -486
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php +0 -63
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/OperatorSpacingSniff.php +0 -60
- package/vendor/wp-coding-standards/wpcs/WordPress/ruleset.xml +0 -13
- package/vendor/wp-coding-standards/wpcs/WordPress-Core/ruleset.xml +0 -948
- package/vendor/wp-coding-standards/wpcs/WordPress-Docs/ruleset.xml +0 -109
- package/vendor/wp-coding-standards/wpcs/WordPress-Extra/ruleset.xml +0 -199
- package/vendor/wp-coding-standards/wpcs/composer.json +0 -88
- package/vendor/wp-coding-standards/wpcs/phpcs.xml.dist.sample +0 -153
|
@@ -1,509 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
/**
|
|
3
|
-
* WordPress Coding Standard.
|
|
4
|
-
*
|
|
5
|
-
* @package WPCS\WordPressCodingStandards
|
|
6
|
-
* @link https://github.com/WordPress/WordPress-Coding-Standards
|
|
7
|
-
* @license https://opensource.org/licenses/MIT MIT
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
namespace WordPressCS\WordPress\Sniffs\WP;
|
|
11
|
-
|
|
12
|
-
use PHPCSUtils\Utils\MessageHelper;
|
|
13
|
-
use PHPCSUtils\Utils\PassedParameters;
|
|
14
|
-
use PHPCSUtils\Utils\TextStrings;
|
|
15
|
-
use WordPressCS\WordPress\AbstractFunctionParameterSniff;
|
|
16
|
-
use WordPressCS\WordPress\Helpers\MinimumWPVersionTrait;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Check for usage of deprecated parameters in WP functions and suggest alternative based on the parameter passed.
|
|
20
|
-
*
|
|
21
|
-
* This sniff will throw an error when usage of deprecated parameters is
|
|
22
|
-
* detected if the parameter was deprecated before the minimum supported
|
|
23
|
-
* WP version; a warning otherwise.
|
|
24
|
-
* By default, it is set to presume that a project will support the current
|
|
25
|
-
* WP version and up to three releases before.
|
|
26
|
-
*
|
|
27
|
-
* @since 0.12.0
|
|
28
|
-
* @since 0.13.0 Class name changed: this class is now namespaced.
|
|
29
|
-
* @since 0.14.0 Now has the ability to handle minimum supported WP version
|
|
30
|
-
* being provided via the command-line or as as <config> value
|
|
31
|
-
* in a custom ruleset.
|
|
32
|
-
*
|
|
33
|
-
* @uses \WordPressCS\WordPress\Helpers\MinimumWPVersionTrait::$minimum_wp_version
|
|
34
|
-
*/
|
|
35
|
-
final class DeprecatedParametersSniff extends AbstractFunctionParameterSniff {
|
|
36
|
-
|
|
37
|
-
use MinimumWPVersionTrait;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* The group name for this group of functions.
|
|
41
|
-
*
|
|
42
|
-
* @since 0.12.0
|
|
43
|
-
*
|
|
44
|
-
* @var string
|
|
45
|
-
*/
|
|
46
|
-
protected $group_name = 'wp_deprecated_parameters';
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Array of function, argument, and default value for deprecated argument.
|
|
50
|
-
*
|
|
51
|
-
* The functions are ordered alphabetically.
|
|
52
|
-
* Last updated for WordPress 6.3.
|
|
53
|
-
*
|
|
54
|
-
* @since 0.12.0
|
|
55
|
-
*
|
|
56
|
-
* @var array Multidimensional array with parameter details.
|
|
57
|
-
* $target_functions = array(
|
|
58
|
-
* (string) Function name. => array(
|
|
59
|
-
* (int) Target parameter position, 1-based. => array(
|
|
60
|
-
* 'name' => (string|array) Parameter name or list of names if the parameter
|
|
61
|
-
* was renamed since the release of PHP 8.0.
|
|
62
|
-
* 'value' => (mixed) Expected default value for the deprecated parameter.
|
|
63
|
-
* Currently the default values: true, false, null, empty arrays
|
|
64
|
-
* and both empty and non-empty strings can be handled correctly
|
|
65
|
-
* by the process_parameters() method.
|
|
66
|
-
* When an additional default value is added, the relevant code
|
|
67
|
-
* in the process_parameters() method will need to be adjusted.
|
|
68
|
-
* 'version' => (int) The WordPress version when deprecated.
|
|
69
|
-
* )
|
|
70
|
-
* )
|
|
71
|
-
* );
|
|
72
|
-
*/
|
|
73
|
-
protected $target_functions = array(
|
|
74
|
-
'_future_post_hook' => array(
|
|
75
|
-
1 => array(
|
|
76
|
-
'name' => 'deprecated',
|
|
77
|
-
'value' => null,
|
|
78
|
-
'version' => '2.3.0',
|
|
79
|
-
),
|
|
80
|
-
),
|
|
81
|
-
'_load_remote_block_patterns' => array(
|
|
82
|
-
1 => array(
|
|
83
|
-
'name' => 'deprecated',
|
|
84
|
-
'value' => null,
|
|
85
|
-
'version' => '5.9.0',
|
|
86
|
-
),
|
|
87
|
-
),
|
|
88
|
-
'_wp_post_revision_fields' => array(
|
|
89
|
-
2 => array(
|
|
90
|
-
'name' => 'deprecated',
|
|
91
|
-
'value' => false,
|
|
92
|
-
'version' => '4.5.0',
|
|
93
|
-
),
|
|
94
|
-
),
|
|
95
|
-
'add_option' => array(
|
|
96
|
-
3 => array(
|
|
97
|
-
'name' => 'deprecated',
|
|
98
|
-
'value' => '',
|
|
99
|
-
'version' => '2.3.0',
|
|
100
|
-
),
|
|
101
|
-
),
|
|
102
|
-
'comments_link' => array(
|
|
103
|
-
1 => array(
|
|
104
|
-
'name' => 'deprecated',
|
|
105
|
-
'value' => '',
|
|
106
|
-
'version' => '0.72',
|
|
107
|
-
),
|
|
108
|
-
2 => array(
|
|
109
|
-
'name' => 'deprecated_2',
|
|
110
|
-
'value' => '',
|
|
111
|
-
'version' => '1.3.0',
|
|
112
|
-
),
|
|
113
|
-
),
|
|
114
|
-
'convert_chars' => array(
|
|
115
|
-
2 => array(
|
|
116
|
-
'name' => 'deprecated',
|
|
117
|
-
'value' => '',
|
|
118
|
-
'version' => '0.71',
|
|
119
|
-
),
|
|
120
|
-
),
|
|
121
|
-
'delete_plugins' => array(
|
|
122
|
-
2 => array(
|
|
123
|
-
'name' => 'deprecated',
|
|
124
|
-
'value' => '',
|
|
125
|
-
'version' => '4.0.0',
|
|
126
|
-
),
|
|
127
|
-
),
|
|
128
|
-
'discover_pingback_server_uri' => array(
|
|
129
|
-
2 => array(
|
|
130
|
-
'name' => 'deprecated',
|
|
131
|
-
'value' => '',
|
|
132
|
-
'version' => '2.7.0',
|
|
133
|
-
),
|
|
134
|
-
),
|
|
135
|
-
'get_blog_list' => array(
|
|
136
|
-
3 => array(
|
|
137
|
-
'name' => 'deprecated',
|
|
138
|
-
'value' => '',
|
|
139
|
-
'version' => '3.0.0', // Was previously part of MU.
|
|
140
|
-
),
|
|
141
|
-
),
|
|
142
|
-
'get_category_parents' => array(
|
|
143
|
-
5 => array(
|
|
144
|
-
'name' => 'deprecated',
|
|
145
|
-
'value' => array(),
|
|
146
|
-
'version' => '4.8.0',
|
|
147
|
-
),
|
|
148
|
-
),
|
|
149
|
-
'get_delete_post_link' => array(
|
|
150
|
-
2 => array(
|
|
151
|
-
'name' => 'deprecated',
|
|
152
|
-
'value' => '',
|
|
153
|
-
'version' => '3.0.0',
|
|
154
|
-
),
|
|
155
|
-
),
|
|
156
|
-
'get_last_updated' => array(
|
|
157
|
-
1 => array(
|
|
158
|
-
'name' => 'deprecated',
|
|
159
|
-
'value' => '',
|
|
160
|
-
'version' => '3.0.0', // Was previously part of MU.
|
|
161
|
-
),
|
|
162
|
-
),
|
|
163
|
-
'get_site_option' => array(
|
|
164
|
-
3 => array(
|
|
165
|
-
'name' => 'deprecated',
|
|
166
|
-
'value' => true,
|
|
167
|
-
'version' => '4.4.0',
|
|
168
|
-
),
|
|
169
|
-
),
|
|
170
|
-
'get_terms' => array(
|
|
171
|
-
2 => array(
|
|
172
|
-
'name' => 'deprecated',
|
|
173
|
-
'value' => '',
|
|
174
|
-
'version' => '4.5.0',
|
|
175
|
-
),
|
|
176
|
-
),
|
|
177
|
-
'get_the_author' => array(
|
|
178
|
-
1 => array(
|
|
179
|
-
'name' => 'deprecated',
|
|
180
|
-
'value' => '',
|
|
181
|
-
'version' => '2.1.0',
|
|
182
|
-
),
|
|
183
|
-
),
|
|
184
|
-
'get_user_option' => array(
|
|
185
|
-
3 => array(
|
|
186
|
-
'name' => 'deprecated',
|
|
187
|
-
'value' => '',
|
|
188
|
-
'version' => '3.0.0',
|
|
189
|
-
),
|
|
190
|
-
),
|
|
191
|
-
'get_wp_title_rss' => array(
|
|
192
|
-
1 => array(
|
|
193
|
-
'name' => 'deprecated',
|
|
194
|
-
'value' => '–',
|
|
195
|
-
'version' => '4.4.0',
|
|
196
|
-
),
|
|
197
|
-
),
|
|
198
|
-
'global_terms' => array(
|
|
199
|
-
2 => array(
|
|
200
|
-
'name' => 'deprecated',
|
|
201
|
-
'value' => '',
|
|
202
|
-
'version' => '6.1.0',
|
|
203
|
-
),
|
|
204
|
-
),
|
|
205
|
-
'iframe_header' => array(
|
|
206
|
-
2 => array(
|
|
207
|
-
'name' => 'deprecated',
|
|
208
|
-
'value' => false,
|
|
209
|
-
'version' => '4.2.0',
|
|
210
|
-
),
|
|
211
|
-
),
|
|
212
|
-
'install_search_form' => array(
|
|
213
|
-
1 => array(
|
|
214
|
-
'name' => 'deprecated',
|
|
215
|
-
'value' => true,
|
|
216
|
-
'version' => '4.6.0',
|
|
217
|
-
),
|
|
218
|
-
),
|
|
219
|
-
'is_email' => array(
|
|
220
|
-
2 => array(
|
|
221
|
-
'name' => 'deprecated',
|
|
222
|
-
'value' => false,
|
|
223
|
-
'version' => '3.0.0',
|
|
224
|
-
),
|
|
225
|
-
),
|
|
226
|
-
'load_plugin_textdomain' => array(
|
|
227
|
-
2 => array(
|
|
228
|
-
'name' => 'deprecated',
|
|
229
|
-
'value' => false,
|
|
230
|
-
'version' => '2.7.0',
|
|
231
|
-
),
|
|
232
|
-
),
|
|
233
|
-
'newblog_notify_siteadmin' => array(
|
|
234
|
-
2 => array(
|
|
235
|
-
'name' => 'deprecated',
|
|
236
|
-
'value' => '',
|
|
237
|
-
'version' => '3.0.0',
|
|
238
|
-
),
|
|
239
|
-
),
|
|
240
|
-
'permalink_single_rss' => array(
|
|
241
|
-
1 => array(
|
|
242
|
-
'name' => 'deprecated',
|
|
243
|
-
'value' => '',
|
|
244
|
-
'version' => '2.3.0',
|
|
245
|
-
),
|
|
246
|
-
),
|
|
247
|
-
'redirect_this_site' => array(
|
|
248
|
-
1 => array(
|
|
249
|
-
'name' => 'deprecated',
|
|
250
|
-
'value' => '',
|
|
251
|
-
'version' => '3.0.0',
|
|
252
|
-
),
|
|
253
|
-
),
|
|
254
|
-
'register_meta' => array(
|
|
255
|
-
4 => array(
|
|
256
|
-
'name' => 'deprecated',
|
|
257
|
-
'value' => null,
|
|
258
|
-
'version' => '4.6.0',
|
|
259
|
-
),
|
|
260
|
-
),
|
|
261
|
-
'safecss_filter_attr' => array(
|
|
262
|
-
2 => array(
|
|
263
|
-
'name' => 'deprecated',
|
|
264
|
-
'value' => '',
|
|
265
|
-
'version' => '2.8.1',
|
|
266
|
-
),
|
|
267
|
-
),
|
|
268
|
-
'switch_to_blog' => array(
|
|
269
|
-
2 => array(
|
|
270
|
-
'name' => 'deprecated',
|
|
271
|
-
'value' => null,
|
|
272
|
-
'version' => '3.5.0', // Was previously part of MU.
|
|
273
|
-
),
|
|
274
|
-
),
|
|
275
|
-
'term_description' => array(
|
|
276
|
-
2 => array(
|
|
277
|
-
'name' => 'deprecated',
|
|
278
|
-
'value' => null,
|
|
279
|
-
'version' => '4.9.2',
|
|
280
|
-
),
|
|
281
|
-
),
|
|
282
|
-
'the_attachment_link' => array(
|
|
283
|
-
3 => array(
|
|
284
|
-
'name' => 'deprecated',
|
|
285
|
-
'value' => false,
|
|
286
|
-
'version' => '2.5.0',
|
|
287
|
-
),
|
|
288
|
-
),
|
|
289
|
-
'the_author' => array(
|
|
290
|
-
1 => array(
|
|
291
|
-
'name' => 'deprecated',
|
|
292
|
-
'value' => '',
|
|
293
|
-
'version' => '2.1.0',
|
|
294
|
-
),
|
|
295
|
-
2 => array(
|
|
296
|
-
'name' => 'deprecated_echo',
|
|
297
|
-
'value' => true,
|
|
298
|
-
'version' => '1.5.0',
|
|
299
|
-
),
|
|
300
|
-
),
|
|
301
|
-
'the_author_posts_link' => array(
|
|
302
|
-
1 => array(
|
|
303
|
-
'name' => 'deprecated',
|
|
304
|
-
'value' => '',
|
|
305
|
-
'version' => '2.1.0',
|
|
306
|
-
),
|
|
307
|
-
),
|
|
308
|
-
'trackback_rdf' => array(
|
|
309
|
-
1 => array(
|
|
310
|
-
'name' => 'deprecated',
|
|
311
|
-
'value' => '',
|
|
312
|
-
'version' => '2.5.0',
|
|
313
|
-
),
|
|
314
|
-
),
|
|
315
|
-
'trackback_url' => array(
|
|
316
|
-
1 => array(
|
|
317
|
-
'name' => 'deprecated_echo',
|
|
318
|
-
'value' => true,
|
|
319
|
-
'version' => '2.5.0',
|
|
320
|
-
),
|
|
321
|
-
),
|
|
322
|
-
'unregister_setting' => array(
|
|
323
|
-
3 => array(
|
|
324
|
-
'name' => 'deprecated',
|
|
325
|
-
'value' => '',
|
|
326
|
-
'version' => '4.7.0',
|
|
327
|
-
),
|
|
328
|
-
),
|
|
329
|
-
'update_blog_option' => array(
|
|
330
|
-
4 => array(
|
|
331
|
-
'name' => 'deprecated',
|
|
332
|
-
'value' => null,
|
|
333
|
-
'version' => '3.1.0',
|
|
334
|
-
),
|
|
335
|
-
),
|
|
336
|
-
'update_blog_status' => array(
|
|
337
|
-
4 => array(
|
|
338
|
-
'name' => 'deprecated',
|
|
339
|
-
'value' => null,
|
|
340
|
-
'version' => '3.1.0',
|
|
341
|
-
),
|
|
342
|
-
),
|
|
343
|
-
'update_posts_count' => array(
|
|
344
|
-
1 => array(
|
|
345
|
-
'name' => 'deprecated',
|
|
346
|
-
'value' => '',
|
|
347
|
-
'version' => '3.0.0',
|
|
348
|
-
),
|
|
349
|
-
),
|
|
350
|
-
'update_user_status' => array(
|
|
351
|
-
4 => array(
|
|
352
|
-
'name' => 'deprecated',
|
|
353
|
-
'value' => null,
|
|
354
|
-
'version' => '3.0.2',
|
|
355
|
-
),
|
|
356
|
-
),
|
|
357
|
-
'wp_count_terms' => array(
|
|
358
|
-
2 => array(
|
|
359
|
-
'name' => 'deprecated',
|
|
360
|
-
'value' => '',
|
|
361
|
-
'version' => '5.6.0',
|
|
362
|
-
),
|
|
363
|
-
),
|
|
364
|
-
'wp_create_thumbnail' => array(
|
|
365
|
-
3 => array(
|
|
366
|
-
'name' => 'deprecated',
|
|
367
|
-
'value' => '',
|
|
368
|
-
'version' => '3.5.0',
|
|
369
|
-
),
|
|
370
|
-
),
|
|
371
|
-
'wp_get_http_headers' => array(
|
|
372
|
-
2 => array(
|
|
373
|
-
'name' => 'deprecated',
|
|
374
|
-
'value' => false,
|
|
375
|
-
'version' => '2.7.0',
|
|
376
|
-
),
|
|
377
|
-
),
|
|
378
|
-
'wp_get_sidebars_widgets' => array(
|
|
379
|
-
1 => array(
|
|
380
|
-
'name' => 'deprecated',
|
|
381
|
-
'value' => true,
|
|
382
|
-
'version' => '2.8.1',
|
|
383
|
-
),
|
|
384
|
-
),
|
|
385
|
-
'wp_install' => array(
|
|
386
|
-
5 => array(
|
|
387
|
-
'name' => 'deprecated',
|
|
388
|
-
'value' => '',
|
|
389
|
-
'version' => '2.6.0',
|
|
390
|
-
),
|
|
391
|
-
),
|
|
392
|
-
'wp_login' => array(
|
|
393
|
-
3 => array(
|
|
394
|
-
'name' => 'deprecated',
|
|
395
|
-
'value' => '',
|
|
396
|
-
'version' => '2.5.0',
|
|
397
|
-
),
|
|
398
|
-
),
|
|
399
|
-
'wp_new_user_notification' => array(
|
|
400
|
-
2 => array(
|
|
401
|
-
'name' => 'deprecated',
|
|
402
|
-
'value' => null,
|
|
403
|
-
'version' => '4.3.1',
|
|
404
|
-
),
|
|
405
|
-
),
|
|
406
|
-
'wp_notify_postauthor' => array(
|
|
407
|
-
2 => array(
|
|
408
|
-
'name' => 'deprecated',
|
|
409
|
-
'value' => null,
|
|
410
|
-
'version' => '3.8.0',
|
|
411
|
-
),
|
|
412
|
-
),
|
|
413
|
-
'wp_title_rss' => array(
|
|
414
|
-
1 => array(
|
|
415
|
-
'name' => 'deprecated',
|
|
416
|
-
'value' => '–',
|
|
417
|
-
'version' => '4.4.0',
|
|
418
|
-
),
|
|
419
|
-
),
|
|
420
|
-
'wp_upload_bits' => array(
|
|
421
|
-
2 => array(
|
|
422
|
-
'name' => 'deprecated',
|
|
423
|
-
'value' => null,
|
|
424
|
-
'version' => '2.0.0',
|
|
425
|
-
),
|
|
426
|
-
),
|
|
427
|
-
'xfn_check' => array(
|
|
428
|
-
3 => array(
|
|
429
|
-
'name' => 'deprecated',
|
|
430
|
-
'value' => '',
|
|
431
|
-
'version' => '2.5.0',
|
|
432
|
-
),
|
|
433
|
-
),
|
|
434
|
-
);
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Process the parameters of a matched function.
|
|
438
|
-
*
|
|
439
|
-
* @since 0.12.0
|
|
440
|
-
*
|
|
441
|
-
* @param int $stackPtr The position of the current token in the stack.
|
|
442
|
-
* @param string $group_name The name of the group which was matched.
|
|
443
|
-
* @param string $matched_content The token content (function name) which was matched
|
|
444
|
-
* in lowercase.
|
|
445
|
-
* @param array $parameters Array with information about the parameters.
|
|
446
|
-
*
|
|
447
|
-
* @return void
|
|
448
|
-
*/
|
|
449
|
-
public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {
|
|
450
|
-
|
|
451
|
-
$this->set_minimum_wp_version();
|
|
452
|
-
|
|
453
|
-
$paramCount = \count( $parameters );
|
|
454
|
-
foreach ( $this->target_functions[ $matched_content ] as $position => $parameter_args ) {
|
|
455
|
-
|
|
456
|
-
$found_param = PassedParameters::getParameterFromStack( $parameters, $position, $parameter_args['name'] );
|
|
457
|
-
if ( false === $found_param ) {
|
|
458
|
-
continue;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
// The list will need to updated if the default value is not supported.
|
|
462
|
-
switch ( $found_param['raw'] ) {
|
|
463
|
-
case 'true':
|
|
464
|
-
$matched_parameter = true;
|
|
465
|
-
break;
|
|
466
|
-
case 'false':
|
|
467
|
-
$matched_parameter = false;
|
|
468
|
-
break;
|
|
469
|
-
case 'null':
|
|
470
|
-
$matched_parameter = null;
|
|
471
|
-
break;
|
|
472
|
-
case 'array()':
|
|
473
|
-
case '[]':
|
|
474
|
-
$matched_parameter = array();
|
|
475
|
-
break;
|
|
476
|
-
default:
|
|
477
|
-
$matched_parameter = TextStrings::stripQuotes( $found_param['raw'] );
|
|
478
|
-
break;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
if ( $parameter_args['value'] === $matched_parameter ) {
|
|
482
|
-
continue;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
$message = 'The parameter "%s" at position #%s of %s() has been deprecated since WordPress version %s.';
|
|
486
|
-
$is_error = $this->wp_version_compare( $parameter_args['version'], $this->minimum_wp_version, '<' );
|
|
487
|
-
$code = MessageHelper::stringToErrorcode( ucfirst( $matched_content ) . 'Param' . $position . 'Found' );
|
|
488
|
-
|
|
489
|
-
$data = array(
|
|
490
|
-
$found_param['raw'],
|
|
491
|
-
$position,
|
|
492
|
-
$matched_content,
|
|
493
|
-
$parameter_args['version'],
|
|
494
|
-
);
|
|
495
|
-
|
|
496
|
-
if ( isset( $parameter_args['value'] )
|
|
497
|
-
&& isset( $found_param['name'] ) === false
|
|
498
|
-
&& $position < $paramCount
|
|
499
|
-
) {
|
|
500
|
-
$message .= ' Use "%s" instead.';
|
|
501
|
-
$data[] = (string) $parameter_args['value'];
|
|
502
|
-
} else {
|
|
503
|
-
$message .= ' Instead do not pass the parameter.';
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
MessageHelper::addMessage( $this->phpcsFile, $message, $stackPtr, $is_error, $code, $data, 0 );
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
/**
|
|
3
|
-
* WordPress Coding Standard.
|
|
4
|
-
*
|
|
5
|
-
* @package WPCS\WordPressCodingStandards
|
|
6
|
-
* @link https://github.com/WordPress/WordPress-Coding-Standards
|
|
7
|
-
* @license https://opensource.org/licenses/MIT MIT
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
namespace WordPressCS\WordPress\Sniffs\WP;
|
|
11
|
-
|
|
12
|
-
use PHP_CodeSniffer\Util\Tokens;
|
|
13
|
-
use PHPCSUtils\Utils\MessageHelper;
|
|
14
|
-
use PHPCSUtils\Utils\PassedParameters;
|
|
15
|
-
use PHPCSUtils\Utils\TextStrings;
|
|
16
|
-
use WordPressCS\WordPress\AbstractFunctionParameterSniff;
|
|
17
|
-
use WordPressCS\WordPress\Helpers\ConstantsHelper;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Warns against usage of discouraged WP CONSTANTS and recommends alternatives.
|
|
21
|
-
*
|
|
22
|
-
* @since 0.14.0
|
|
23
|
-
*/
|
|
24
|
-
final class DiscouragedConstantsSniff extends AbstractFunctionParameterSniff {
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* List of discouraged WP constants and their replacements.
|
|
28
|
-
*
|
|
29
|
-
* @since 0.14.0
|
|
30
|
-
*
|
|
31
|
-
* @var array
|
|
32
|
-
*/
|
|
33
|
-
protected $discouraged_constants = array(
|
|
34
|
-
'STYLESHEETPATH' => 'get_stylesheet_directory()',
|
|
35
|
-
'TEMPLATEPATH' => 'get_template_directory()',
|
|
36
|
-
'PLUGINDIR' => 'WP_PLUGIN_DIR',
|
|
37
|
-
'MUPLUGINDIR' => 'WPMU_PLUGIN_DIR',
|
|
38
|
-
'HEADER_IMAGE' => 'add_theme_support( \'custom-header\' )',
|
|
39
|
-
'NO_HEADER_TEXT' => 'add_theme_support( \'custom-header\' )',
|
|
40
|
-
'HEADER_TEXTCOLOR' => 'add_theme_support( \'custom-header\' )',
|
|
41
|
-
'HEADER_IMAGE_WIDTH' => 'add_theme_support( \'custom-header\' )',
|
|
42
|
-
'HEADER_IMAGE_HEIGHT' => 'add_theme_support( \'custom-header\' )',
|
|
43
|
-
'BACKGROUND_COLOR' => 'add_theme_support( \'custom-background\' )',
|
|
44
|
-
'BACKGROUND_IMAGE' => 'add_theme_support( \'custom-background\' )',
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Array of functions to check.
|
|
49
|
-
*
|
|
50
|
-
* @since 0.14.0
|
|
51
|
-
* @since 3.0.0 The format of the value has changed from an integer parameter
|
|
52
|
-
* position to an array with the parameter position and name.
|
|
53
|
-
*
|
|
54
|
-
* @var array<string, array<string, int|string>> Function name as key, array with target
|
|
55
|
-
* parameter and name as value.
|
|
56
|
-
*/
|
|
57
|
-
protected $target_functions = array(
|
|
58
|
-
'define' => array(
|
|
59
|
-
'position' => 1,
|
|
60
|
-
'name' => 'constant_name',
|
|
61
|
-
),
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Processes this test, when one of its tokens is encountered.
|
|
66
|
-
*
|
|
67
|
-
* @since 0.14.0
|
|
68
|
-
*
|
|
69
|
-
* @param int $stackPtr The position of the current token in the stack.
|
|
70
|
-
*
|
|
71
|
-
* @return int|void Integer stack pointer to skip forward or void to continue
|
|
72
|
-
* normal file processing.
|
|
73
|
-
*/
|
|
74
|
-
public function process_token( $stackPtr ) {
|
|
75
|
-
if ( isset( $this->target_functions[ strtolower( $this->tokens[ $stackPtr ]['content'] ) ] ) ) {
|
|
76
|
-
// Disallow excluding function groups for this sniff.
|
|
77
|
-
$this->exclude = array();
|
|
78
|
-
|
|
79
|
-
return parent::process_token( $stackPtr );
|
|
80
|
-
|
|
81
|
-
} else {
|
|
82
|
-
return $this->process_arbitrary_tstring( $stackPtr );
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Process an arbitrary T_STRING token to determine whether it is one of the target constants.
|
|
88
|
-
*
|
|
89
|
-
* @since 0.14.0
|
|
90
|
-
*
|
|
91
|
-
* @param int $stackPtr The position of the current token in the stack.
|
|
92
|
-
*
|
|
93
|
-
* @return void
|
|
94
|
-
*/
|
|
95
|
-
public function process_arbitrary_tstring( $stackPtr ) {
|
|
96
|
-
$content = $this->tokens[ $stackPtr ]['content'];
|
|
97
|
-
|
|
98
|
-
if ( ! isset( $this->discouraged_constants[ $content ] ) ) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if ( ConstantsHelper::is_use_of_global_constant( $this->phpcsFile, $stackPtr ) === false ) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
$this->phpcsFile->addWarning(
|
|
107
|
-
'Found usage of constant "%s". Use %s instead.',
|
|
108
|
-
$stackPtr,
|
|
109
|
-
MessageHelper::stringToErrorcode( $content . 'UsageFound' ),
|
|
110
|
-
array(
|
|
111
|
-
$content,
|
|
112
|
-
$this->discouraged_constants[ $content ],
|
|
113
|
-
)
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Process the parameters of a matched `define` function call.
|
|
119
|
-
*
|
|
120
|
-
* @since 0.14.0
|
|
121
|
-
*
|
|
122
|
-
* @param int $stackPtr The position of the current token in the stack.
|
|
123
|
-
* @param string $group_name The name of the group which was matched.
|
|
124
|
-
* @param string $matched_content The token content (function name) which was matched
|
|
125
|
-
* in lowercase.
|
|
126
|
-
* @param array $parameters Array with information about the parameters.
|
|
127
|
-
*
|
|
128
|
-
* @return void
|
|
129
|
-
*/
|
|
130
|
-
public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {
|
|
131
|
-
$target_param = $this->target_functions[ $matched_content ];
|
|
132
|
-
|
|
133
|
-
// Was the target parameter passed ?
|
|
134
|
-
$found_param = PassedParameters::getParameterFromStack( $parameters, $target_param['position'], $target_param['name'] );
|
|
135
|
-
if ( false === $found_param ) {
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
$clean_content = TextStrings::stripQuotes( $found_param['clean'] );
|
|
140
|
-
|
|
141
|
-
if ( isset( $this->discouraged_constants[ $clean_content ] ) ) {
|
|
142
|
-
$first_non_empty = $this->phpcsFile->findNext(
|
|
143
|
-
Tokens::$emptyTokens,
|
|
144
|
-
$found_param['start'],
|
|
145
|
-
( $found_param['end'] + 1 ),
|
|
146
|
-
true
|
|
147
|
-
);
|
|
148
|
-
|
|
149
|
-
$this->phpcsFile->addWarning(
|
|
150
|
-
'Found declaration of constant "%s". Use %s instead.',
|
|
151
|
-
$first_non_empty,
|
|
152
|
-
MessageHelper::stringToErrorcode( $clean_content . 'DeclarationFound' ),
|
|
153
|
-
array(
|
|
154
|
-
$clean_content,
|
|
155
|
-
$this->discouraged_constants[ $clean_content ],
|
|
156
|
-
)
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|