mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 00:52:55 +01:00
Add 'wp_link_query_args' and 'wp_link_query' filters to allow for customizing the internal linking dialog. props CoenJacobs, goldenapples. fixes #18042.
git-svn-id: https://develop.svn.wordpress.org/trunk@25293 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e688f070dc
commit
f6b4d33ae9
@ -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…
x
Reference in New Issue
Block a user