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:
parent
d7704991b3
commit
b2ce0b4f93
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue