summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-03-13 10:26:55 +0100
committerAndrey Andreev <narf@devilix.net>2015-03-13 10:26:55 +0100
commitac9e63a411e6c6f0d994cf8c6c64bce7155cb9b6 (patch)
treeb57b20519c4bc55f6a2cc06077083dda1fb65053 /user_guide_src
parent1d19520c7bc40280050b59e05a212ecedd9edd53 (diff)
parentf67b6fd02fb3a683fa93ad59d8587beda3c9bb6a (diff)
Merge pull request #3662 from avenirer/patch-8
[ci skip] HTML helper docs: additional info on heading()
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/helpers/html_helper.rst11
1 files changed, 7 insertions, 4 deletions
diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst
index d35be396a..88611011c 100644
--- a/user_guide_src/source/helpers/html_helper.rst
+++ b/user_guide_src/source/helpers/html_helper.rst
@@ -29,7 +29,7 @@ The following functions are available:
:param string $data: Content
:param string $h: Heading level
- :param array $attributes: HTML attributes
+ :param mixed $attributes: HTML attributes
:returns: HTML heading tag
:rtype: string
@@ -41,15 +41,18 @@ The following functions are available:
The above would produce: <h3>Welcome!</h3>
Additionally, in order to add attributes to the heading tag such as HTML
- classes, ids or inline styles, a third parameter is available::
+ classes, ids or inline styles, a third parameter accepts either a string
+ or an array::
- echo heading('Welcome!', 3, 'class="pink"')
+ echo heading('Welcome!', 3, 'class="pink"');
+ echo heading('How are you?', 4, array('id' => 'question', 'class' => 'green'));
The above code produces:
.. code-block:: html
<h3 class="pink">Welcome!<h3>
+ <h4 id="question" class="green">How are you?</h4>
.. php:function:: img([$src = ''[, $index_page = FALSE[, $attributes = '']]])
@@ -401,4 +404,4 @@ The following functions are available:
&nbsp;&nbsp;&nbsp;
.. note:: This function is DEPRECATED. Use the native ``str_repeat()``
- in combination with ``&nbsp;`` instead. \ No newline at end of file
+ in combination with ``&nbsp;`` instead.