Filename: gppcmt-lock-down-by-entry-creator.php
gppcmt-lock-down-by-entry-creator.php
<?php /** * Gravity Perks // Post Content Merge Tags // Lock Down by Entry Creator * https://gravitywiz.com/documentation/gravity-forms-post-content-merge-tags/ */ add_action( 'wp', function() { if ( ! is_callable( 'gp_post_content_merge_tags' ) ) { return; } $entry = gp_post_content_merge_tags()->get_entry(); if ( ! $entry ) { return; } if ( get_current_user_id() !== (int) $entry['created_by'] && ! current_user_can( 'gform_edit_entries' ) ) { die( 'Bad boy!' ); } } );
Your email address will not be published. Required fields are marked *
Comment *
Notify me of followup comments via e-mail
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.
Δ