1 <?php // rcs_id('$Id$');
3 * Extensions/modifications to the stock RecentChanges (and PageHistory) format.
7 require_once('lib/plugin/RecentChanges.php');
8 require_once('lib/plugin/PageHistory.php');
10 function Wordpress_RC_revision_formatter (&$fmt, &$rev) {
11 $class = 'rc-' . $fmt->importance($rev);
12 $time = $fmt->time($rev);
13 if ($rev->get('is_minor_edit')) {
14 $minor_flag = HTML::small("(" . _("minor edit") . ")");
17 $time = HTML::strong($time);
21 return HTML::li(array('class' => $class),
22 $fmt->diffLink($rev), ' ',
23 $fmt->pageLink($rev), ' ',
26 " . . . ", $fmt->summaryAsHTML($rev), ' ',
28 $fmt->authorLink($rev)
33 class _Wordpress_RecentChanges_Formatter
34 extends _RecentChanges_HtmlFormatter
36 function format_revision (&$rev) {
37 return Wordpress_RC_revision_formatter($this, $rev);
39 function summaryAsHTML ($rev) {
40 if ( !($summary = $this->summary($rev)) )
42 return HTML::strong( array('class' => 'wiki-summary'),
44 TransformLinks($summary, $rev->get('markup'), $rev->getPageName()),
49 class _Wordpress_PageHistory_Formatter
50 extends _PageHistory_HtmlFormatter
52 function format_revision (&$rev) {
53 return Wordpress_RC_revision_formatter($this, $rev);
55 function summaryAsHTML ($rev) {
56 if ( !($summary = $this->summary($rev)) )
58 return HTML::strong( array('class' => 'wiki-summary'),
60 TransformLinks($summary, $rev->get('markup'), $rev->getPageName()),
69 // c-hanging-comment-ender-p: nil
70 // indent-tabs-mode: nil