Commit ab97cf89 authored by Vadim's avatar Vadim

Version: 2.8.4

* Исправлен баг предыдущей версии
parent e38a1c54
......@@ -3,7 +3,7 @@
Plugin Name: Bg Az-Counter
Plugin URI: https://bogaiskov.ru
Description: Подсчет количества посещений страниц на базе stat.azbyka.ru
Version: 2.8.3
Version: 2.8.4
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.3');
define('BG_COUNTER_VERSION', '2.8.4');
define('BG_COUNTER_LOG', dirname(__FILE__ ).'/bg_counter.log');
define('BG_COUNTER_STAT_COUNTERS','https://stat.azbyka.ru/counters');
......
......@@ -244,7 +244,7 @@ function bg_az_counter_views ($type=null, $id=null, $now=null, $rate=null, $view
$link = get_permalink($id);
// Получить имя проекта по ссылке
if (wp_parse_url( $link, PHP_URL_HOST ) == 'azbyka.ru') {
if (is_front_page()) $proj = wp_parse_url( $link, PHP_URL_PATH );
if (is_front_page() && !is_home()) $proj = wp_parse_url( $link, PHP_URL_PATH );
else $proj = wp_parse_url( dirname($link), PHP_URL_PATH );
$proj = trim($proj, '/');
if (!$proj) $proj = 'main'; // Главный сайт
......
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