Dashboard Incoming Links - Google blogsearch fails when get_option( 'home') is not a TLD
|Reported by:||c3mdigital||Owned by:|
When WordPress gets installed and the first time a user visits the dashboard the dashboard_widget_options get set for dashboard_incoming_links. The Google blogsearch link gets set based on your settings for wp_home. If your developing on a local machine most likely wp_home is not a true TLD.
Google blogsearch incorrectly returns incoming links when the site: url is not a true TLD. For example I'll use an install where wp_home is set to http://wp.patch. The link that gets formed is:
If you visit that link you will notice that results are getting returned just using the "patch" keyword.
If the sited gets moved to live production you will continue to get the incorrect incoming links unless the dashboard_widget_options get manually changed or deleted.
Also to note is that the Google blogsearch API has been deprecated: https://developers.google.com/blog-search/
My suggestion is to remove the widget or hide it by default in screen options like we did for some of the stuff in post.php.
Another option is to do a check and return WP_Error if wp_home is not a TLD before setting the dashboard widget options.