Automattic / Automattic/VIP-Coding-Standards

Account for upcoming change in WP 5.7 / script tag use

Open
#591 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
261
Forks
44
Avg merge
19m
Merged PRs (30d)
1

Description

PR https://github.com/WordPress/WordPress-Coding-Standards/pull/1956 in WPCS refers to changes in WP Core which will remove the use of the `` HTML tag in PHP code.

Any existing sniff which looks at the content of inline HTML and takes the `<script>` tag into account will need to be reviewed to see if it can still detect what it is looking for with the "new" way of writing this type of code.

This PR to WP Core gives some good examples of the "new" way of writing this type of code and can be used to for code samples: https://github.com/WordPress/wordpress-develop/pull/498/files

This PR shows the new functionality which will be added to Core: https://github.com/WordPress/wordpress-develop/pull/591

Contributor guide

Open the contributing guide

Research direction

Review the existing sniffs that inspect inline HTML for script tags, using the linked WPCS and WordPress Core PRs as the starting references and code examples. Check whether they still detect the relevant patterns after the WP 5.7 change; done means the affected sniffs handle the new style correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.