1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-05 04:37:51 +02:00

Pages Plugin: New shortcodes added - page_author, page_slug, page_url, page_date

This commit is contained in:
Awilum
2012-12-09 17:39:48 +02:00
parent c5347c31a1
commit 52552b96b0

View File

@@ -303,16 +303,14 @@
}
}
/**
* Add new shortcodes {page_author} {page_slug} {page_url} {page_available} {page_breadcrumbs} {page_date}
* Add new shortcodes {page_author} {page_slug} {page_url} {page_date}
*/
Shortcode::add('page_author', 'Page::author');
Shortcode::add('page_slug', 'Page::slug');
Shortcode::add('page_url', 'Page::url');
Shortcode::add('page_available', 'Page::available');
Shortcode::add('page_breadcrumbs', 'Page::breadcrumbs');
Shortcode::add('page_date', 'Page::_date');
@@ -398,6 +396,7 @@
*/
public static function breadcrumbs() {
$current_page = Pages::$requested_page;
$parent_page = '';
if ($current_page !== 'error404') {
$page = Pages::$pages->select('[slug="'.$current_page.'"]', null);
if (trim($page['parent']) !== '') {