PHP Class RWMB_Sanitizer

Mostrar archivo Open project: rilwis/meta-box Class Usage Examples

Protected Properties

Property Type Description
$callbacks array Built-in callbacks for some specific types.

Public Methods

Method Description
checkbox ( string $value ) : integer Set the value of checkbox to 1 or 0 instead of 'checked' and empty string.
init ( ) Register hook to sanitize field value.

Method Details

checkbox() public method

This prevents using default value once the checkbox has been unchecked.
public checkbox ( string $value ) : integer
$value string
return integer

init() public method

Register hook to sanitize field value.
public init ( )

Property Details

$callbacks protected_oe property

Built-in callbacks for some specific types.
protected array $callbacks
return array