From f9a38056d4230805c769f6e029a555e9cd6f16f1 Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Sat, 26 Feb 2011 08:42:40 -0700 Subject: [PATCH] Removed 'role' attribute from Wordpress search widget --- aclindsa-wordpress-theme/functions.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aclindsa-wordpress-theme/functions.php b/aclindsa-wordpress-theme/functions.php index 9ad4ef2..d2968e1 100644 --- a/aclindsa-wordpress-theme/functions.php +++ b/aclindsa-wordpress-theme/functions.php @@ -86,6 +86,15 @@ function kubrick_header_display_string() { return $display ? $display : 'inline'; } +/* Begin valid search box fix (via http://www.dwightjack.com/diary/2010/03/12/fix-role-attribute-in-wordpress-search-widget/) + * This removes the 'role' attribute from the HTML to make it valid. + */ +function valid_search_form ($form) { + return str_replace('role="search" ', '', $form); +} +add_filter('get_search_form', 'valid_search_form'); +/* End valid search box fix */ + add_action('admin_menu', 'kubrick_add_theme_page'); function kubrick_add_theme_page() {