Commit b76570f7 authored by Vadim's avatar Vadim

Version 2.8.1

* Поправил стили * Запрет вывода на экран рейтинга при отключенной опции
parent 5a17b1c5
......@@ -3,7 +3,7 @@
Plugin Name: Bg Az-Counter
Plugin URI: https://bogaiskov.ru
Description: Подсчет количества посещений страниц на базе stat.azbyka.ru
Version: 2.8
Version: 2.8.1
Author: VBog
Author URI: https://bogaiskov.ru
License: GPL2
......@@ -38,7 +38,7 @@
if ( !defined('ABSPATH') ) {
die( 'Sorry, you are not allowed to access this page directly.' );
}
define('BG_COUNTER_VERSION', '2.8');
define('BG_COUNTER_VERSION', '2.8.1');
define('BG_COUNTER_LOG', dirname(__FILE__ ).'/bg_counter.log');
define('BG_COUNTER_STAT_COUNTERS','https://stat.azbyka.ru/counters');
......
......@@ -4,7 +4,7 @@
margin: 5px;
padding: 0;
}
.widget-item .bg-az-top-posts li,
.widget-item .bg-az-top-posts>li,
.widget-item .bg-az-counter p {
margin: 0px;
padding: 5px;
......@@ -21,18 +21,18 @@
border: none;
border-radius: 50%;
}
.widget-item li a,
.widget-item .bg-az-top-posts>li a,
.widget-item .bg-az-counter p {
color: #90694a;
}
.widget-item li .bg-az-count,
.widget-item .bg-az-top-posts>li .bg-az-count,
.widget-item p .bg-az-counter-now,
.widget-item p .bg-az-counter-unit,
.widget-item p .bg-az-counter-views,
.widget-item p .bg-az-counter-posts {
color: #999;
}
.widget-item li:hover {
.widget-item .bg-az-top-posts>li:hover {
background: #fff;
color: #e88f57;
transition: all .4s ease;
......@@ -52,17 +52,17 @@ i.fa-star-o:before {
}
.widget-item .bg-az-counter p,
.widget-item .bg-az-top-posts li {
.widget-item .bg-az-top-posts>li {
display: table-row;
}
.widget-item .bg-az-counter p>span,
.widget-item li>a,
.widget-item li>span {
.widget-item .bg-az-top-posts>li>a,
.widget-item .bg-az-top-posts>li>span {
display: table-cell;
text-align: right;
}
.widget-item .bg-az-counter p>span.bg-az-counter-title,
.widget-item li>a {
.widget-item .bg-az-top-posts>li>a {
width: 100%;
padding: 0 3px 5px 3px;
text-align: left;
......
......@@ -35,6 +35,8 @@ GET /item-score/project/test/author/1
function bg_az_counter_rating($type, $id) {
global $project;
$option = get_option('bg_counter_options');
if (!$option['rate']) return false;
if (!$id) return false;
if ($type == 'post') {
// Список типов записей имеющих страницу во фронте
......@@ -46,7 +48,6 @@ function bg_az_counter_rating($type, $id) {
if (get_post_status($id) != 'publish') return false;
} else return false;
$option = get_option('bg_counter_options');
if ($option['title']) $page_title = $option['title'];
else $page_title = get_the_title($id);
if ($option['author']) $author = $option['author'];
......
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