Created
June 14, 2012 10:49
-
-
Save anthonyringoet/2929582 to your computer and use it in GitHub Desktop.
Make image style links not focusable (fe. when there are other read more links already available)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Implements hook_preprocess_image_formatter() to add tabindex to teaser img links | |
*/ | |
function theme_preprocess_image_formatter(&$vars) { | |
if ($vars['image_style'] == "yourimagestyle") { | |
if(!empty($vars['path'])) { | |
$vars['path']['options']["attributes"]["tabindex"] = -1; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment