Skip to content

Commit 4d2e9fa

Browse files
authored
Merge pull request #508 from ExpressionEngine/bug/7.x/base-url-docs
url_helper docs
2 parents 9c3a241 + 4c3cfc1 commit 4d2e9fa

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

docs/development/legacy/helpers/url-helper.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,12 @@ Returns your site URL, as specified in your config file. The index.php file (or
3939

4040
You are encouraged to use this function any time you need to generate a local URL so that your pages become more portable in the event your URL changes.
4141

42-
Segments can be optionally passed to the function as a string or an array. Here is a string example:
42+
Segments can be optionally passed to the function as a string. Here is a string example:
4343

44-
echo site_url('news/local/123');
44+
echo site_url('/news/local/123');
4545

4646
The above example would return something like: `https://example.com/news/local/123`
4747

48-
Here is an example of segments passed as an array:
49-
50-
$segments = array('news', 'local', '123');
51-
echo site_url($segments);
52-
5348
This function is an alias for `EE_Config::site_url()`.
5449

5550
### `base_url($uri = '', $protocol = NULL)`
@@ -66,20 +61,6 @@ Returns your site base URL, as specified in your config file. Example:
6661

6762
This function returns the same thing as `site_url()`, without the _index_page_ being appended.
6863

69-
Also like `site_url()`, you can supply segments as a string or an array. Here is a string example:
70-
71-
echo base_url("blog/post/123");
72-
73-
The above example would return something like: `https://example.com/blog/post/123`
74-
75-
This is useful because unlike `site_url()`, you can supply a string to a file, such as an image or stylesheet. For example:
76-
77-
echo base_url("images/icons/edit.png");
78-
79-
This would give you something like: `https://example.com/images/icons/edit.png`
80-
81-
This function is an alias for `EE_Config::base_url()`.
82-
8364
### `current_url()`
8465

8566
| Parameter | Type | Description |

0 commit comments

Comments
 (0)