Tag Info

Hot answers tagged

1

WordPress has the function edit_post_link() to Displays a link to edit the current post, if a user is logged in and allowed to edit the post.


1

I found a solution based on the code of this page: https://core.trac.wordpress.org/ticket/22180 All attachment files have a post status of 'inherit'. So first you need to add "inherit" as one of the possible post status to search for. You can use the wp_link_query_args filter to do that. function my_wp_link_query_args( $query ) { if (is_admin()){ ...



Only top voted, non community-wiki answers of a minimum length are eligible