WordPress_Security_Txt_Sanitizer

Simple (by no means complete) input sanitizer.

since 1.0.0
package

WordPress_Security_Txt

subpackage

WordPress_Security_Txt/admin

author

Austin Heap me@austinheap.com

Methods

Constructor

__construct( $plugin_name,  $version, mixed $data = self::NO_VALUE_SET, string $type = self::NO_VALUE_SET) 

Arguments

$plugin_name

$version

$data

mixed

$type

string

Cleans the data

clean() : mixed

Response

mixed

The sanitized data

Validates a phone number

sanitize_phone(string $phone) : string|boolean

Arguments

$phone

string

A phone number string

Response

string|boolean

$phone|FALSE Returns the valid phone number, FALSE if not

Performs general cleaning functions on data

sanitize_random(mixed $input) : mixed

Arguments

$input

mixed

Data to be cleaned

Response

mixed

$return The cleaned data

sanitize_wrapper

sanitize_wrapper( $data,  $function) 

Arguments

$data

$function

Sets the data class variable

set_data(mixed $data) 

Arguments

$data

mixed

The data to sanitize

Sets the type class variable

set_type(string $type) 

Arguments

$type

string

The field type for this data

Constants

Value for default attributes which should be ignored.

NO_VALUE_SET

Properties

The ID of this plugin.

plugin_name : string
since
access

private

var

The ID of this plugin.

Type(s)

string

The version of this plugin.

version : string
since
access

private

var

The current version of this plugin.

Type(s)

string

The data to be sanitized

data : mixed
var

Type(s)

mixed

The type of data

type : string
var

Type(s)

string