Added comments to HTML class.
This commit is contained in:
@@ -146,6 +146,7 @@ class HTML {
|
|||||||
public static function image($url, $alt = '', $attributes = array())
|
public static function image($url, $alt = '', $attributes = array())
|
||||||
{
|
{
|
||||||
$attributes['alt'] = static::entities($alt);
|
$attributes['alt'] = static::entities($alt);
|
||||||
|
|
||||||
return '<img src="'.static::entities(URL::to_asset($url)).'"'.static::attributes($attributes).'>';
|
return '<img src="'.static::entities(URL::to_asset($url)).'"'.static::attributes($attributes).'>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,6 +206,11 @@ class HTML {
|
|||||||
|
|
||||||
foreach ($attributes as $key => $value)
|
foreach ($attributes as $key => $value)
|
||||||
{
|
{
|
||||||
|
// -------------------------------------------------------
|
||||||
|
// If the attribute key is numeric, assign the attribute
|
||||||
|
// value to the key. This allows for attributes such as
|
||||||
|
// "required", "checked", etc.
|
||||||
|
// -------------------------------------------------------
|
||||||
if (is_numeric($key))
|
if (is_numeric($key))
|
||||||
{
|
{
|
||||||
$key = $value;
|
$key = $value;
|
||||||
|
|||||||
Reference in New Issue
Block a user