mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-02 19:27:52 +02:00
Pages Plugin: New shortcodes added - page_author, page_slug, page_url, page_available, page_breadcrumbs, page_date
This commit is contained in:
@@ -303,9 +303,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add new shortcodes {page_author} {page_slug} {page_url} {page_available} {page_breadcrumbs} {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');
|
||||||
|
|
||||||
|
|
||||||
class Page extends Pages {
|
/**
|
||||||
|
* Page class
|
||||||
|
*/
|
||||||
|
class Page extends Pages {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -322,6 +336,10 @@
|
|||||||
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
|
||||||
|
Reference in New Issue
Block a user