-
Notifications
You must be signed in to change notification settings - Fork 0
/
messages.php
30 lines (28 loc) · 1005 Bytes
/
messages.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
// Check for valid url
if(!defined('ABSPATH')) {
die("Better luck next time!!!");
}
global $wp_notify;
?>
<!-- ==== Generated by WP-Notify Plugin ==== -->
<div id="notification">
<span id="notify_message">
<?php
if($wp_notify[type] == "other") : ?>
<ul>
<?php
$number_posts = $wp_notify[post_count];
echo ($wp_notify[other_types] == 'recent_post')? "<b>Recent Posts</b>": "<b>Up Comming</b>";
$posts = ($wp_notify[other_types] == 'recent_post')? __get_posts("publish", $number_posts ) : __get_posts( "future", $number_posts );
foreach($posts as $post){
echo '<li class="notify_posts"><a href="' . get_permalink($post["ID"]) . '" title="Look '.$post["post_title"].'" >' . $post["post_title"].'</a></li> ';
} ?>
</ul>
<?php else: ?>
<?= $wp_notify[custom_message]?>
<?php endif; ?>
</span>
<span class="dismiss"><a title="dismiss this notification" href="javascript:void(0);">x</a></span>
</div>
<!-- ==== Generated by WP-Notify Plugin ==== -->