{"id":29568,"date":"2014-05-18T06:37:05","date_gmt":"2014-05-18T06:37:05","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/likes-counter\/"},"modified":"2014-09-07T16:35:03","modified_gmt":"2014-09-07T16:35:03","slug":"likes-counter","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/likes-counter\/","author":13839218,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.5","stable_tag":"1.5","tested":"4.0.38","requires":"3.0.1","requires_php":"","requires_plugins":"","header_name":"Likes Counter","header_author":"Gon\u00e7alo Neves","header_description":"","assets_banners_color":"a1b9c4","last_updated":"2014-09-07 16:35:03","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.gittip.com\/goncaloneves","header_plugin_uri":"https:\/\/github.com\/goncaloneves\/likescounter","header_author_uri":"https:\/\/github.com\/goncaloneves","rating":5,"author_block_rating":0,"active_installs":30,"downloads":5033,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"2"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"983720","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"983720","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"917605","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3","1.4","1.5"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"917606","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"917606","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"917606","resolution":"3","location":"assets"},"screenshot-4.png":{"filename":"screenshot-4.png","revision":"917606","resolution":"4","location":"assets"},"screenshot-5.png":{"filename":"screenshot-5.png","revision":"917607","resolution":"5","location":"assets"}},"screenshots":{"1":"Likes Counter with css styling from Example in Description tab.","2":"Likes Counter for Wordpress without formatting.","3":"Likes Counter for Wordpress without formatting.","4":"Likes Counter for Wordpress with formatting.","5":"Likes Counter for Wordpress with formatting."}},"plugin_section":[],"plugin_tags":[869,157,5283,156,169],"plugin_category":[36,43,56],"plugin_contributors":[86212],"plugin_business_model":[],"class_list":["post-29568","plugin","type-plugin","status-closed","hentry","plugin_tags-counter","plugin_tags-facebook","plugin_tags-fb","plugin_tags-like","plugin_tags-likes","plugin_category-analytics","plugin_category-customization","plugin_category-social-and-sharing","plugin_contributors-goncaloneves","plugin_committers-goncaloneves"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/likes-counter_a1b9c4.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/likes-counter\/assets\/screenshot-1.png?rev=917606","caption":"Likes Counter with css styling from Example in Description tab."},{"src":"https:\/\/ps.w.org\/likes-counter\/assets\/screenshot-2.png?rev=917606","caption":"Likes Counter for Wordpress without formatting."},{"src":"https:\/\/ps.w.org\/likes-counter\/assets\/screenshot-3.png?rev=917606","caption":"Likes Counter for Wordpress without formatting."},{"src":"https:\/\/ps.w.org\/likes-counter\/assets\/screenshot-4.png?rev=917606","caption":"Likes Counter for Wordpress with formatting."},{"src":"https:\/\/ps.w.org\/likes-counter\/assets\/screenshot-5.png?rev=917607","caption":"Likes Counter for Wordpress with formatting."}],"raw_content":"<!--section=description-->\n<p>Likes Counter gets Facebook Likes of any page you want and stores the returning value temporarily in database so it doesn't bubble requests to Facebook API.<\/p>\n\n<p>Benefits:<\/p>\n\n<ol>\n<li><p>You can use Likes Counter multiple times in the same code.<\/p><\/li>\n<li><p>After the cache duration expires, it will make a new request and update the Likes value, again for the duration set.<\/p><\/li>\n<li><p>This plugin stores its values with <a href=\"http:\/\/codex.wordpress.org\/Transients_API\" title=\"Transients API\">Transients API<\/a>, so it can be cachable outside database with memcached plugins. I recommend using <a href=\"http:\/\/wordpress.org\/plugins\/w3-total-cache\/\" title=\"W3 Total Cache\">W3 Total Cache<\/a>.<\/p><\/li>\n<li><p>Easy to style span tags with css classes <em>likes-counter<\/em> and <em>likes-counter-separator<\/em>.<\/p><\/li>\n<\/ol>\n\n<p>I made this plugin to be as light as possible, so I ended up making a shortcode that gives the user the functionality to build a powerful Facebook Likes Counter.<\/p>\n\n<h4>Usage<\/h4>\n\n<p>You can place it anywhere in your post\/page with [likescounter page='<em>page_name_or_id<\/em>'] shortcode.<\/p>\n\n<p><strong>Example:<\/strong><\/p>\n\n<p>SHORTCODE IN POST\/PAGE:<\/p>\n\n<blockquote>\n  <p>[likescounter page='WordPress' duration='30' offset='10' separator='dot' tag='true']<\/p>\n<\/blockquote>\n\n<p>-- Gets <em>842488<\/em> likes from Wordpress Facebook page,<\/p>\n\n<p>-- Caches the value for 30 minutes,<\/p>\n\n<p>-- Offsets likes count by 10: <em>842478<\/em>,<\/p>\n\n<p>-- Adds a thousand dot separator: <em>842.478<\/em>,<\/p>\n\n<p>-- Adds a span tag around each character.<\/p>\n\n<pre><code>Returns : &lt;span class=\"likes-counter\"&gt;8&lt;\/span&gt;\n          &lt;span class=\"likes-counter\"&gt;4&lt;\/span&gt;\n          &lt;span class=\"likes-counter\"&gt;2&lt;\/span&gt;\n          &lt;span class=\"likes-counter-separator\"&gt;.&lt;\/span&gt;\n          &lt;span class=\"likes-counter\"&gt;4&lt;\/span&gt;\n          &lt;span class=\"likes-counter\"&gt;7&lt;\/span&gt;\n          &lt;span class=\"likes-counter\"&gt;8&lt;\/span&gt;\n<\/code><\/pre>\n\n<p>CSS:<\/p>\n\n<p>Now lets add some CSS inside <em>style.css<\/em> of your active Theme:<\/p>\n\n<pre><code>span.likes-counter {\n    background-color: #eeeeee;\n    border-bottom: 1px solid #aaaaaa;\n    border-left: 1px solid #cccccc;\n    border-radius: 5px;\n    border-right: 1px solid #dddddd;\n    border-top: 1px solid #cccccc;\n    color: #1e8cbe;\n    margin: 2px;\n    padding: 5px 10px;\n}\n\nspan.likes-counter-separator {\n    color: #dddddd;\n    padding: 2px 4px;\n}\n<\/code><\/pre>\n\n<p>PHP:<\/p>\n\n<p>If you need to use inside a Theme Template file, use <a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/do_shortcode\" title=\"do_shortcode\">do_shortcode<\/a>:<\/p>\n\n<pre><code>&lt;?php echo do_shortcode( '[likescounter page=\"page_name_or_id\"]' ); ?&gt;\n<\/code><\/pre>\n\n<h4>Attributes<\/h4>\n\n<ul>\n<li><strong>page (string):<\/strong> facebook page name (ex: wordpress) or id (ex: 6427302910)<\/li>\n<li><strong>duration (1 to 1440 - default: 30):<\/strong> duration in minutes to cache in database before making a new request.<\/li>\n<li><strong>offset (0 to number of current likes - default: 0):<\/strong> subtracts from Likes value and returns the rest. It can be used to reset likes count for a Likes goal objective in marketing campaigns.<\/li>\n<li><strong>separator (dot, comma, short, space or none - default: none):<\/strong> thousand separator type. Short separator, shortens thousand to K, million to M and billion to B.<\/li>\n<li><strong>tag (true or false - default: true):<\/strong> span tag around each character for css styling. <code>&lt;span class=\"likes-counter\"&gt;number_character&lt;\/span&gt;<\/code> for number characters and <code>&lt;span class=\"likes-counter-separator\"&gt;separator_character&lt;\/span&gt;<\/code> for separators characters.<\/li>\n<\/ul>\n\n<h4>Important<\/h4>\n\n<blockquote>\n  <p>Could not get likes data. Please verify if page is correct.<\/p>\n<\/blockquote>\n\n<p>If you get this there are two possible reasons:<\/p>\n\n<ul>\n<li>Page \/ id misspelled or doesn't exist (most likely),<\/li>\n<li>Couldn't connect to Facebook Graph API or Timeout. It may happen if you reach Facebook policy limits, consider increasing cache duration.<\/li>\n<\/ul>\n\n<p><strong>Thank you<\/strong> for you interest in Likes Counter plugin.<\/p>\n\n<p>If you need help please contact me via Support tab.\nFeel free to contribute and fork, this plugin is at https:\/\/github.com\/goncaloneves\/likescounter<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>likes-counter<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Place [likescounter page='page_name_or_id'] shortcode with attributes in your post or page<\/li>\n<\/ol>\n\n<p>or<\/p>\n\n<ol>\n<li>Install plugin directly in Wordpress through the 'Plugins', Add New -&gt; Search panel<\/li>\n<li>Search for <code>Likes Counter<\/code><\/li>\n<li>Place [likescounter page='page_name_or_id'] shortcode with attributes in your post or page<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Do you need support or found an issue ?<\/dt>\n<dd><p>Please write in Support tab or issue on Github at https:\/\/github.com\/goncaloneves\/likescounter\/issues<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.5<\/h4>\n\n<ul>\n<li>Add plugin icons<\/li>\n<li>Update readme to WordPress 4.0<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>Encapsulate plugin functions inside a singleton class.<\/li>\n<li>Update wp_remote_get to wp_safe_remote_get, for stronger security.<\/li>\n<li>Changed intval to (int) type for better performance.<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Add dot in short separator when likes are inferior to 10 000 likes.<\/li>\n<li>Fixed short separator to work only when likes are superior to 1000.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Add short number separator (K for thousand, M for million and B for billion).<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Add add_character_tag function to create a span tag around each character for better css styling.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>First stable release.<\/li>\n<\/ul>","raw_excerpt":"Likes Counter gets Facebook Likes of any page you want and stores the returning value temporarily in database so it doesn&#039;t bubble requests to Fa &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/29568","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=29568"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/goncaloneves"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=29568"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=29568"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=29568"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=29568"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=29568"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=29568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}