From 72e9e8d3ea378374da7e29d197bdc4d0228b145e Mon Sep 17 00:00:00 2001 From: Ian Stewart Date: Fri, 7 Nov 2014 17:37:36 +0000 Subject: [PATCH] Twenty Fifteen: Removing email obfuscation from social links menu. We really should be doing this in all menus, at which point this becomes core or plugin functionality, not a theme feature. Closes #30214. git-svn-id: https://develop.svn.wordpress.org/trunk@30273 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentyfifteen/functions.php | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/wp-content/themes/twentyfifteen/functions.php b/src/wp-content/themes/twentyfifteen/functions.php index 691e4e93a8..a5545d833f 100644 --- a/src/wp-content/themes/twentyfifteen/functions.php +++ b/src/wp-content/themes/twentyfifteen/functions.php @@ -301,27 +301,6 @@ function twentyfifteen_nav_description( $item_output, $item, $depth, $args ) { } add_filter( 'walker_nav_menu_start_el', 'twentyfifteen_nav_description', 10, 4 ); -/** -* Encode email address of mailto: links in social navigation -* -* @since Twenty Fifteen 1.0 -* -* @param array $atts HTML attributes in an associative array -* @param WP_Post $item Menu item object -* @param array $args Array containing config with desired markup of nav -* -* @return array HTML attributes for Menu item -*/ -function twentyfifteen_nav_encode_email( $atts, $item, $args ) { - if ( 'social' == $args->theme_location ) { - if ( preg_match( '/^mailto:(.+)/', $atts['href'], $match ) ) { - $atts['href'] = 'mailto:' . antispambot( $match[1] ); - } - } - return $atts; -} -add_filter( 'nav_menu_link_attributes', 'twentyfifteen_nav_encode_email', 10, 3 ); - /** * Add a `screen-reader-text` class to the search form's submit button. *