开发者 | ilychkov |
---|---|
更新时间 | 2023年10月9日 09:10 |
PHP版本: | 3.3 及以上 |
版权: | MIT |
Yes. Just activate 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 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.
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.