Commit f6bba74c authored by Vadim's avatar Vadim

Version 2.7.6

Исправление мелкие ошибки
parent aab3a5a6
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Plugin Name: Bg Az-Counter Plugin Name: Bg Az-Counter
Plugin URI: https://bogaiskov.ru Plugin URI: https://bogaiskov.ru
Description: Подсчет количества посещений страниц на базе stat.azbyka.ru Description: Подсчет количества посещений страниц на базе stat.azbyka.ru
Version: 2.7.5 Version: 2.7.6
Author: VBog Author: VBog
Author URI: https://bogaiskov.ru Author URI: https://bogaiskov.ru
License: GPL2 License: GPL2
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
if ( !defined('ABSPATH') ) { if ( !defined('ABSPATH') ) {
die( 'Sorry, you are not allowed to access this page directly.' ); die( 'Sorry, you are not allowed to access this page directly.' );
} }
define('BG_COUNTER_VERSION', '2.7.5'); define('BG_COUNTER_VERSION', '2.7.6');
define('BG_COUNTER_LOG', dirname(__FILE__ ).'/bg_counter.log'); define('BG_COUNTER_LOG', dirname(__FILE__ ).'/bg_counter.log');
define('BG_COUNTER_STAT_COUNTERS','https://stat.azbyka.ru/counters'); define('BG_COUNTER_STAT_COUNTERS','https://stat.azbyka.ru/counters');
......
...@@ -89,7 +89,7 @@ i.fa-star-o:before { ...@@ -89,7 +89,7 @@ i.fa-star-o:before {
height:20px; height:20px;
margin-right:3px; margin-right:3px;
list-style:none; list-style:none;
cursor:defult; cursor:default;
background-image:url(stars.png); background-image:url(stars.png);
background-size:20px auto; background-size:20px auto;
background-position:0px 20px; background-position:0px 20px;
......
...@@ -61,6 +61,7 @@ function getPopularPosts ($limit, $offset=0, $number=false) { ...@@ -61,6 +61,7 @@ function getPopularPosts ($limit, $offset=0, $number=false) {
if (!$id) continue; if (!$id) continue;
$post = get_post($id); $post = get_post($id);
if (!$post) continue; if (!$post) continue;
if ($post->post_status != 'publish') continue;
$title = $post->post_title; $title = $post->post_title;
$link = '<a href="'. get_permalink($post).'" title="'.$title.'" data-ID="'.$p->id.'" data-type="'.$p->type.'" data-value="'.$p->value.'" data-status="'.$post->post_status.'">'.$title.'</a>'; $link = '<a href="'. get_permalink($post).'" title="'.$title.'" data-ID="'.$p->id.'" data-type="'.$p->type.'" data-value="'.$p->value.'" data-status="'.$post->post_status.'">'.$title.'</a>';
$quote .= '<li>'.$link.' <span class="bg-az-count">'.bg_counter_number_format($p->value).'</span></li>'. PHP_EOL; $quote .= '<li>'.$link.' <span class="bg-az-count">'.bg_counter_number_format($p->value).'</span></li>'. PHP_EOL;
...@@ -269,8 +270,8 @@ function bg_counter_number_format ($num) { ...@@ -269,8 +270,8 @@ function bg_counter_number_format ($num) {
$num = round($num/1000000.0, 0)."&nbsp;млн."; $num = round($num/1000000.0, 0)."&nbsp;млн.";
else else
$num = round($num/1000000.0, 1)."&nbsp;млн."; $num = round($num/1000000.0, 1)."&nbsp;млн.";
} elseif ($num > 10000.0) { } elseif ($num > 1000.0) {
if ($num > 100000.0) if ($num > 10000.0)
$num = round($num/1000.0, 0)."&nbsp;тыс."; $num = round($num/1000.0, 0)."&nbsp;тыс.";
else else
$num = round($num/1000.0, 1)."&nbsp;тыс."; $num = round($num/1000.0, 1)."&nbsp;тыс.";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment