summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorGreg Aker <greg.aker@ellislab.com>2011-04-18 16:40:19 +0200
committerGreg Aker <greg.aker@ellislab.com>2011-04-18 16:40:19 +0200
commit826429cf40a9624788b92d2e6e4b7659e1b0d8a1 (patch)
tree7a9b7a97a815a1ed51fbf3e058377958cbb4b1c9 /system
parentbffb7769c6f31b7a47355d4eb66f5ac1d85c2a2e (diff)
Added an optional third parameter to heading() which allows adding html attributes to the rendered heading tag.
Diffstat (limited to 'system')
-rw-r--r--system/helpers/html_helper.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php
index c6103ab6f..a29204391 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.php
@@ -40,9 +40,10 @@
*/
if ( ! function_exists('heading'))
{
- function heading($data = '', $h = '1')
+ function heading($data = '', $h = '1', $attributes = '')
{
- return "<h".$h.">".$data."</h".$h.">";
+ $attributes = ($attributes != '') ? ' '.$attributes : $attributes;
+ return "<h".$h.$attributes.">".$data."</h".$h.">";
}
}