Yoast / Yoast/wordpress-seo

Prepare for WPVIP: Never use `$_REQUEST`

Open
#7,705 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

featurerequest VIP-compliance
Dominant language
JavaScript
Stars
2k
Forks
975
Avg merge
3d 13h
Merged PRs (30d)
36

Description

We are currently using $_REQUEST on three different locations.

The code standards of VIP dictate that it should never be used.
It can be easily converted to a conditional $_POST/$_GET/filter_input structure.

See https://vip.wordpress.com/documentation/code-review-what-we-look-for/#using-_request

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the repository for the three uses of $_REQUEST and inspect their surrounding input handling. Read the linked WordPress VIP coding guidance, replace each use with the appropriate $_POST, $_GET, or filter_input approach, and verify that no $_REQUEST usages remain.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.