diff options
-rw-r--r-- | system/helpers/html_helper.php | 23 | ||||
-rw-r--r-- | user_guide/changelog.html | 3 | ||||
-rw-r--r-- | user_guide/helpers/html_helper.html | 23 |
3 files changed, 9 insertions, 40 deletions
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 660d867bd..f88bc0723 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -238,9 +238,9 @@ if (! function_exists('image')) * @param boolean should index_page be added to the css path
* @return string
*/
-if (! function_exists('link'))
+if (! function_exists('link_tag'))
{
- function link($href = '', $rel = 'stylesheet', $type = 'text/css', $title = '', $media = '', $index_page = FALSE)
+ function link_tag($href = '', $rel = 'stylesheet', $type = 'text/css', $title = '', $media = '', $index_page = FALSE)
{
$CI =& get_instance();
@@ -307,25 +307,6 @@ if (! function_exists('link')) // ------------------------------------------------------------------------
/**
- * Stylesheet
- *
- * Generates a <link /> to a CSS
- *
- * @access public
- * @param array
- * @return string
- */
-if (! function_exists('stylesheet'))
-{
- function stylesheet($href = '', $rel = 'stylesheet', $title = '', $media = 'screen')
- {
- return link($href, $rel, 'text/css', $title, $media);
- }
-}
-
-// ------------------------------------------------------------------------
-
-/**
* Generates meta tags from an array of key/values
*
* @access public
diff --git a/user_guide/changelog.html b/user_guide/changelog.html index fb2830e3c..4124540aa 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -131,8 +131,7 @@ Change Log <li>Helpers & Plugins
<ul>
- <li>Added link() to the <a href="./helpers/html_helper.html">HTML helper.</a></li>
- <li>Added stylesheet() to the <a href="./helpers/html_helper.html">HTML helper.</a></li>
+ <li>Added link_tag() to the <a href="./helpers/html_helper.html">HTML helper.</a></li>
<li>Added ability to <a href="./general/helpers.html">"extend" Helpers</a>.</li>
<li>Added an <a href="./helpers/email_helper.html">email helper</a> into core helpers.</li>
<li>Added <kbd>strip_quotes()</kbd> function to <a href="./helpers/string_helper.html">string helper</a>.</li>
diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html index 5ddadd717..d230a6630 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -79,16 +79,14 @@ second the size of the heading. Example:</p> <code>echo heading('Welcome!', 3);</code>
<p>The above would produce: <h3>Welcome!</h3></p>
-<h2>link()</h2>
-<p>Lets you create HTML <link /> tags. The parameters are href, with optional rel, type, title, media and index_page. index_page is a TRUE/FALSE value that specifics if the href should have the page specified by $config['index_page'] added to the address it creates.</p>
-<p>While stylesheets are more conveniently handled through the stylesheet() function, they can also be called here.</p>
-<code>
-link('css/mystyles.css');<br />
- // gives <link href="http://site.com/css/mystyles.css" rel="stylesheet" type="text/css" /></code>
+<h2>link_tag()</h2>
+<p>Lets you create HTML <link /> tags. This is useful for stylesheet links, as well as other links. The parameters are href, with optional rel, type, title, media and index_page. index_page is a TRUE/FALSE value that specifics if the href should have the page specified by $config['index_page'] added to the address it creates.<code>
+link_tag('css/mystyles.css');<br />
+// gives <link href="http://site.com/css/mystyles.css" rel="stylesheet" type="text/css" /></code></p>
<p>Further examples:</p>
<code>
- link('favicon.ico', 'shortcut icon', 'image/ico');<br />
+ link_tag('favicon.ico', 'shortcut icon', 'image/ico');<br />
// <link href="http://site.com/favicon.ico" rel="shortcut icon" type="image/ico" />
<br />
<br />
@@ -103,18 +101,9 @@ link('css/mystyles.css');<br /> 'media' => 'print'<br />
);<br />
<br />
- link($link);<br />
+ link_tag($link);<br />
// <link href="http://site.com/css/printer.css" rel="stylesheet" type="text/css" media="print" /></code></p>
-<h2>stylesheet()</h2>
-<p>The stylesheet() function simplifies the linking of CSS into your document. The arguments are stylesheet(href, optional rel, optional title, optional media).</p>
-<p>For more complete control over the output of the tag, you may want to use the link() function.</p>
-<code>stylesheet('foo.css');<br />
- // <link href="http://site.com/foo.css" rel="stylesheet" type="text/css" media="screen" /><br />
-<br />
-stylesheet('foo.css', 'alternate stylesheet', 'black and white version', 'screen') .'<br>';<br />
- // <link href="http://site.com/foo.css" rel="alternate stylesheet" type="text/css" media="screen" title="black and white version" />
-</code>
<h2>nbs()</h2>
<p>Generates non-breaking spaces (&nbsp;) based on the number you submit. Example:</p>
<code>echo nbs(3);</code>
|