Skip to content

Reduce/eliminate usage of $_REQUEST throughout the plugin #6

Description

@stevegrunwell

Automattic (specifically WordPress.com VIP) dissuades the use of $_REQUEST in plugins and themes:

$_REQUEST should never be used because it is hard to track where the data is coming from (was it POST, or GET, or a cookie?), which makes reviewing the code more difficult. Additionally, it makes it easy to introduce sneaky and hard to find bugs, as any of the aforementioned locations can supply the data, which is hard to predict.

Much better to be explicit and use either $_POST or $_GET instead.

I made a pass at cleaning this up in #4, but at that point it was going to interfere with the work going on in the add/fallback-methods branch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions