开发者 | ilychkov |
---|---|
更新时间 | 2024年12月7日 01:58 |
PHP版本: | 3.3 及以上 |
版权: | MIT |
Yes. Just set these two options:
Try to enable the option "Check page markup before displaying a marker" (plugin options, advanced settings).
These two functions may be useful for developing WordPress themes.
mnp_is_new_post($post)
Returns true if a specific post is unread, otherwise false.
Parameters: $post (optional) - post ID or object.
mnp_new_posts_count($query)
Returns the total number of unread posts, optionally filtered.
Parameters: $query (optional) - WP_Query query string.
Example:
echo mnp_new_posts_count('cat=1');
This will show the number of unread posts in category with id = 1.