summaryrefslogtreecommitdiff
path: root/modules/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-05-17 20:50:15 +0000
committerDries Buytaert <dries@buytaert.net>2001-05-17 20:50:15 +0000
commit031e4d420891a4a7b9e3b18623cae4e2400b7691 (patch)
treef4d7e1f574bcab7383e86680273e5b60cf5a373f /modules/node.module
parente5c7aefa5bea9bb4153155e414279985ccc8e0e5 (diff)
downloadbrdo-031e4d420891a4a7b9e3b18623cae4e2400b7691.tar.gz
brdo-031e4d420891a4a7b9e3b18623cae4e2400b7691.tar.bz2
- Tidied up the field_get() API and improved the implementation of
both field_set() and field_get().
Diffstat (limited to 'modules/node.module')
-rw-r--r--modules/node.module7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/node.module b/modules/node.module
index e469bbfea..53c32219f 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -11,6 +11,13 @@ class Node {
}
}
+function node_macro($text) {
+ $src = array("/\[\[(([^\|]*?)(\|([^\|]*?))?)\]\]/e"); // [link|description]
+ $dst = array(format_tag('\\2', '\\4')); // [link|description]
+
+ return preg_replace($src, $dst, $text);
+}
+
function node_overview($query = array()) {
global $user;