修订版 | 268b4994d1b723db7dbd958d666891061df7ea31 (tree) |
---|---|
时间 | 2018-05-22 05:32:56 |
作者 | umorigu <umorigu@gmai...> |
Commiter | umorigu |
BugTrack/2455 new plugin: Backword compatibility: Keep init()
Some external plugin calls plugin_new_init() directly
and use the messages.
So we need keep this method for the compatibility.
@@ -15,6 +15,16 @@ | ||
15 | 15 | |
16 | 16 | define('PLUGIN_NEW_DATE_FORMAT', '<span class="comment_date">%s</span>'); |
17 | 17 | |
18 | +function plugin_new_init() | |
19 | +{ | |
20 | + // Backword compatibility: Keep plugin_new_init() and the messages | |
21 | + // Elapsed time => New! message with CSS | |
22 | + $messages['_plugin_new_elapses'] = array( | |
23 | + 60 * 60 * 24 * 1 => ' <span class="new1" title="%s">New!</span>', // 1day | |
24 | + 60 * 60 * 24 * 5 => ' <span class="new5" title="%s">New</span>'); // 5days | |
25 | + set_plugin_messages($messages); | |
26 | +} | |
27 | + | |
18 | 28 | function plugin_new_inline() |
19 | 29 | { |
20 | 30 | global $vars; |