Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AlternativeFunctions: suggest using wp_(un)slash() #1466

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Commits on Aug 27, 2018

  1. AlternativeFunctions: suggest using wp_(un)slash()

    The WP `wp_slash()` and `wp_unslash()` functions are capable of (un)slashing both strings, as well as (nested) arrays, while the PHP native functions can only handle strings.
    
    For input variables, you typically encounter arrays in forms. For instance when a checkbox or dropdown field can accept multiple values. however, the usage of arrays in input variables is definitely not limited to those examples.
    
    With that in mind, I'd like to suggest adding a recommendation to use these functions instead of the PHP native ones to the `AlternativeFunctions` sniff.
    jrfnl committed Aug 27, 2018
    Configuration menu
    Copy the full SHA
    e553f40 View commit details
    Browse the repository at this point in the history