{"id":41954,"date":"2016-02-23T00:15:45","date_gmt":"2016-02-23T00:15:45","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/being-read-now\/"},"modified":"2016-02-14T20:25:03","modified_gmt":"2016-02-14T20:25:03","slug":"being-read-now","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/being-read-now\/","author":317084,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.1","stable_tag":"trunk","tested":"4.4.34","requires":"3.0.1","requires_php":"","requires_plugins":"","header_name":"Being Read Now","header_author":"Nemanja Avramovi\u0107","header_description":"","assets_banners_color":"","last_updated":"2016-02-14 20:25:03","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/plugins\/being-read-now\/","header_author_uri":"http:\/\/avramovic.info","rating":0,"author_block_rating":0,"active_installs":0,"downloads":747,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[11677,11678,1367,1936],"plugin_category":[],"plugin_contributors":[81878],"plugin_business_model":[],"class_list":["post-41954","plugin","type-plugin","status-closed","hentry","plugin_tags-being-read","plugin_tags-currently","plugin_tags-now","plugin_tags-read","plugin_contributors-avram","plugin_committers-avram"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/being-read-now.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin adds <strong>[being_read]<\/strong> shortcode which will display posts currently being read (actually posts which were read X minutes ago).<\/p>\n\n<p>Possible shortcode attributes:<\/p>\n\n<p><strong>[being_read limit=5 minutes=5 orderby=meta_value_num order=DESC]<\/strong><\/p>\n\n<ul>\n<li>limit (number) - Maximum number of posts to show<\/li>\n<li>minutes (number) - Fetch only posts read within last X minutes<\/li>\n<li>orderby (text) - Field to order posts by. By default it will order them by reading timestamp. <a href=\"https:\/\/codex.wordpress.org\/Class_Reference\/WP_Query#Order_.26_Orderby_Parameters\">More info<\/a><\/li>\n<li>order (text) - Ordering direction. ASC or DESC (for ascending or descending order)<\/li>\n<\/ul>\n\n<p>The plugin will enable processing of shortcodes in your WordPress text widget, so you can use the shortcode in text widgets too.<\/p>\n\n<h3>Styling<\/h3>\n\n<p>The plugin comes with no CSS styles provided. You'll have to create your own styles to style the list how you want it to look like.<\/p>\n\n<p>The shortcode will generate such HTML code:<\/p>\n\n<pre><code>&lt;ul id=\"brn-1\" class=\"brn-container\"&gt;\n    &lt;li class=\"brn-item brn-post-1\"&gt;&lt;a class=\"brn-item-link\" href=\"http:\/\/website.com\/hello\/\"&gt;Hello&lt;\/a&gt;&lt;\/li&gt;\n    &lt;li class=\"brn-item brn-post-12\"&gt;&lt;a class=\"brn-item-link\" href=\"http:\/\/website.com\/world\/\"&gt;World&lt;\/a&gt;&lt;\/li&gt;\n    &lt;li class=\"brn-item brn-post-39\"&gt;&lt;a class=\"brn-item-link\" href=\"http:\/\/website.com\/foo\/\"&gt;Foo&lt;\/a&gt;&lt;\/li&gt;\n    &lt;li class=\"brn-item brn-post-45\"&gt;&lt;a class=\"brn-item-link\" href=\"http:\/\/website.com\/bar\/\"&gt;Bar&lt;\/a&gt;&lt;\/li&gt;\n&lt;\/ul&gt;\n<\/code><\/pre>\n\n<p>Use <strong>ul.brn-container<\/strong> to style the list. Then use <strong>li.brn-item<\/strong> to style list items. And if you want to modify the links' look and feel, use <strong>a.brn-item-link<\/strong> CSS selector.<\/p>\n\n<h3>Manual usage<\/h3>\n\n<p>To use your new shortcode within a theme, use this PHP code:<\/p>\n\n<pre><code>&lt;?php echo do_shortcode('[being_read limit=10 minutes=10]'); ?&gt;\n<\/code><\/pre>\n\n<p>To manually display a list of posts currently being read, you can faciliate this code (in your theme files):<\/p>\n\n<pre><code>&lt;?php if (function_exists('being_read_query')): ?&gt;\n    &lt;?php $brnQuery = being_read_query(array('limit'=&gt;10, 'minutes'=&gt;10));\n    if (being_read_count($brnQuery)) : ?&gt;\n    &lt;h3&gt;Being Read Now&lt;\/h3&gt;\n    &lt;ul class=\"brn-container\"&gt;\n        &lt;?php foreach ($brnQuery-&gt;posts as $brnPost) : ?&gt;\n            &lt;li class=\"brn-item\"&gt;&lt;a href=\"&lt;?php echo get_permalink($brnPost-&gt;ID); ?&gt;\"&gt;&lt;?php echo $brnPost-&gt;post_title; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\n        &lt;?php endforeach; ?&gt;\n    &lt;\/ul&gt;\n    &lt;?php endif; ?&gt;\n&lt;?php endif; ?&gt;\n<\/code><\/pre>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/being-read-now<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress.<\/li>\n<li>Use the [being_read] shortcode where you want the list to appear.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>0.1<\/h4>\n\n<ul>\n<li>Initial version<\/li>\n<\/ul>","raw_excerpt":"Display posts currently being read.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/41954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=41954"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/avram"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=41954"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=41954"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=41954"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=41954"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=41954"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=41954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}