PHP Class Inpsyde\MultilingualPress\Common\Nonce\WPNonce

Since: 3.0.0
Inheritance: implements Inpsyde\MultilingualPress\Common\Nonce\Nonce
Mostra file Open project: inpsyde/multilingual-press Class Usage Examples

Public Methods

Method Description
__construct ( string $action, Context $context = null ) Constructor. Sets up the properties.
__toString ( ) : string Returns the nonce value.
action ( ) : string Returns the nonce action.
is_valid ( ) : boolean Checks if the nonce is valid with respect to the current context.

Private Methods

Method Description
get_hash ( ) : string Returns a hash for the current action and site ID.

Method Details

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( string $action, Context $context = null )
$action string Nonce action.
$context Context Optional. Nonce context object. Defaults to null.

__toString() public method

Returns the nonce value.
Since: 3.0.0
public __toString ( ) : string
return string Nonce value.

action() public method

Returns the nonce action.
Since: 3.0.0
public action ( ) : string
return string Nonce action.

is_valid() public method

Checks if the nonce is valid with respect to the current context.
Since: 3.0.0
public is_valid ( ) : boolean
return boolean Whether or not the nonce is valid.