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,115 +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\Helpers;
|
|
11
|
-
|
|
12
|
-
use PHP_CodeSniffer\Files\File;
|
|
13
|
-
use PHP_CodeSniffer\Util\Tokens;
|
|
14
|
-
use PHPCSUtils\BackCompat\BCFile;
|
|
15
|
-
use PHPCSUtils\Tokens\Collections;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Helper utilities for sniffs which examine WPDB method calls.
|
|
19
|
-
*
|
|
20
|
-
* @since 3.0.0 The method in this trait was previously contained in the
|
|
21
|
-
* `WordPressCS\WordPress\Sniff` class and has been moved here.
|
|
22
|
-
*/
|
|
23
|
-
trait WPDBTrait {
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Checks whether this is a call to a $wpdb method that we want to sniff.
|
|
27
|
-
*
|
|
28
|
-
* If available in the class using this trait, the $methodPtr, $i and $end properties
|
|
29
|
-
* are automatically set to correspond to the start and end of the method call.
|
|
30
|
-
* The $i property is also set if this is not a method call but rather the
|
|
31
|
-
* use of a $wpdb property.
|
|
32
|
-
*
|
|
33
|
-
* @since 0.8.0
|
|
34
|
-
* @since 0.9.0 The return value is now always boolean. The $end and $i member
|
|
35
|
-
* vars are automatically updated.
|
|
36
|
-
* @since 0.14.0 Moved this method from the `PreparedSQL` sniff to the base WP sniff.
|
|
37
|
-
* @since 3.0.0 - Moved from the Sniff class to this dedicated Trait.
|
|
38
|
-
* - The `$phpcsFile` parameter was added.
|
|
39
|
-
*
|
|
40
|
-
* {@internal This method should be refactored to not exhibit "magic" behaviour
|
|
41
|
-
* for properties in the sniff class(es) using it.}}
|
|
42
|
-
*
|
|
43
|
-
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
|
|
44
|
-
* @param int $stackPtr The index of the $wpdb variable.
|
|
45
|
-
* @param array $target_methods Array of methods. Key(s) should be method name
|
|
46
|
-
* in lowercase.
|
|
47
|
-
*
|
|
48
|
-
* @return bool Whether this is a $wpdb method call.
|
|
49
|
-
*/
|
|
50
|
-
final protected function is_wpdb_method_call( File $phpcsFile, $stackPtr, array $target_methods ) {
|
|
51
|
-
$tokens = $phpcsFile->getTokens();
|
|
52
|
-
if ( isset( $tokens[ $stackPtr ] ) === false ) {
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Check for wpdb.
|
|
57
|
-
if ( ( \T_VARIABLE === $tokens[ $stackPtr ]['code'] && '$wpdb' !== $tokens[ $stackPtr ]['content'] )
|
|
58
|
-
|| ( \T_STRING === $tokens[ $stackPtr ]['code'] && 'wpdb' !== strtolower( $tokens[ $stackPtr ]['content'] ) )
|
|
59
|
-
) {
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Check that this is a method call.
|
|
64
|
-
$is_object_call = $phpcsFile->findNext( Tokens::$emptyTokens, ( $stackPtr + 1 ), null, true );
|
|
65
|
-
if ( false === $is_object_call
|
|
66
|
-
|| isset( Collections::objectOperators()[ $tokens[ $is_object_call ]['code'] ] ) === false
|
|
67
|
-
) {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
$methodPtr = $phpcsFile->findNext( Tokens::$emptyTokens, ( $is_object_call + 1 ), null, true, null, true );
|
|
72
|
-
if ( false === $methodPtr ) {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if ( \T_STRING === $tokens[ $methodPtr ]['code'] && property_exists( $this, 'methodPtr' ) ) {
|
|
77
|
-
$this->methodPtr = $methodPtr;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// Find the opening parenthesis.
|
|
81
|
-
$opening_paren = $phpcsFile->findNext( Tokens::$emptyTokens, ( $methodPtr + 1 ), null, true, null, true );
|
|
82
|
-
|
|
83
|
-
if ( false === $opening_paren ) {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if ( property_exists( $this, 'i' ) ) {
|
|
88
|
-
$this->i = $opening_paren;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if ( \T_OPEN_PARENTHESIS !== $tokens[ $opening_paren ]['code']
|
|
92
|
-
|| ! isset( $tokens[ $opening_paren ]['parenthesis_closer'] )
|
|
93
|
-
) {
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Check that this is one of the methods that we are interested in.
|
|
98
|
-
if ( ! isset( $target_methods[ strtolower( $tokens[ $methodPtr ]['content'] ) ] ) ) {
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Find the end of the first parameter.
|
|
103
|
-
$end = BCFile::findEndOfStatement( $phpcsFile, $opening_paren + 1 );
|
|
104
|
-
|
|
105
|
-
if ( \T_COMMA !== $tokens[ $end ]['code'] ) {
|
|
106
|
-
++$end;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if ( property_exists( $this, 'end' ) ) {
|
|
110
|
-
$this->end = $end;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
@@ -1,312 +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\Helpers;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Helper utilities for recognizing WP global variables.
|
|
14
|
-
*
|
|
15
|
-
* @since 3.0.0 The property in this class was previously contained in the
|
|
16
|
-
* `WordPressCS\WordPress\Sniff` class and has been moved here.
|
|
17
|
-
*/
|
|
18
|
-
final class WPGlobalVariablesHelper {
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* List of global WP variables.
|
|
22
|
-
*
|
|
23
|
-
* @since 0.3.0
|
|
24
|
-
* @since 0.11.0 Changed visibility from public to protected.
|
|
25
|
-
* @since 0.12.0 Renamed from `$globals` to `$wp_globals` to be more descriptive.
|
|
26
|
-
* @since 0.12.0 Moved to the `Sniff` class from the WordPress.Variables.GlobalVariables sniff.
|
|
27
|
-
* @since 3.0.0 - Moved from the Sniff class to this class.
|
|
28
|
-
* - The property visibility has changed from `protected` to `private static`.
|
|
29
|
-
* Use the `get_names()` method for access or use the `is_wp_global()` method
|
|
30
|
-
* to check if a name is on the list.
|
|
31
|
-
*
|
|
32
|
-
* @var array<string, bool> The key is the name of a WP global variable, the value is irrelevant.
|
|
33
|
-
*/
|
|
34
|
-
private static $wp_globals = array(
|
|
35
|
-
'_links_add_base' => true,
|
|
36
|
-
'_links_add_target' => true,
|
|
37
|
-
'_menu_item_sort_prop' => true,
|
|
38
|
-
'_nav_menu_placeholder' => true,
|
|
39
|
-
'_new_bundled_files' => true,
|
|
40
|
-
'_old_files' => true,
|
|
41
|
-
'_parent_pages' => true,
|
|
42
|
-
'_registered_pages' => true,
|
|
43
|
-
'_updated_user_settings' => true,
|
|
44
|
-
'_wp_additional_image_sizes' => true,
|
|
45
|
-
'_wp_admin_css_colors' => true,
|
|
46
|
-
'_wp_default_headers' => true,
|
|
47
|
-
'_wp_deprecated_widgets_callbacks' => true,
|
|
48
|
-
'_wp_last_object_menu' => true,
|
|
49
|
-
'_wp_last_utility_menu' => true,
|
|
50
|
-
'_wp_menu_nopriv' => true,
|
|
51
|
-
'_wp_nav_menu_max_depth' => true,
|
|
52
|
-
'_wp_post_type_features' => true,
|
|
53
|
-
'_wp_real_parent_file' => true,
|
|
54
|
-
'_wp_registered_nav_menus' => true,
|
|
55
|
-
'_wp_sidebars_widgets' => true,
|
|
56
|
-
'_wp_submenu_nopriv' => true,
|
|
57
|
-
'_wp_suspend_cache_invalidation' => true,
|
|
58
|
-
'_wp_theme_features' => true,
|
|
59
|
-
'_wp_using_ext_object_cache' => true,
|
|
60
|
-
'action' => true,
|
|
61
|
-
'active_signup' => true,
|
|
62
|
-
'admin_body_class' => true,
|
|
63
|
-
'admin_page_hooks' => true,
|
|
64
|
-
'all_links' => true,
|
|
65
|
-
'allowedentitynames' => true,
|
|
66
|
-
'allowedposttags' => true,
|
|
67
|
-
'allowedtags' => true,
|
|
68
|
-
'auth_secure_cookie' => true,
|
|
69
|
-
'authordata' => true,
|
|
70
|
-
'avail_post_mime_types' => true,
|
|
71
|
-
'avail_post_stati' => true,
|
|
72
|
-
'blog_id' => true,
|
|
73
|
-
'blog_title' => true,
|
|
74
|
-
'blogname' => true,
|
|
75
|
-
'cat' => true,
|
|
76
|
-
'cat_id' => true,
|
|
77
|
-
'charset_collate' => true,
|
|
78
|
-
'comment' => true,
|
|
79
|
-
'comment_alt' => true,
|
|
80
|
-
'comment_depth' => true,
|
|
81
|
-
'comment_status' => true,
|
|
82
|
-
'comment_thread_alt' => true,
|
|
83
|
-
'comment_type' => true,
|
|
84
|
-
'comments' => true,
|
|
85
|
-
'compress_css' => true,
|
|
86
|
-
'compress_scripts' => true,
|
|
87
|
-
'concatenate_scripts' => true,
|
|
88
|
-
'content_width' => true,
|
|
89
|
-
'current_blog' => true,
|
|
90
|
-
'current_screen' => true,
|
|
91
|
-
'current_site' => true,
|
|
92
|
-
'current_user' => true,
|
|
93
|
-
'currentcat' => true,
|
|
94
|
-
'currentday' => true,
|
|
95
|
-
'currentmonth' => true,
|
|
96
|
-
'custom_background' => true,
|
|
97
|
-
'custom_image_header' => true,
|
|
98
|
-
'default_menu_order' => true,
|
|
99
|
-
'descriptions' => true,
|
|
100
|
-
'domain' => true,
|
|
101
|
-
'editor_styles' => true,
|
|
102
|
-
'error' => true,
|
|
103
|
-
'errors' => true,
|
|
104
|
-
'EZSQL_ERROR' => true,
|
|
105
|
-
'feeds' => true,
|
|
106
|
-
'GETID3_ERRORARRAY' => true,
|
|
107
|
-
'hook_suffix' => true,
|
|
108
|
-
'HTTP_RAW_POST_DATA' => true,
|
|
109
|
-
'id' => true,
|
|
110
|
-
'in_comment_loop' => true,
|
|
111
|
-
'interim_login' => true,
|
|
112
|
-
'is_apache' => true,
|
|
113
|
-
'is_chrome' => true,
|
|
114
|
-
'is_gecko' => true,
|
|
115
|
-
'is_IE' => true,
|
|
116
|
-
'is_IIS' => true,
|
|
117
|
-
'is_iis7' => true,
|
|
118
|
-
'is_macIE' => true,
|
|
119
|
-
'is_NS4' => true,
|
|
120
|
-
'is_opera' => true,
|
|
121
|
-
'is_safari' => true,
|
|
122
|
-
'is_winIE' => true,
|
|
123
|
-
'l10n' => true,
|
|
124
|
-
'link' => true,
|
|
125
|
-
'link_id' => true,
|
|
126
|
-
'locale' => true,
|
|
127
|
-
'locked_post_status' => true,
|
|
128
|
-
'lost' => true,
|
|
129
|
-
'm' => true,
|
|
130
|
-
'map' => true,
|
|
131
|
-
'menu' => true,
|
|
132
|
-
'menu_order' => true,
|
|
133
|
-
'merged_filters' => true,
|
|
134
|
-
'mode' => true,
|
|
135
|
-
'monthnum' => true,
|
|
136
|
-
'more' => true,
|
|
137
|
-
'mu_plugin' => true,
|
|
138
|
-
'multipage' => true,
|
|
139
|
-
'names' => true,
|
|
140
|
-
'nav_menu_selected_id' => true,
|
|
141
|
-
'network_plugin' => true,
|
|
142
|
-
'new_whitelist_options' => true,
|
|
143
|
-
'numpages' => true,
|
|
144
|
-
'one_theme_location_no_menus' => true,
|
|
145
|
-
'opml' => true,
|
|
146
|
-
'order' => true,
|
|
147
|
-
'orderby' => true,
|
|
148
|
-
'overridden_cpage' => true,
|
|
149
|
-
'page' => true,
|
|
150
|
-
'paged' => true,
|
|
151
|
-
'pagenow' => true,
|
|
152
|
-
'pages' => true,
|
|
153
|
-
'parent_file' => true,
|
|
154
|
-
'pass_allowed_html' => true,
|
|
155
|
-
'pass_allowed_protocols' => true,
|
|
156
|
-
'path' => true,
|
|
157
|
-
'per_page' => true,
|
|
158
|
-
'PHP_SELF' => true,
|
|
159
|
-
'phpmailer' => true,
|
|
160
|
-
'plugin_page' => true,
|
|
161
|
-
'plugin' => true,
|
|
162
|
-
'plugins' => true,
|
|
163
|
-
'post' => true,
|
|
164
|
-
'post_default_category' => true,
|
|
165
|
-
'post_default_title' => true,
|
|
166
|
-
'post_ID' => true,
|
|
167
|
-
'post_id' => true,
|
|
168
|
-
'post_mime_types' => true,
|
|
169
|
-
'post_type' => true,
|
|
170
|
-
'post_type_object' => true,
|
|
171
|
-
'posts' => true,
|
|
172
|
-
'preview' => true,
|
|
173
|
-
'previouscat' => true,
|
|
174
|
-
'previousday' => true,
|
|
175
|
-
'previousweekday' => true,
|
|
176
|
-
'redir_tab' => true,
|
|
177
|
-
'required_mysql_version' => true,
|
|
178
|
-
'required_php_version' => true,
|
|
179
|
-
'rnd_value' => true,
|
|
180
|
-
'role' => true,
|
|
181
|
-
's' => true,
|
|
182
|
-
'search' => true,
|
|
183
|
-
'self' => true,
|
|
184
|
-
'shortcode_tags' => true,
|
|
185
|
-
'show_admin_bar' => true,
|
|
186
|
-
'sidebars_widgets' => true,
|
|
187
|
-
'status' => true,
|
|
188
|
-
'submenu' => true,
|
|
189
|
-
'submenu_file' => true,
|
|
190
|
-
'super_admins' => true,
|
|
191
|
-
'tab' => true,
|
|
192
|
-
'table_prefix' => true,
|
|
193
|
-
'tabs' => true,
|
|
194
|
-
'tag' => true,
|
|
195
|
-
'tag_ID' => true,
|
|
196
|
-
'targets' => true,
|
|
197
|
-
'tax' => true,
|
|
198
|
-
'taxnow' => true,
|
|
199
|
-
'taxonomy' => true,
|
|
200
|
-
'term' => true,
|
|
201
|
-
'text_direction' => true,
|
|
202
|
-
'theme_field_defaults' => true,
|
|
203
|
-
'themes_allowedtags' => true,
|
|
204
|
-
'timeend' => true,
|
|
205
|
-
'timestart' => true,
|
|
206
|
-
'tinymce_version' => true,
|
|
207
|
-
'title' => true,
|
|
208
|
-
'totals' => true,
|
|
209
|
-
'type' => true,
|
|
210
|
-
'typenow' => true,
|
|
211
|
-
'updated_timestamp' => true,
|
|
212
|
-
'upgrading' => true,
|
|
213
|
-
'urls' => true,
|
|
214
|
-
'user_email' => true,
|
|
215
|
-
'user_ID' => true,
|
|
216
|
-
'user_identity' => true,
|
|
217
|
-
'user_level' => true,
|
|
218
|
-
'user_login' => true,
|
|
219
|
-
'user_url' => true,
|
|
220
|
-
'userdata' => true,
|
|
221
|
-
'usersearch' => true,
|
|
222
|
-
'whitelist_options' => true,
|
|
223
|
-
'withcomments' => true,
|
|
224
|
-
'wp' => true,
|
|
225
|
-
'wp_actions' => true,
|
|
226
|
-
'wp_admin_bar' => true,
|
|
227
|
-
'wp_cockneyreplace' => true,
|
|
228
|
-
'wp_current_db_version' => true,
|
|
229
|
-
'wp_current_filter' => true,
|
|
230
|
-
'wp_customize' => true,
|
|
231
|
-
'wp_dashboard_control_callbacks' => true,
|
|
232
|
-
'wp_db_version' => true,
|
|
233
|
-
'wp_did_header' => true,
|
|
234
|
-
'wp_embed' => true,
|
|
235
|
-
'wp_file_descriptions' => true,
|
|
236
|
-
'wp_filesystem' => true,
|
|
237
|
-
'wp_filter' => true,
|
|
238
|
-
'wp_hasher' => true,
|
|
239
|
-
'wp_header_to_desc' => true,
|
|
240
|
-
'wp_importers' => true,
|
|
241
|
-
'wp_json' => true,
|
|
242
|
-
'wp_list_table' => true,
|
|
243
|
-
'wp_local_package' => true,
|
|
244
|
-
'wp_locale' => true,
|
|
245
|
-
'wp_meta_boxes' => true,
|
|
246
|
-
'wp_object_cache' => true,
|
|
247
|
-
'wp_plugin_paths' => true,
|
|
248
|
-
'wp_post_statuses' => true,
|
|
249
|
-
'wp_post_types' => true,
|
|
250
|
-
'wp_queries' => true,
|
|
251
|
-
'wp_query' => true,
|
|
252
|
-
'wp_registered_sidebars' => true,
|
|
253
|
-
'wp_registered_widget_controls' => true,
|
|
254
|
-
'wp_registered_widget_updates' => true,
|
|
255
|
-
'wp_registered_widgets' => true,
|
|
256
|
-
'wp_rewrite' => true,
|
|
257
|
-
'wp_rich_edit' => true,
|
|
258
|
-
'wp_rich_edit_exists' => true,
|
|
259
|
-
'wp_roles' => true,
|
|
260
|
-
'wp_scripts' => true,
|
|
261
|
-
'wp_settings_errors' => true,
|
|
262
|
-
'wp_settings_fields' => true,
|
|
263
|
-
'wp_settings_sections' => true,
|
|
264
|
-
'wp_smiliessearch' => true,
|
|
265
|
-
'wp_styles' => true,
|
|
266
|
-
'wp_taxonomies' => true,
|
|
267
|
-
'wp_the_query' => true,
|
|
268
|
-
'wp_theme_directories' => true,
|
|
269
|
-
'wp_themes' => true,
|
|
270
|
-
'wp_user_roles' => true,
|
|
271
|
-
'wp_version' => true,
|
|
272
|
-
'wp_widget_factory' => true,
|
|
273
|
-
'wp_xmlrpc_server' => true,
|
|
274
|
-
'wpcommentsjavascript' => true,
|
|
275
|
-
'wpcommentspopupfile' => true,
|
|
276
|
-
'wpdb' => true,
|
|
277
|
-
'wpsmiliestrans' => true,
|
|
278
|
-
'year' => true,
|
|
279
|
-
);
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Retrieve a list with the names of global WP variables.
|
|
283
|
-
*
|
|
284
|
-
* @since 3.0.0
|
|
285
|
-
*
|
|
286
|
-
* @return array<string, bool> Array with the variables names as keys. The value is irrelevant.
|
|
287
|
-
*/
|
|
288
|
-
public static function get_names() {
|
|
289
|
-
return self::$wp_globals;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Verify if a given variable name is the name of a WP global variable.
|
|
294
|
-
*
|
|
295
|
-
* @since 3.0.0
|
|
296
|
-
*
|
|
297
|
-
* @param string $name The full variable name with or without leading dollar sign.
|
|
298
|
-
* This allows for passing an array key variable name, such as
|
|
299
|
-
* `'_GET'` retrieved from `$GLOBALS['_GET']`.
|
|
300
|
-
* > Note: when passing an array key, string quotes are expected
|
|
301
|
-
* to have been stripped already.
|
|
302
|
-
*
|
|
303
|
-
* @return bool
|
|
304
|
-
*/
|
|
305
|
-
public static function is_wp_global( $name ) {
|
|
306
|
-
if ( strpos( $name, '$' ) === 0 ) {
|
|
307
|
-
$name = substr( $name, 1 );
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
return isset( self::$wp_globals[ $name ] );
|
|
311
|
-
}
|
|
312
|
-
}
|
|
@@ -1,113 +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\Helpers;
|
|
11
|
-
|
|
12
|
-
use PHPCSUtils\Utils\PassedParameters;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Helper utilities for recognizing functions related to the WP Hook mechanism.
|
|
16
|
-
*
|
|
17
|
-
* @since 3.0.0 The property in this class was previously contained in the
|
|
18
|
-
* `WordPressCS\WordPress\Sniff` class and has been moved here.
|
|
19
|
-
*/
|
|
20
|
-
final class WPHookHelper {
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* A list of functions that invoke WP hooks (filters/actions).
|
|
24
|
-
*
|
|
25
|
-
* @since 0.10.0
|
|
26
|
-
* @since 0.11.0 Changed from public static to protected non-static.
|
|
27
|
-
* @since 3.0.0 - Moved from the Sniff class to this class.
|
|
28
|
-
* - The property visibility has changed from `protected` to `private static`.
|
|
29
|
-
* Use the `get_functions()` method for access.
|
|
30
|
-
* - The format of the value has changed from a non-relevant boolean to
|
|
31
|
-
* an array with the parameter position and name(s) for the hook name parameter.
|
|
32
|
-
*
|
|
33
|
-
* @var array<string, array<string, int|string|string[]>> Function name as key, array with target
|
|
34
|
-
* parameter position and name(s) as value.
|
|
35
|
-
*/
|
|
36
|
-
private static $hookInvokeFunctions = array(
|
|
37
|
-
'do_action' => array(
|
|
38
|
-
'position' => 1,
|
|
39
|
-
'name' => 'hook_name',
|
|
40
|
-
),
|
|
41
|
-
'do_action_ref_array' => array(
|
|
42
|
-
'position' => 1,
|
|
43
|
-
'name' => 'hook_name',
|
|
44
|
-
),
|
|
45
|
-
'do_action_deprecated' => array(
|
|
46
|
-
'position' => 1,
|
|
47
|
-
'name' => 'hook_name',
|
|
48
|
-
),
|
|
49
|
-
'apply_filters' => array(
|
|
50
|
-
'position' => 1,
|
|
51
|
-
'name' => 'hook_name',
|
|
52
|
-
),
|
|
53
|
-
'apply_filters_ref_array' => array(
|
|
54
|
-
'position' => 1,
|
|
55
|
-
'name' => 'hook_name',
|
|
56
|
-
),
|
|
57
|
-
'apply_filters_deprecated' => array(
|
|
58
|
-
'position' => 1,
|
|
59
|
-
'name' => 'hook_name',
|
|
60
|
-
),
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Retrieve a list of the WordPress functions which invoke hooks.
|
|
65
|
-
*
|
|
66
|
-
* @since 3.0.0
|
|
67
|
-
*
|
|
68
|
-
* @param bool $include_deprecated Whether to include the names of functions
|
|
69
|
-
* which are used to invoke deprecated hooks.
|
|
70
|
-
* Defaults to `true`.
|
|
71
|
-
*
|
|
72
|
-
* @return array<string, bool> Array with the function names as keys. The value is irrelevant.
|
|
73
|
-
*/
|
|
74
|
-
public static function get_functions( $include_deprecated = true ) {
|
|
75
|
-
$hooks = array_fill_keys( array_keys( self::$hookInvokeFunctions ), true );
|
|
76
|
-
if ( false === $include_deprecated ) {
|
|
77
|
-
unset(
|
|
78
|
-
$hooks['do_action_deprecated'],
|
|
79
|
-
$hooks['apply_filters_deprecated']
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return $hooks;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Retrieve the parameter information for the hook name parameter from a stack of parameters
|
|
88
|
-
* passed to one of the WP hook functions.
|
|
89
|
-
*
|
|
90
|
-
* @since 3.0.0
|
|
91
|
-
*
|
|
92
|
-
* @param string $function_name The name of the WP hook function which the parameters were passed to.
|
|
93
|
-
* @param array $parameters The output of a previous call to PassedParameters::getParameters().
|
|
94
|
-
*
|
|
95
|
-
* @return array|false Array with information on the parameter at the specified offset,
|
|
96
|
-
* or with the specified name.
|
|
97
|
-
* Or `FALSE` if the specified parameter is not found.
|
|
98
|
-
* See the PHPCSUtils PassedParameters::getParameters() documentation
|
|
99
|
-
* for the format of the returned (single-dimensional) array.
|
|
100
|
-
*/
|
|
101
|
-
public static function get_hook_name_param( $function_name, array $parameters ) {
|
|
102
|
-
$function_lc = strtolower( $function_name );
|
|
103
|
-
if ( isset( self::$hookInvokeFunctions[ $function_lc ] ) === false ) {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return PassedParameters::getParameterFromStack(
|
|
108
|
-
$parameters,
|
|
109
|
-
self::$hookInvokeFunctions[ $function_lc ]['position'],
|
|
110
|
-
self::$hookInvokeFunctions[ $function_lc ]['name']
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
/**
|
|
3
|
-
* Represents a PHP_CodeSniffer sniff for sniffing WordPress coding standards.
|
|
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;
|
|
11
|
-
|
|
12
|
-
use PHP_CodeSniffer\Files\File;
|
|
13
|
-
use PHP_CodeSniffer\Sniffs\Sniff as PHPCS_Sniff;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Represents a PHP_CodeSniffer sniff for sniffing WordPress coding standards.
|
|
17
|
-
*
|
|
18
|
-
* Provides a bootstrap for the sniffs, to reduce code duplication.
|
|
19
|
-
*
|
|
20
|
-
* @since 0.4.0
|
|
21
|
-
*/
|
|
22
|
-
abstract class Sniff implements PHPCS_Sniff {
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The current file being sniffed.
|
|
26
|
-
*
|
|
27
|
-
* @since 0.4.0
|
|
28
|
-
*
|
|
29
|
-
* @var \PHP_CodeSniffer\Files\File
|
|
30
|
-
*/
|
|
31
|
-
protected $phpcsFile;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* The list of tokens in the current file being sniffed.
|
|
35
|
-
*
|
|
36
|
-
* @since 0.4.0
|
|
37
|
-
*
|
|
38
|
-
* @var array
|
|
39
|
-
*/
|
|
40
|
-
protected $tokens;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Set sniff properties and hand off to child class for processing of the token.
|
|
44
|
-
*
|
|
45
|
-
* @since 0.11.0
|
|
46
|
-
*
|
|
47
|
-
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
|
|
48
|
-
* @param int $stackPtr The position of the current token
|
|
49
|
-
* in the stack passed in $tokens.
|
|
50
|
-
*
|
|
51
|
-
* @return int|void Integer stack pointer to skip forward or void to continue
|
|
52
|
-
* normal file processing.
|
|
53
|
-
*/
|
|
54
|
-
public function process( File $phpcsFile, $stackPtr ) {
|
|
55
|
-
$this->phpcsFile = $phpcsFile;
|
|
56
|
-
$this->tokens = $phpcsFile->getTokens();
|
|
57
|
-
|
|
58
|
-
return $this->process_token( $stackPtr );
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Processes a sniff when one of its tokens is encountered.
|
|
63
|
-
*
|
|
64
|
-
* @since 0.11.0
|
|
65
|
-
*
|
|
66
|
-
* @param int $stackPtr The position of the current token in the stack.
|
|
67
|
-
*
|
|
68
|
-
* @return int|void Integer stack pointer to skip forward or void to continue
|
|
69
|
-
* normal file processing.
|
|
70
|
-
*/
|
|
71
|
-
abstract public function process_token( $stackPtr );
|
|
72
|
-
}
|