Auto-allow Access for Administrators

🧪

Experimental Snippet

This snippet was discovered in the wizard’s chaotic laboratory — an unpolished experiment, conjured to solve a niche challenge. Use at your own risk.

Instructions

See “Where do I put snippets?” in our documentation for installation instructions.
Read the Walkthrough

Code

Filename: gfsa-auto-allow-administrator-access.php

1
2
3
4
5
6
7
8
9
10
<?php
/**
 * Gravity Forms // Submit to Access // Auto-allow Access for Administrators
 * https://gravitywiz.com/submit-gravity-form-access-content/
 *
 * Experimental Snippet 🧪
 */
add_filter( 'gfsa_has_access', function( $has_access ) {
	return current_user_can( 'administrator' );
} );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.