1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-07-31 18:30:20 +02:00

Pages Plugin: New shortcodes added - page_content

This commit is contained in:
Awilum
2012-12-09 18:44:59 +02:00
parent 0fca7a3153
commit 56976a9191

View File

@@ -326,11 +326,12 @@
/** /**
* Add new shortcodes {page_author} {page_slug} {page_url} {page_date} * Add new shortcodes {page_author} {page_slug} {page_url} {page_date} {page_content}
*/ */
Shortcode::add('page_author', 'Page::author'); Shortcode::add('page_author', 'Page::author');
Shortcode::add('page_slug', 'Page::slug'); Shortcode::add('page_slug', 'Page::slug');
Shortcode::add('page_url', 'Page::url'); Shortcode::add('page_url', 'Page::url');
Shortcode::add('page_content', 'Page::_content');
Shortcode::add('page_date', 'Page::_date'); Shortcode::add('page_date', 'Page::_date');
@@ -354,10 +355,6 @@
return Date::format(Pages::$page['date'], $format); return Date::format(Pages::$page['date'], $format);
} }
public static function _date($attributes) {
return Page::date((isset($attributes['format'])) ? $attributes['format'] : 'Y-m-d');
}
/** /**
* Get author of current page * Get author of current page
@@ -484,4 +481,13 @@
return $robots; return $robots;
} }
public static function _date($attributes) {
return Page::date((isset($attributes['format'])) ? $attributes['format'] : 'Y-m-d');
}
public static function _content($attributes) {
return Page::content((isset($attributes['name']) ? $attributes['name'] : ''));
}
} }