{"id":19807068,"url":"https://github.com/wpdew/unread-posts","last_synced_at":"2026-02-09T13:32:38.106Z","repository":{"id":143728060,"uuid":"339106236","full_name":"wpdew/Unread-Posts","owner":"wpdew","description":"A plugin that can display unread posts on your WordPress website","archived":false,"fork":false,"pushed_at":"2015-10-14T12:39:21.000Z","size":1355,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-16T05:45:20.448Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpdew.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-15T14:38:37.000Z","updated_at":"2022-08-24T07:42:59.000Z","dependencies_parsed_at":"2023-03-21T02:00:08.480Z","dependency_job_id":null,"html_url":"https://github.com/wpdew/Unread-Posts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wpdew/Unread-Posts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdew%2FUnread-Posts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdew%2FUnread-Posts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdew%2FUnread-Posts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdew%2FUnread-Posts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpdew","download_url":"https://codeload.github.com/wpdew/Unread-Posts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdew%2FUnread-Posts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29266980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T12:53:16.161Z","status":"ssl_error","status_checked_at":"2026-02-09T12:52:30.244Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T09:09:26.172Z","updated_at":"2026-02-09T13:32:38.091Z","avatar_url":"https://github.com/wpdew.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Top Authors\n\nAdd flexible unread post lists to your sidebar or under single posts. Easily extendable for developers wanting to leverage it.\n\n## Description\n\nUnread posts is a plugin for regular users and developers alike. For regular users it allows for the creation of widgets that display posts the user has not yet read. It will work for logged in and logged out users as well. You can also add unread posts just below your single post content.\n\nFor logged out users the plugin uses cookies so please make sure your users consent to cookies by using a plugin like [Cookie Law Info](https://wordpress.org/plugins/cookie-law-info/screenshots/).\n\nThe plugin contains a bunch of developer friendly features so you can easily leverage the core functionality, the management of read/unread posts. The class may be used alone, you can use some built in functions and I've added a bunch of filters for you to modify everything from what shows up in lists to how the lists are actually displayed.\n\nFor more information on developer features take a look at the Developers Features section below\n\n#### Thanks\n\n* [FontAwesome](fontawesome.io) for the icons used in the plugin featured image and icon\n\n#### Translations\n\nThe plugin is currently available in English and Hungarian. Please feel free to submit any new languages via a pull request, I'd be mighty thankful.\n\n#### Useful Links\n\nThis Github repository is for the development of this plugin. If you would like to read installation and in-depth usage instructions you might want to look at the WordPress plugin page instead.\n\n- [Plugin Page](https://wordpress.org/plugins/unread-posts/)\n- [SVN Repository](http://plugins.svn.wordpress.org/unread-posts/)\n\n# Usage\n\nThe plugin offers a widget and an optional section below posts. The widget can be added in Appearance-\u003eWidgets and has a number of options. Hopefully these are all self explanatory, let me know if you have any questions.\n\nThere is also a settings section under Settings-\u003eUnread Posts. This page contains settings for the unread posts section to be placed under posts. You can enable this section by ticking the \"Show Below Post Content?\" box. The options are much the same as the widgets but you have a bit more control over when and what is shown.\n\nFirst of all, use \"Show Below Post Types\" setting to set where this section shows up at all. The unread posts section will only show up under posts with the set post type(s).\n\nThe \"Post Types To List\" section allows you to control which post types are shown in the list. If \"Same as the current post\" is selected the post types listed will match the post type shown. Ie: On pages only pages will be shown, on posts only posts will be shown.\n\nIf you select \"Select from a list\" you will get a dropdown which allows you to specify the post types you would like shown in the list.\n\n\n# Developer Features\n\nThe plugin was written in a completely object oriented fashion to make it easy to extend. If you need to use the raw functionality of unread posts you'll want to use the $up_unread_posts variable which can be globalized and used anywhere.\n\n## Using The Unread Posts Class\n\nThis has the following methods you can use:\n\n- set_posts_as_read( $posts )\n- set_posts_as_unread( $posts )\n- get_read_posts()\n- get_unread_posts()\n- delete_read_posts()\n\nPlease see the appropriate files for more information on these functions and how to use them. All files have extensive phpDoc which should help you out.\n\nDepending on the user state different classes handle these functions, you can also create your own handler. Each handler must adhere to the UP_Unread_Posts_Handler_Interface interface.\n\nAlso note that some functions may not be usable everywhere. For example, cookies are used to store read posts. The value of cookies must be set before any HTML is sent so you can't just use the set_posts_as_read() function anywhere you'd like.\n\n## Hooks\n\nThe plugin has lots of hooks which help you extend it. Here is a full list of the ones available right now:\n\n**up/cookie_name**\nThe default cookie name used will be '[blog-name]-up_read_posts'. If you'd like to change it you can use this filter. The only parameter it receives is the cookie name.\n\n`add_filter( 'up/cookie_name', 'my_up_cookie_name' );\nfunction my_up_cookie_name() {\n    return 'my-awesome-up-cookie';\n}`\n\n**up/meta_field**\nThe default user meta key used will be 'up_read_posts'. If you'd like to change it you can use this filter. The only parameter it receives is the meta key name.\n\n`add_filter( 'up/meta_field', 'my_up_meta_field' );\nfunction my_up_meta_field() {\n    return 'my_read_posts';\n}`\n\n**up/unread_query_args**\nThis filter modifies the query arguments passed to the WP_Query object when querying for unread posts. Unread posts are retrieved by passing the array of read post IDs to the `post__not_in` parameter. If you would like to place additional restrictions you can do so with this filter. It receives the arguments as the first parameter.\n\n`add_filter( 'up/unread_query_args', 'my_up_unread_query_args' );\nfunction my_up_unread_query_args( $args ) {\n    $args['cat'] = 10;\n    return $args;\n}`\n\n**up/unread_widget_display**\nThis filter can modify the display of the post list in the widget. It receives three parameters. The original HTML to be displayed, the WP_Query object of unread posts and the instance variables for the widget. You can use it to completely customize the display of the posts.\n\n`add_filter( 'up/unread_widget_display', 'my_unread_widget_display', 10, 3 );\nfunction my_unread_widget_display( $display, $unread, $instance ) {\n    $output = '\u003cul\u003e';\n    while( $unread-\u003ehave_posts() ) {\n        $unread-\u003ethe_post();\n        $output = '\u003cli\u003e' . the_title( '', '', false ) . '\u003c/li\u003e';\n    }\n    $output = '\u003c/ul\u003e';\n    return $output;\n}`\n\n**up/show_widget**\nIf you want to hide the widget in the admin because you are only using the functionality of the plugin to build something yourself you can do so with this filter. Return false to hide the widget.\n\n`add_filter( 'up/show_widget', 'hide_up_widget' );\nfunction hide_up_widget() {\n    return false;\n}`\n\n**up/show_settings_page**\nIf you want to hide the settings page in the admin because you are only using the functionality of the plugin to build something yourself you can do so with this filter. Return false to hide the settings page.\n\n`add_filter( 'up/show_settings_page', 'hide_settings_page' );\nfunction hide_settings_page() {\n    return false;\n}`\n\n\n**up/posts_section_settings**\nThis filter can be used to modify the settings for the unread posts section shown below single posts. It's only parameter is the settings it received, print that parameter to figure out all the options.\n\n`add_filter( 'up/posts_section_settings', 'my_posts_section_settings' );\nfunction my_posts_section_settings( $settings ) {\n    $settings['count'] = 10;\n    return $settings;\n}`\n\n\n**up/unread_section_display**\nThis filter can modify the display of the unread posts list shown below single posts. It receives three parameters. The original HTML to be displayed, the WP_Query object of unread posts and the settings for the section. You can use it to completely customize the display of the posts.\n\n`add_filter( 'up/unread_section_display', 'my_unread_section_display', 10, 3 );\nfunction my_unread_section_display( $display, $unread, $settings ) {\n    $output = '\u003cul\u003e';\n    while( $unread-\u003ehave_posts() ) {\n        $unread-\u003ethe_post();\n        $output = '\u003cli\u003e' . the_title( '', '', false ) . '\u003c/li\u003e';\n    }\n    $output = '\u003c/ul\u003e';\n    return $output;\n}`\n\n**up/usable_post_types**\nIf you would like to restrict the post types available to the plugin you can use this filter to do so. It takes the currently available post types as the first parameter.\n\n`add_filter( 'up/usable_post_types', 'my_usable_post_types' );\nfunction my_usable_post_types( $post_types ) {\n    $post_types = array( 'post', 'product' );\n    return $post_types;\n}`\n\n\n\n# Want To Help?\n\nIf you like the plugin and you like helping others out there are a few things you can do:\n\n- **[Review the plugin](https://wordpress.org/support/view/plugin-reviews/unread-posts)**\n- **Submit a translation** If you speak another language goodly, you can submit a language file, I'd be mighty thankful! Take a look at the lang directory to see what languages we already have. If a language isn't there create one and submit a pull request. If you have no idea what I'm talking about drop me a line and I'll help you out\n- **[Tip me on Gratipay](https://gratipay.com/danielpataki/)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpdew%2Funread-posts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpdew%2Funread-posts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpdew%2Funread-posts/lists"}