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
835f0606
Commit
835f0606
authored
Dec 20, 2019
by
Vadim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version 2.7.6
* Исправлены мелкие ошибки
parent
11b0b353
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
bg_az-counter.php
bg_az-counter.php
+2
-2
counter.php
inc/counter.php
+3
-2
No files found.
bg_az-counter.php
View file @
835f0606
...
...
@@ -3,7 +3,7 @@
Plugin Name: Bg Az-Counter
Plugin URI: https://bogaiskov.ru
Description: Подсчет количества посещений страниц на базе stat.azbyka.ru
Version: 2.7.
5
Version: 2.7.
6
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.7.
5
'
);
define
(
'BG_COUNTER_VERSION'
,
'2.7.
6
'
);
define
(
'BG_COUNTER_LOG'
,
dirname
(
__FILE__
)
.
'/bg_counter.log'
);
define
(
'BG_COUNTER_STAT_COUNTERS'
,
'https://stat.azbyka.ru/counters'
);
...
...
inc/counter.php
View file @
835f0606
...
...
@@ -61,6 +61,7 @@ function getPopularPosts ($limit, $offset=0, $number=false) {
if
(
!
$id
)
continue
;
$post
=
get_post
(
$id
);
if
(
!
$post
)
continue
;
if
(
$post
->
post_status
!=
'publish'
)
continue
;
$title
=
$post
->
post_title
;
$link
=
'<a href="'
.
get_permalink
(
$post
)
.
'" title="'
.
$title
.
'" data-ID="'
.
$p
->
id
.
'" data-type="'
.
$p
->
type
.
'" data-value="'
.
$p
->
value
.
'" data-status="'
.
$post
->
post_status
.
'">'
.
$title
.
'</a>'
;
$quote
.=
'<li>'
.
$link
.
' <span class="bg-az-count">'
.
bg_counter_number_format
(
$p
->
value
)
.
'</span></li>'
.
PHP_EOL
;
...
...
@@ -269,8 +270,8 @@ function bg_counter_number_format ($num) {
$num
=
round
(
$num
/
1000000.0
,
0
)
.
" млн."
;
else
$num
=
round
(
$num
/
1000000.0
,
1
)
.
" млн."
;
}
elseif
(
$num
>
1000
0
.0
)
{
if
(
$num
>
10000
0
.0
)
}
elseif
(
$num
>
1000.0
)
{
if
(
$num
>
10000.0
)
$num
=
round
(
$num
/
1000.0
,
0
)
.
" тыс."
;
else
$num
=
round
(
$num
/
1000.0
,
1
)
.
" тыс."
;
...
...
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