| @@ -77,13 +77,15 @@ | ||
| 77 | 77 | */ |
| 78 | 78 | function wppb_remove_epf_view_link( $actions ){ |
| 79 | 79 | global $post; |
| 80 | 80 | |
| 81 | - if ( $post->post_type == 'wppb-epf-cpt' ){ | |
| 82 | - unset( $actions['view'] ); | |
| 81 | + if ( ! empty( $post ) ) { | |
| 82 | + if ( $post->post_type == 'wppb-epf-cpt' ){ | |
| 83 | + unset( $actions['view'] ); | |
| 83 | 84 | |
| 84 | - if ( wppb_get_post_number ( $post->post_type, 'singular_action' ) ) | |
| 85 | - unset( $actions['trash'] ); | |
| 85 | + if ( wppb_get_post_number ( $post->post_type, 'singular_action' ) ) | |
| 86 | + unset( $actions['trash'] ); | |
| 87 | + } | |
| 86 | 88 | } |
| 87 | 89 | |
| 88 | 90 | return $actions; |
| 89 | 91 | } |