Commit 13f7b099 authored by Vadim's avatar Vadim

Комментарии к параметрам JS-скрипта

parent 472609e4
......@@ -38,7 +38,7 @@ if ( !defined('ABSPATH') ) {
die( 'Sorry, you are not allowed to access this page directly.' );
}
define('BG_COUNTER_VERSION', '1.1.1');
define('BG_COUNTER_VERSION', '1.1.2');
define('BG_COUNTER_LOG', dirname(__FILE__ ).'/bg_counter.log');
define('BG_COUNTER_STAT_COUNTERS','https://stat.azbyka.ru/counters');
define('BG_COUNTER_STAT_RAITING','https://stat.azbyka.ru/rating');
......@@ -90,12 +90,12 @@ function bg_counter_enqueue_frontend_scripts () {
wp_enqueue_script( 'bg_counter_proc', plugins_url( 'js/counter.js', __FILE__ ), false, BG_COUNTER_VERSION, true );
wp_localize_script( 'bg_counter_proc', 'bg_counter',
array(
'counterurl' => BG_COUNTER_STAT_COUNTERS,
'websocket' => BG_COUNTER_REALTIME_VIEW,
'project' => $project,
'type' => $type,
'ID' => $postID,
'debug' => ((int) $option['debug'])?true:false
'counterurl' => BG_COUNTER_STAT_COUNTERS, // Всегда 'https://stat.azbyka.ru/counters'
'websocket' => BG_COUNTER_REALTIME_VIEW, // Всегда 'wss://stat.azbyka.ru/realtime-view'
'project' => $project, // Имя текущего проекта, например, '/propovedi'
'type' => $type, // Пока только 'post' или пусто
'ID' => $postID, // ID поста
'debug' => ((int) $option['debug'])?true:false // Выводить или нет инфу в консоль
)
);
}
......
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