Commit eac8f9f0 authored by Vadim's avatar Vadim

Version 2.2.2

Небольшой баг
parent 23025e23
......@@ -3,7 +3,7 @@
Plugin Name: Bg Az-Counter
Plugin URI: https://bogaiskov.ru
Description: Подсчет количества посещений страниц на базе stat.azbyka.ru
Version: 2.2.1
Version: 2.2.2
Author: VBog
Author URI: https://bogaiskov.ru
License: GPL2
......@@ -37,7 +37,7 @@
if ( !defined('ABSPATH') ) {
die( 'Sorry, you are not allowed to access this page directly.' );
}
define('BG_COUNTER_VERSION', '2.2.1');
define('BG_COUNTER_VERSION', '2.2.2');
define('BG_COUNTER_LOG', dirname(__FILE__ ).'/bg_counter.log');
define('BG_COUNTER_STAT_COUNTERS','https://stat.azbyka.ru/counters');
......
......@@ -162,6 +162,7 @@ function bg_az_counter_views ($type=null, $id=null, $now=null, $rate=null) {
if (is_null($rate)) {
$rate = $option['rate'];
}
if ($id) {
$link = get_permalink($id);
// Получить имя проекта по ссылке
if (wp_parse_url( $link, PHP_URL_HOST ) == 'azbyka.ru') {
......@@ -176,7 +177,7 @@ function bg_az_counter_views ($type=null, $id=null, $now=null, $rate=null) {
}
if ($project != $proj) $id = null; // Заглушка для ссылок на другие проекты
if (get_post_meta( $id, 'link', true )) $id = null;
}
if (!is_null($type) && !is_null($id)) {
$views = '<i title="Просмотры страницы" class="fa fa-eye"></i> <span class="bg-az-counter-views"></span>';
$users = ' <i title="Сейчас читают страницу" class="fa fa-user-o"></i> <span class="bg-az-counter-now"></span>';
......
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