llms_verify_nonce( string $nonce, string $action, string $request_method = 'POST' )
Verify nonce with additional checks to confirm request method Skips verification if the nonce is not set Useful for checking nonce for various LifterLMS forms which check for the form submission on init actions
Description Description
Parameters Parameters
- $nonce
-
(string) (Required) name of the nonce field
- $action
-
(string) (Required) name of the action
- $request_method
-
(string) (Optional) name of the intended request method
Default value: 'POST'
Return Return
(null|false|int)
Source Source
File: includes/llms.functions.core.php
function llms_verify_nonce( $nonce, $action, $request_method = 'POST' ) { if ( strtoupper( getenv( 'REQUEST_METHOD' ) ) !== $request_method ) { return; } if ( empty( $_REQUEST[ $nonce ] ) ) { return; } return wp_verify_nonce( $_REQUEST[ $nonce ], $action ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.8.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: