Skip to content

Commit

Permalink
Remove capbility notice on admin bar
Browse files Browse the repository at this point in the history
  • Loading branch information
doekenorg committed Oct 11, 2024
1 parent 1867225 commit 01965df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions includes/class-gravityview-admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ function add_edit_entry_link() {
*/
function add_edit_view_and_form_link() {
/** @var WP_Admin_Bar $wp_admin_bar */
global $wp_admin_bar;
global $wp_admin_bar, $post;

if ( ! GVCommon::has_cap( array( 'edit_gravityviews', 'edit_gravityview', 'gravityforms_edit_forms' ) ) ) {
if ( ! GVCommon::has_cap(
[ 'edit_gravityviews', 'edit_gravityview', 'gravityforms_edit_forms' ],
$post->ID
) ) {
return;
}

Expand Down

0 comments on commit 01965df

Please sign in to comment.