Changing the "You are not allowed to view this content" text when an entry is pending approval
If you're using GravityView to create user profiles and you have your View set to show only Approved entries, a user will see the following message if they attempt to view their profile before the entry has been approved:
You can use this filter to change the "You are not allowed to view this content" text:
add_filter( 'gettext', 'gv_modify_text', 20, 3 ); function gv_modify_text( $translated_text, $text, $domain ) { if ( $translated_text === "You are not allowed to view this content.") { $translated_text = __( "Your entry hasn't been approved yet!", 'gravityview' ); } return $translated_text; }
With the filter in place, the user will see the following message: