Created
October 28, 2017 16:29
-
-
Save aiiddqd/f608e8b285fa725863251d0e89718064 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private function wooms_nonce_check($nonce = ''){ | |
| if(empty($nonce)){ | |
| return false; | |
| } | |
| if($nonce == get_transient('wooms_nonce')){ | |
| delete_transient('wooms_nonce'); | |
| return true; | |
| } else { | |
| return false; | |
| } | |
| } | |
| private function wooms_nonce_create(){ | |
| set_transient('wooms_nonce', wp_hash(time()), 60*60); | |
| return get_transient('wooms_nonce'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment