Skip to content

Commit

Permalink
Allow changing entry creator from the edit entry screen (#2141)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcasual authored Oct 14, 2024
2 parents 8bad3b7 + 2cf7589 commit d171c2e
Show file tree
Hide file tree
Showing 6 changed files with 308 additions and 88 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' ],
isset( $post ) ? $post->ID : null
) ) {
return;
}

Expand Down
Loading

0 comments on commit d171c2e

Please sign in to comment.