summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordimitribalazs <dimitri_balazs@hotmail.com>2015-11-18 11:50:22 +0100
committerdimitribalazs <dimitri_balazs@hotmail.com>2015-11-18 11:50:22 +0100
commit6a7a16073aefbc0bff0fb850d97ea11c57d693c1 (patch)
tree667740587421f9cce7ad00a4ba5ede944ea7ce07
parentbb5184e9b84f5f3c56ae82bfded1cbc2d00cade1 (diff)
Added alt attribute functionality …
It hasn't been possible to set the alt attribute on the image. Added img_alt key on the $defaults array and integrated the $img_alt variable into the img string.
-rw-r--r--system/helpers/captcha_helper.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index 85bcfb5a0..3cf581bba 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -79,7 +79,8 @@ if ( ! function_exists('create_captcha'))
'border' => array(153,102,102),
'text' => array(204,153,153),
'grid' => array(255,182,182)
- )
+ ),
+ 'img_alt' => 'captcha'
);
foreach ($defaults as $key => $val)
@@ -330,7 +331,7 @@ if ( ! function_exists('create_captcha'))
return FALSE;
}
- $img = '<img '.($img_id === '' ? '' : 'id="'.$img_id.'"').' src="'.$img_url.$img_filename.'" style="width: '.$img_width.'; height: '.$img_height .'; border: 0;" alt=" " />';
+ $img = '<img '.($img_id === '' ? '' : 'id="'.$img_id.'"').' src="'.$img_url.$img_filename.'" style="width: '.$img_width.'; height: '.$img_height .'; border: 0;" alt="'.$img_alt.'" />';
ImageDestroy($im);
return array('word' => $word, 'time' => $now, 'image' => $img, 'filename' => $img_filename);