Scroll Down
/**
* code #19 - display a custom WordPress codex search in the admin dashboard
* source - http://wordpress.stackexchange.com/a/3805/8922
*/
function wp_codex_search_form() {
echo '<form target="_blank" method="get" action="http://wordpress.org/search/do-search.php" class="alignright" style="margin: 11px 5px 0;">
<input type="text" onblur="this.value=(this.value==\'\') ? \'Search the Codex\' : this.value;" onfocus="this.value=(this.value==\'Search the Codex\') ? \'\' : this.value;" maxlength="150" value="Search the Codex" name="search" class="text"> <input type="submit" value="Go" class="button" />
</form>';
}
add_filter('in_admin_header', 'wp_codex_search_form', 11);
This is one of my personal favorite snippets because it’s so useful on any WordPress install. Instead of opening a new tab to search your question in Google it’s so easy to get right into the WordPress online code docs. The search form will automatically open in a new window so you won’t lose any unsaved work.