Changes between Initial Version and Version 1 of Ticket #41825
- Timestamp:
- 09/08/2017 08:37:53 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #41825
-
Property
Version
changed from
trunk
to3.7
-
Property
Version
changed from
-
Ticket #41825 – Description
initial v1 2 2 https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-editor.php 3 3 4 We have the public static function wp_link_query, which allows to search for internal links. There's also the possibility to alter the query 'wp_link_query_args' and to filter the results with 'wp_link_query'4 We have the public static function wp_link_query, which allows to search for internal links. There's also the possibility to alter the query 'wp_link_query_args' and to filter the results with 'wp_link_query' 5 5 6 Now the problem is, if a plugin *adds* additional search results in wp_link_query, that is possible, but if the WordPress Query itself finds nothi gnwe return false. It would be nice to apply the filter there as well, as a plugin may be able to find more results, even if WP_Query finds nothing.6 Now the problem is, if a plugin *adds* additional search results in wp_link_query, that is possible, but if the WordPress Query itself finds nothing we return false. It would be nice to apply the filter there as well, as a plugin may be able to find more results, even if WP_Query finds nothing. 7 7 8 8 So I'd propose to change 9 9 10 >if ( ! $get_posts->post_count ) 11 > return false; 10 {{{ 11 if ( ! $get_posts->post_count ) 12 return false; 13 }}} 12 14 13 15 to 14 16 15 >if ( ! $get_posts->post_count ) 16 > return apply_filters( 'wp_link_query', false, $query ); 17 {{{ 18 if ( ! $get_posts->post_count ) 19 return apply_filters( 'wp_link_query', false, $query ); 20 }}} 17 21 18 22 Behold, as I'm planning to discuss and maybe change this with @swissspidy at a contributor day tomorrow in bern switzerland.