Add 'wp_link_query_args' and 'wp_link_query' filters to allow for customizing the internal linking dialog. props CoenJacobs, goldenapples. fixes #18042.

Built from https://develop.svn.wordpress.org/trunk@25293


git-svn-id: http://core.svn.wordpress.org/trunk@25257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-09-07 12:21:12 +00:00
parent d7704991b3
commit b2ce0b4f93
1 changed files with 3 additions and 1 deletions

View File

@ -798,6 +798,8 @@ final class _WP_Editors {
$query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0;
$query = apply_filters( 'wp_link_query_args', $query );
// Do main query.
$get_posts = new WP_Query;
$posts = $get_posts->query( $query );
@ -821,7 +823,7 @@ final class _WP_Editors {
);
}
return $results;
return apply_filters( 'wp_link_query', $results, $query );
}
/**