Enable Globally For Admins

Code

Filename: gplp-enable-globally-for-admin.php

<?php
/**
 * Gravity Perks // Live Preview // Enable Globally For Admins
 * https://gravitywiz.com/documentation/gravity-forms-live-preview/
 */
add_filter( 'gplp_enable_globally', function( $is_global ) {
	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.