WordPress Post Type Übersicht – „Ansehen“ Link öffnet sich in neuem Tab

PHP
function open_view_in_new_tab($actions, $post) {
    if (isset($actions['view'])) {
        $actions['view'] = str_replace('<a ', '<a target="_blank" ', $actions['view']);
    }
    return $actions;
}
add_filter('page_row_actions', 'open_view_in_new_tab', 10, 2);