/** * Remove "Edit Page" or "Edit View" links when on single entry pages * @since 1.13 * @return void */ function remove_links() { // If we're on the single entry page, we don't want to cause confusion. if (is_admin() || $this->gravityview_view->getSingleEntry() && !$this->gravityview_view->isGravityviewPostType()) { remove_action('admin_bar_menu', 'wp_admin_bar_edit_menu', 80); } }