Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This removes the nonce check for logged-in users when submitting a review.
- *
- * A nonce is a special generated security token that expires after 12 hours.
- * Nonces prevent malicious form submissions and is an additional security measure
- * used in WordPress forms for logged in users. Nonces can be problematic when your
- * pages are cached. It's general practice in WordPress to not cache pages for
- * logged in users for this reason. However, if caching is required on your site
- * for logged in users, then this snippet will disable the use Site Reviews nonce
- * check for submitted reviews.
- *
- * @see http://developer.wordpress.org/plugins/security/nonces/
- */
- add_filter('site-reviews/router/unguarded-actions', function ($actions) {
- $actions[] = 'submit-review';
- return $actions;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement