cedaro / better-internal-link-search

A WordPress plugin to improve the internal link popup functionality with time saving enhancements and features.
https://wordpress.org/plugins/better-internal-link-search/
14 stars 5 forks source link

Small issue with pre_better_internal_link_search_results filter #7

Closed junander closed 9 years ago

junander commented 9 years ago

Hi Brady,

Amazing plugin, that internal linking search really needed help.

I've been working with the pre_better_internal_link_search_results filter, and ran into a little hitch: I had set up a custom query to filter by a meta field (my client wants to do internal link searches by inventory number), and I was able to produce search results that should be showing up...but were not. After a little tracing, I came to line 222 of better-internal-link-search.php:

if ( ! empty( $pre_results ) ) {
                array_merge( $results, $pre_results );
            }

I switched this to:

if ( ! empty( $pre_results ) ) {
                $results = array_merge( $results, $pre_results );
            }

...and it worked swimmingly. Is this perhaps just a little typo? I've always returned my array_merge calls into a variable, but I wasn't sure if this was done on purpose (and I'm just doing something else incorrectly). However, if it is a typo, and you could add this fix to your next update, that would be incredibly fantastic!

Thanks again!

Joe

bradyvercher commented 9 years ago

Hi @junander, that's definitely an oversight on my part -- good catch! I'll get that taken care of. Thanks for bringing it to my attention.

bradyvercher commented 9 years ago

This should be good to go @junander. Thanks again for the report!