{"id":1924,"date":"2007-08-13T09:36:02","date_gmt":"2007-08-13T09:36:02","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/ns-recent-posts\/"},"modified":"2007-08-16T08:04:38","modified_gmt":"2007-08-16T08:04:38","slug":"ns-recent-posts","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/ns-recent-posts\/","author":221348,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0","stable_tag":"trunk","tested":"2.2.2","requires":"2.0","requires_php":"","requires_plugins":"","header_name":"NS Recent Posts","header_author":"Nikita Seleckis","header_description":"","assets_banners_color":"","last_updated":"2007-08-16 08:04:38","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/seleckis.lv\/projects\/wp-plugins\/ns_recent-posts","header_author_uri":"http:\/\/seleckis.lv\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":6156,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"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":[245,86,2281,162],"plugin_category":[43],"plugin_contributors":[92704],"plugin_business_model":[],"class_list":["post-1924","plugin","type-plugin","status-closed","hentry","plugin_tags-list","plugin_tags-post","plugin_tags-recent","plugin_tags-widget","plugin_category-customization","plugin_contributors-nikitaseleckis","plugin_committers-nikitaseleckis"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/ns-recent-posts.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Returns an array of the most recent posts. Simple and powerfull.<\/p>\n\n<h3>Usage<\/h3>\n\n<p>Function <code>ns_recent_posts(10, 0, 200, false, \", \")<\/code> returns an array of objects of recent posts.<\/p>\n\n<p>Params for function:<\/p>\n\n<ul>\n<li><em>$no_posts<\/em> - number of posts to display. Default <strong>10<\/strong>.<\/li>\n<li><em>$first<\/em> - Number of the first post. Used when is needed to display, for example, posts from 10 to 20, but not from the first post. Default <strong>0<\/strong>.<\/li>\n<li><em>$excerpt_len<\/em> - Number of symbols in excerpt. Default <strong>200<\/strong>.<\/li>\n<li><em>$db_unicode<\/em> - boolean value variable. Determines if your wordpress database is in unicode format (UTF-8). Default FALSE. <strong>FALSE<\/strong> - non-Unicode, uses standart string functions. <strong>TRUE<\/strong> - Unicode(UTF-8), uses mbstring functions.<\/li>\n<li><em>$tags_divider<\/em> - string value of categories list divider. Default <strong>\", \"<\/strong>.<\/li>\n<\/ul>\n\n<p><strong>Use function <code>ns_recent_posts()<\/code> in a loop.<\/strong><\/p>\n\n<p>Objects returned by array has properties, that is used in construction: <strong>$object-&gt;property<\/strong>, where <strong>\"$object\"<\/strong> - your variable used in a loop, but <strong>\"property\"<\/strong> can be:<\/p>\n\n<ul>\n<li><em>post_title<\/em> - Title of a post<\/li>\n<li><em>permalink<\/em> - Link to post<\/li>\n<li><em>bookmark<\/em> - Title of a post of \"title\" attribute<\/li>\n<li><em>day<\/em> - day<\/li>\n<li><em>month<\/em> - month<\/li>\n<li><em>year<\/em> - year<\/li>\n<li><em>post_content<\/em> - post preview (excerpt)<\/li>\n<li><em>post_tags<\/em> - list of categories (tags)<\/li>\n<li><em>comment_count<\/em> - number of categories<\/li>\n<\/ul>\n\n<h4>Example<\/h4>\n\n<pre><code>&lt;?php\nforeach (ns_recent_posts(10, 0, 200, false, \", \")  as $re_post){\necho &lt;&lt;&lt;HTML\n&lt;div class=\"recent-post\"&gt;\n      &lt;h3&gt;&lt;a href=\"{$re_post-&gt;permalink}\" rel=\"bookmark\" title=\"{$re_post-&gt;bookmark}&gt;\n            {$re_post-&gt;post_title}\n      &lt;\/a&gt;&lt;\/h3&gt;\n      &lt;span class=\"post-date\"&gt;{$re_post-&gt;day}.{$re_post-&gt;month}.{$re_post-&gt;year}&lt;\/span&gt;\n      &lt;div class=\"entry\"&gt;\n            &lt;p&gt;{$re_post-&gt;post_content}&lt;\/p&gt;\n            &lt;span class=\"tags\"&gt;&lt;strong&gt;Tags: &lt;\/strong&gt;{$re_post-&gt;post_tags}&lt;\/span&gt;\n            &lt;span class=\"read-comments\"&gt;\n                  &lt;a href=\"{$re_post-&gt;permalink}#respond\"&gt;Comments ({$re_post-&gt;comment_count}) &amp;raquo;&lt;\/a&gt;\n            &lt;\/span&gt;\n      &lt;\/div&gt;\n&lt;\/div&gt;\nHTML;\n}\n?&gt;\n<\/code><\/pre>\n\n<h4>Note<\/h4>\n\n<ul>\n<li>Place this code to any place in any file of your template.<\/li>\n<li>To show value of property of object in <strong>\"echo\"<\/strong>, add braces in construction: <strong>{$object-&gt;property}<\/strong><\/li>\n<li>Plugin also erases all tags, and leaves simple text in excerpt.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<p>Standard WordPress quick and easy installation.<\/p>\n\n<ol>\n<li>Download and unzip ns_recent-posts.zip<\/li>\n<li>Upload to the plugins folder. <\/li>\n<li>Log in WordPress and activate the plugin.<\/li>\n<\/ol>","raw_excerpt":"Returns an array of the most recent posts. Simple and powerfull.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/1924","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=1924"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/nikitaseleckis"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=1924"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=1924"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=1924"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=1924"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=1924"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=1924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}