diff options
author | Jonathon Hill <jhill@brandmovers.com> | 2012-11-12 14:51:41 +0100 |
---|---|---|
committer | Jonathon Hill <jhill@brandmovers.com> | 2012-11-12 14:51:41 +0100 |
commit | 3978fc33d82dd7f778d1adbf30744f4dfac41c25 (patch) | |
tree | f32be1ae610f0cfeff65c35abecd14e8ea5cadc6 /user_guide_src/source/helpers/typography_helper.rst | |
parent | 275cf274860c6ed181d50b398efd3a21d7ba9135 (diff) | |
parent | a9ab46d7a031bda304eb9b6658ffaf693b8d9bcb (diff) |
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts:
user_guide_src/source/changelog.rst
Signed-off-by: Jonathon Hill <jhill@brandmovers.com>
Diffstat (limited to 'user_guide_src/source/helpers/typography_helper.rst')
-rw-r--r-- | user_guide_src/source/helpers/typography_helper.rst | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/user_guide_src/source/helpers/typography_helper.rst b/user_guide_src/source/helpers/typography_helper.rst index f3202603a..3c81687ac 100644 --- a/user_guide_src/source/helpers/typography_helper.rst +++ b/user_guide_src/source/helpers/typography_helper.rst @@ -10,9 +10,7 @@ in semantically relevant ways. Loading this Helper =================== -This helper is loaded using the following code - -:: +This helper is loaded using the following code:: $this->load->helper('typography'); @@ -21,9 +19,18 @@ The following functions are available: auto_typography() ================= +.. php:function:: auto_typography($str, $reduce_linebreaks = FALSE) + + :param string $str: Input string + :param bool $reduce_linebreaks: Whether to reduce multiple instances of double newlines to two + :returns: string + Formats text so that it is semantically and typographically correct -HTML. Please see the :doc:`Typography Class <../libraries/typography>` -for more info. +HTML. + +This function is an alias for ``CI_Typography::auto_typography``. +For more info, please see the :doc:`Typography Library +<../libraries/typography>` documentation. Usage example:: @@ -31,18 +38,34 @@ Usage example:: .. note:: Typographic formatting can be processor intensive, particularly if you have a lot of content being formatted. If you choose to use this - function you may want to consider `caching </general/caching>` your pages. + function you may want to consider `caching <../general/caching>` your + pages. nl2br_except_pre() ================== -Converts newlines to <br /> tags unless they appear within <pre> tags. -This function is identical to the native PHP nl2br() function, except -that it ignores <pre> tags. +.. php:function:: nl2br_except_pre($str) -Usage example + :param string $str: Input string + :returns: string -:: +Converts newlines to <br /> tags unless they appear within <pre> tags. +This function is identical to the native PHP ``nl2br()`` function, +except that it ignores <pre> tags. + +Usage example:: $string = nl2br_except_pre($string); +entity_decode() +=============== + +.. php:function:: entity_decode($str, $charset = NULL) + + :param string $str: Input string + :param string $charset: Character set + :returns: string + +This function is an alias for ``CI_Security::entity_decode()``. +Fore more info, please see the :doc:`Security Library +<../libraries/security>` documentation.
\ No newline at end of file |