Late answer
WP core offers a function for that case, that makes it much easier and future proof: Simply map it on each item.
Wrapped up in a plugin
Best used as mu-plugin.
<?php
/* Plugin Name: (#32093) »kaiser« Open "action"-links in post type list screens in new windows/tabs */
function wpse32093_link_target_blank( $actions, $post )
{
return array_map( 'links_add_target', $actions );
}
// Add to each post type
foreach ( array( 'post', 'page' ) as $post_type )
add_action( "{$post_type}_row_actions", 'wpse32093_link_target_blank', 20, 2 );
The plugin is tested and works seamlessly. You can adjust the post types where you want to have it active in the array inside the foreach loop.
Related Posts:
- What does this PHP function code mean? [closed]
- Restrict custom post type to only site administrator role
- Linking Two Post Types
- How to force one column layout on custom post type edit page?
- Admin Post Update Redirection to Posts Screen
- modify all posts of a category to “no comments allowed”
- Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?
- Showing current taxonomy terms
- automatically create taxonomy with same name as post title
- Assigning a role to a specific custom post type (and ignoring other post types)
- Display posts in random post types
- Custom Post Type by user
- saving custom post type data to different table in wordpress
- Query post types with multiple keys
- [Plugin: Posts 2 Posts] Changing display order of connections
- same archive template for different custom post
- Get all posts WHERE custom_field is LIKE value
- Get the post children count of a post
- How to delete all posts from a custom post type?
- Community and User Generated Content Website: Have been thinking about Drupal but leaning on WordPress heavily
- Check Title Unique Or Not and If not error message and dont save
- Remove All, Published and Trashed Post Views in Custom Post Type
- How to customize admin posts based on the user who is logged in
- How to post twitter like updates on wordpress
- Show Two custom Post type and their posts on category page
- apply filters only to specific post listing without check the url parameters
- Custom post type and body_class: Remove “blog” class
- Deleting Custom Post type data using mySQL command
- How can I create a custom meta box to add an mp4 video to a page?
- Remove rows in the manage post/page view
- Display only one post each WEEK
- List custom taxonomy specific to one custom post type
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- Meta query for custom post type ignored in main query
- Show titles, date of all posts on single category page
- No Permission to add new Page, Post or CPT with Admin role
- Update postmeta Parent when post_status child change
- Admin Column does not populate with data
- Allow users to create posts without logging in?
- How to sort posts in a custom post type by title in ascending order by default?
- Get_the_terms restrict output
- Custom post type menu
- YOAST SEO won’t work on custom post type archive [closed]
- Separate Content from gallery (custom post type)
- WordPress Count posts within a custom post type
- Custom post type tags not showing in search
- Function to add custom HTML into head in custom post-type list page
- How set template for “custom post type” individual post
- Why is my custom post content only viewable when signed into WordPress?
- Best way to fix bad count on All | Mine | Published
- How we can create menu from Appearance > Menu and use as a add-submenu-page for admin menu?
- Adding specific custom fields (images) to post excerpt
- Limit posts per page depending on the size of a div?
- Delete Post by User
- creating a custom post template
- Problem to get the link of the default ‘post’ post type like the orther custom types
- One Post with different content, depending on a Page
- Custom Post Type
- WordPress Author Posts Review After Every Change In The Same WordPress Post
- Display all post types together
- Collection of fields in a single post
- Turn post into simple slideshow
- Query multiple post of which one by taxonomy
- How to make a template for a specific post of a custom post type?
- How to delete unnecessary custom post types in the UI
- How to create a job post by email parsing? [closed]
- show posts under custom post type with same autj
- How to automate the creation of advanced layout article/post
- display posts, pages and custom post types from another wordpress site
- is therer any wordpress function to retrieve a specific html element from post content
- How to develop Knowledge center in WordPress Website
- don’t publish custom post type post if a meta data field isn’t valid
- Fetch All Posts (Including Those Using a Custom Post Type) With WordPress API
- Custom post type admin search
- add_rewrite_rule and custom variable
- How to hook get_terms() to only show count of posts that have custom meta
- Add extra parameters after permalink?
- How do I check if a posts status is set to draft or pending?
- How to get all posts except for one post from a certain custom post type?
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- How to Mass Delete Images from Media Library
- Add custom post type settings to wordress default posts
- Side effects of Script and Iframe in post
- Some posts from custom post type to subdomains
- Best structure / rewrite rules to achieve the following url
- 404 Error on form submission within custom post type
- New “Custom Types” item in admin menu. Is this a plugin or a new wordpress feature?
- sortable columns for multiple custom post types not working
- How to export custom post type with ACF to individual file with automation?
- Display post from custom post type
- Custom post type title of each author in his own post
- Require custom post type if is_admin() – template doesn’t show up?
- Custom Posttype URL
- Display custom post front end filter by ACF equals current user
- WordPress next post by ajax call on button click
- Custom Post By Category
- Change Custom Post Type to Post + Category
- Get post from Category by Priority
- Selecting which pages to display custom post type on using checkbox
- Custom Post Type children and grand-children in one list