Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bg-az-counter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
azbyka_bg
bg-az-counter
Commits
13f7b099
Commit
13f7b099
authored
Mar 29, 2019
by
Vadim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Комментарии к параметрам JS-скрипта
parent
472609e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
bg_az-counter.php
bg_az-counter.php
+7
-7
No files found.
bg_az-counter.php
View file @
13f7b099
...
...
@@ -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
// Выводить или нет инфу в консоль
)
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment