summaryrefslogtreecommitdiffstats
path: root/Content functions.md
diff options
context:
space:
mode:
Diffstat (limited to 'Content functions.md')
-rw-r--r--Content functions.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/Content functions.md b/Content functions.md
index dea14a6..667a196 100644
--- a/Content functions.md
+++ b/Content functions.md
@@ -1,4 +1,4 @@
-The so-called *content functions* are a feature of this blogging system that gives you an easy way to reference another item of your blog from the content of any other item, without the need to hardlink the URL of the referenced item.
+The so-called *content functions* are a feature of this blogging system that gives you an easy way to reference another item of your blog from the content of any other item, without the need to hard link the URL of the referenced item.
This document explains the available *content functions* that are shipped with the system by default and shows you how to add your own customized *content functions* to do some interesting things and prevent repetitive lines of text in your content.
@@ -32,14 +32,14 @@ String values must be put between double quotes (`"`) while integer values do no
**Note:** The parameters passed to the PHP callback function are (currently) always of type `string`!
-### Example: Calls with multiple parameters
+### Example: Call functions with parameters
~~~
{BASE_URL: "readme.md"}
{CATEGORY: 1, "Look at this category!"}
~~~
## How to add custom functions?
-The new *content function* feature gives you the ability to define your own custom functions with a choosable set of parameters. This is especially useful if you, for example, want to embed a YouTube video in a post but do not want to repeat the repetitive HTML embed code anytime when you want to show a YouTube video in your posts. You can just register a new *content function* to do this!
+The new *content function* feature gives you the ability to define your own custom functions. This is especially useful if you, for example, want to embed a YouTube video in a post but do not want to repeat the repetitive HTML embed code anytime when you want to show a YouTube video in your posts. You can just register a new *content function* to do this!
The interface to register a new *content function* is the method `addContentFunction` of the `Application` class. This method requires exactly two parameters: The **function name** and the **callback function**. The function name is validated and must contain only numbers, uppercase letters and underscores. An exception is thrown if this rule is violated.