| @@ -83,9 +83,9 @@ | ||
| 83 | 83 | if ( ! $post ) { |
| 84 | 84 | return false; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - if ( 'trash' === get_post_status( $post_id ) ) { | |
| 87 | + if ( 'trash' === get_post_status( $post->ID ) ) { | |
| 88 | 88 | return false; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | if ( ! self::is_current_user_can_edit_post_type( $post->post_type ) ) { |
| @@ -98,13 +98,13 @@ | ||
| 98 | 98 | return false; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | $edit_cap = $post_type_object->cap->edit_post; |
| 102 | - if ( ! current_user_can( $edit_cap, $post_id ) ) { | |
| 102 | + if ( ! current_user_can( $edit_cap, $post->ID ) ) { | |
| 103 | 103 | return false; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - if ( intval( get_option( 'page_for_posts' ) ) === $post_id ) { | |
| 106 | + if ( intval( get_option( 'page_for_posts' ) ) === $post->ID ) { | |
| 107 | 107 | return false; |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | return true; |