Documentation

UnslashingFunctionsHelper

FinalYes

Helper functions and function lists for checking whether a function is an unslashing function.

Tags
since
3.0.0

The property in this class was previously contained in the WordPressCS\WordPress\Sniff class and has been moved here.

Table of Contents

Properties

$unslashingFunctions  : array<string, bool>
Functions which unslash the data passed to them.

Methods

get_functions()  : array<string, bool>
Retrieve a list of the unslashing functions.
is_unslashing_function()  : bool
Check if a particular function is regarded as a unslashing function.

Properties

$unslashingFunctions

Functions which unslash the data passed to them.

private static array<string, bool> $unslashingFunctions = array('stripslashes_deep' => true, 'stripslashes_from_strings_only' => true, 'wp_unslash' => true)
Tags
since
2.1.0
since
3.0.0
  • Moved from the Sniff class to this class.
  • Visibility changed from protected to private and property made static. Use the get_functions() method for access.

Methods

get_functions()

Retrieve a list of the unslashing functions.

public static get_functions() : array<string, bool>
Tags
since
3.0.0
Return values
array<string, bool>

is_unslashing_function()

Check if a particular function is regarded as a unslashing function.

public static is_unslashing_function(string $functionName) : bool
Parameters
$functionName : string

The name of the function to check.

Tags
since
3.0.0
Return values
bool

        
On this page

Search results