Version Description
= 13.0 = IMPORTANT NOTE Welcome to WP Statistics v13.0, our biggest update! Thank you for being part of our community. Weve been working hard for one year to develop this version and make WP Statistics better for you. Before updating, make sure you disabled all your add-ons, then after that, try to update add-ons.
If you encounter any bug, please create an issue on GitHub where we can act upon them more efficiently. Since GitHub is not a support forum, just bugs are welcomed, and any other request will be closed.
Download this release
Release Info
Developer | mostafa.s1990 |
Plugin | WP Statistics |
Version | 13.2.6 |
Comparing to | |
See all releases |
Code changes from version 13.2.5 to 13.2.6
- assets/images/veronalabs.svg +14 -19
- assets/images/welcome/icon-github.png +0 -0
- assets/images/welcome/icon-instagram.png +0 -0
- assets/images/welcome/icon-linkedin.png +0 -0
- assets/images/welcome/icon-twitter.png +0 -0
- assets/images/welcome/stars.png +0 -0
- assets/images/welcome/what-is-new/coupon-code.png +0 -0
- assets/images/welcome/what-is-new/wp-telegram-channels.png +0 -0
- assets/images/welcome/what-is-new/wp-telegram-chatbox.gif +0 -0
- assets/images/welcome/what-is-new/wp-telegram-iphone-2.png +0 -0
- assets/images/welcome/what-is-new/wp-telegram-send.png +0 -0
- assets/images/welcome/what-is-new/wp-telegram-settings.png +0 -0
- includes/admin/meta-box/wp-statistics-meta-box-browsers.php +3 -1
- includes/admin/meta-box/wp-statistics-meta-box-devices.php +15 -8
- includes/admin/meta-box/wp-statistics-meta-box-models.php +15 -8
- includes/admin/meta-box/wp-statistics-meta-box-platforms.php +8 -1
- includes/admin/templates/meta-box/about.php +1 -1
- includes/admin/templates/settings/general.php +0 -10
- includes/api/v2/class-wp-statistics-api-hit.php +0 -6
- includes/api/v2/class-wp-statistics-api-meta-box.php +10 -7
- includes/class-wp-statistics-country.php +2 -1
- includes/class-wp-statistics-frontend.php +5 -3
- includes/class-wp-statistics-helper.php +0 -15
- includes/class-wp-statistics-hits.php +0 -88
- includes/class-wp-statistics-option.php +1 -1
- includes/class-wp-statistics-pages.php +1 -1
- includes/class-wp-statistics-referred.php +3 -1
- includes/class-wp-statistics-user-agent.php +2 -2
- includes/class-wp-statistics-user-online.php +4 -3
- includes/class-wp-statistics-visitor.php +4 -3
- readme.txt +7 -1
- wp-statistics.php +1 -1
assets/images/veronalabs.svg
CHANGED
@@ -1,19 +1,14 @@
|
|
1 |
-
<svg xmlns="http://www.w3.org/2000/svg"
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
<path class="cls-1" d="M266.71 89.92c-.38-8.93-5-14-13.86-14.5a208.27 208.27 0 0 0-21.95 0c-8.18.42-12.86 4.49-13.66 12.49a125.62 125.62 0 0 0 .21 30.34c.95 6.61 5.11 10.38 11.69 11a133.05 133.05 0 0 0 25.41 0c7.11-.68 11.49-5.26 12-12.4.33-4.63.17-9.14.17-13.8.05.02.17-8.81-.01-13.13zm-11.09 12.59V113c0 3.49-1.44 5.36-5 5.36h-17.49c-3.32 0-5-1.73-5-4.9q-.12-11 0-22c0-3.22 1.89-4.93 5-5 5.83-.1 11.66-.13 17.48 0 3.38.08 5.09 2 5 5.5s.01 7.04.01 10.55zM373.63 90.57c-.19-9.81-5.38-14.93-15.27-15.26-1 0-1.92 0-2.88-.06h-27.16a1.29 1.29 0 0 0-1.32 1.29v8.61a1.29 1.29 0 0 0 1.29 1.29h28c3.62 0 6.23 1.2 6.23 5.38v21.49c0 3.5-1.91 5.09-5.37 5.07-5.66 0-11.33-.06-17 0-3.59 0-5.25-1.88-5.23-5.21s2-5.07 5.43-5c5.16.07 10.33-.07 15.49 0 2.22 0 3.51-.41 3.3-3a37.28 37.28 0 0 1 0-5.49c.15-2.27-.94-2.83-3-2.79-6.33.13-12.67-.12-19 .23-8.62.47-13.3 6-13.52 15.39-.24 10.11 4.2 16.15 13.1 16.74a200.25 200.25 0 0 0 23 .12c9-.44 13.64-5.4 13.88-14.37.21-8.1.18-16.27.03-24.43z"/>
|
16 |
-
<rect class="cls-2" x="392.48" y="53.6" width="11.13" height="76.05" rx="2.69" ry="2.69"/>
|
17 |
-
<path class="cls-2" d="M512.63 89.63c-.23-8.38-4.86-13.48-13.17-14.14a129.71 129.71 0 0 0-19.46-.1l-.12 11.1c4.82-.27 11.1-.09 15.93-.05 3.8 0 5.88 1.76 5.83 5.8q-.12 10.25 0 20.49c0 4-1.9 5.73-5.83 5.66-4.5-.09-9 0-13.5 0-5.67 0-7.54-.44-8.12-3.8V55.8a2.44 2.44 0 0 0-2.44-2.44h-6.49a2.44 2.44 0 0 0-2.44 2.44v58.77c.45 9.89 5.36 14.64 15.41 14.94 7 .21 14 .23 21-.15 8.41-.45 13.14-5.32 13.41-13.76.24-8.6.22-17.32-.01-25.97zM457.62 90.33c-.2-9.34-5.19-14.47-14.52-15-1.34-.07-2.68-.1-4-.11h-25.78a1.55 1.55 0 0 0-1.55 1.55v8.09a1.55 1.55 0 0 0 1.55 1.55h26.92c4.26 0 6.47 1.81 6.36 6.34-.15 6.66-.07 13.33 0 20 0 3.64-1.55 5.64-5.36 5.61-5.66 0-11.33-.06-17 0-3.6 0-5.26-1.86-5.24-5.2s2-5.08 5.45-5c3.83.07 7.66 0 11.49 0 7.91 0 7.81 0 7.35-8-.13-2.36-.87-3.23-3.24-3.17-6.16.14-12.34-.1-18.49.19-8.89.42-13.7 6-13.88 15.59-.18 10.07 4.36 16.05 13.3 16.58 7.47.44 15 .41 22.47.11 9.22-.37 14-5.36 14.17-14.61q.28-12.27 0-24.52z"/>
|
18 |
-
</g>
|
19 |
-
</svg>
|
1 |
+
<svg width="170" height="28" viewBox="0 0 170 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<path d="M42.5063 23L36.5737 4.40869H39.894L44.3252 19.0693L48.7563 4.40869H52.0278L46.1074 23H42.5063Z" fill="#13152D"/>
|
3 |
+
<path d="M58.4854 23.2441C57.6309 23.2441 56.8171 23.0814 56.0439 22.7559C55.279 22.4303 54.6117 21.9787 54.042 21.4009C53.4723 20.8231 53.0166 20.1151 52.6748 19.2769C52.3411 18.4386 52.1743 17.5312 52.1743 16.5547C52.1743 14.6178 52.7765 13.0269 53.981 11.7817C55.1935 10.5285 56.6991 9.90186 58.4976 9.90186C60.1821 9.90186 61.5697 10.4756 62.6602 11.623C63.7588 12.7705 64.3081 14.2923 64.3081 16.1885C64.3081 16.5384 64.2837 16.8761 64.2349 17.2017H55.1406C55.2301 18.284 55.6045 19.1304 56.2637 19.7407C56.931 20.3511 57.696 20.6562 58.5586 20.6562C59.2992 20.6562 59.9339 20.465 60.4629 20.0825C60.9919 19.6919 61.3743 19.1711 61.6104 18.52L64.125 19.4478C63.7995 20.5789 63.124 21.4945 62.0986 22.1943C61.0814 22.8942 59.877 23.2441 58.4854 23.2441ZM55.2017 15.1143H61.4028C61.2889 14.1865 60.9552 13.4704 60.4019 12.9658C59.8566 12.4613 59.2096 12.209 58.4609 12.209C57.6715 12.209 56.9717 12.4653 56.3613 12.978C55.751 13.4826 55.3644 14.1947 55.2017 15.1143Z" fill="#13152D"/>
|
4 |
+
<path d="M67.0303 23V10.2192H69.8501V12.5874H69.8745C70.1838 11.7736 70.6395 11.151 71.2417 10.7197C71.8521 10.2803 72.5682 10.0605 73.3901 10.0605C73.8703 10.0605 74.2161 10.1297 74.4277 10.2681V13.2832C74.1104 13.1774 73.736 13.1245 73.3047 13.1245C72.2305 13.1245 71.4248 13.4744 70.8877 14.1743C70.3506 14.8742 70.082 15.8467 70.082 17.0918V23H67.0303Z" fill="#13152D"/>
|
5 |
+
<path d="M85.0356 22.3042C84.0591 22.9308 82.9523 23.2441 81.7153 23.2441C80.4784 23.2441 79.3716 22.9308 78.395 22.3042C77.4185 21.6694 76.6779 20.8475 76.1733 19.8384C75.6688 18.8293 75.4165 17.7347 75.4165 16.5547C75.4165 15.6758 75.5671 14.8376 75.8682 14.04C76.1693 13.2344 76.5843 12.5264 77.1133 11.916C77.6504 11.2975 78.3177 10.8092 79.1152 10.4512C79.9128 10.085 80.7795 9.90186 81.7153 9.90186C82.9604 9.90186 84.0672 10.2152 85.0356 10.8418C86.0122 11.4603 86.7528 12.2741 87.2573 13.2832C87.77 14.2842 88.0264 15.3747 88.0264 16.5547C88.0264 17.7347 87.77 18.8293 87.2573 19.8384C86.7528 20.8475 86.0122 21.6694 85.0356 22.3042ZM78.5049 16.5547C78.5049 17.6696 78.7979 18.6095 79.3838 19.3745C79.9779 20.1395 80.755 20.522 81.7153 20.522C82.6756 20.522 83.4528 20.1395 84.0469 19.3745C84.6409 18.6095 84.938 17.6696 84.938 16.5547C84.938 15.4561 84.6409 14.5283 84.0469 13.7715C83.4528 13.0065 82.6756 12.624 81.7153 12.624C80.755 12.624 79.9779 13.0065 79.3838 13.7715C78.7979 14.5283 78.5049 15.4561 78.5049 16.5547Z" fill="#13152D"/>
|
6 |
+
<path d="M90.6753 23V10.2192H93.4829V11.9282H93.5073C93.9305 11.269 94.4595 10.7686 95.0942 10.4268C95.7371 10.0768 96.4451 9.90186 97.2183 9.90186C98.5041 9.90186 99.5742 10.325 100.429 11.1714C101.283 12.0177 101.71 13.2303 101.71 14.8091V23H98.6587V15.5049C98.6587 14.626 98.4512 13.9383 98.0361 13.4419C97.6292 12.9455 97.0596 12.6973 96.3271 12.6973C95.6436 12.6973 95.0535 12.9373 94.5571 13.4175C94.0688 13.8895 93.7922 14.5243 93.7271 15.3218V23H90.6753Z" fill="#13152D"/>
|
7 |
+
<path d="M104.457 14.4551C104.506 13.7552 104.697 13.1123 105.031 12.5264C105.364 11.9404 105.788 11.4603 106.3 11.0859C106.821 10.7116 107.403 10.4227 108.046 10.2192C108.689 10.0076 109.348 9.90186 110.023 9.90186C111.513 9.90186 112.725 10.2925 113.661 11.0737C114.597 11.8468 115.065 12.974 115.065 14.4551V23H112.233V20.9858H112.172C111.854 21.6206 111.358 22.1536 110.683 22.585C110.007 23.0081 109.201 23.2197 108.266 23.2197C107.134 23.2197 106.186 22.8901 105.421 22.231C104.665 21.5636 104.286 20.6766 104.286 19.5698C104.286 18.6258 104.628 17.8161 105.312 17.1406C106.003 16.4652 106.935 16.0298 108.107 15.8345L110.451 15.4316C111.069 15.3258 111.517 15.159 111.793 14.9312C112.07 14.7033 112.208 14.3696 112.208 13.9302C112.208 13.4907 112.013 13.1082 111.623 12.7827C111.232 12.4572 110.707 12.2944 110.048 12.2944C109.267 12.2944 108.603 12.5426 108.058 13.0391C107.513 13.5355 107.228 14.1621 107.204 14.9189L104.457 14.4551ZM107.387 19.3745C107.387 19.8465 107.562 20.2209 107.912 20.4976C108.262 20.7743 108.729 20.9126 109.315 20.9126C109.568 20.9126 109.82 20.876 110.072 20.8027C110.333 20.7295 110.593 20.6074 110.854 20.4365C111.114 20.2656 111.342 20.0581 111.537 19.814C111.741 19.5698 111.903 19.2565 112.025 18.874C112.147 18.4834 112.208 18.0562 112.208 17.5923V16.9819C111.859 17.104 111.26 17.2424 110.414 17.397L109.315 17.5923C108.673 17.7144 108.188 17.93 107.863 18.2393C107.545 18.5485 107.387 18.9269 107.387 19.3745Z" fill="#13152D"/>
|
8 |
+
<path d="M119.081 23V4.40869H122.169V20.0825H128.847V23H119.081Z" fill="#13152D"/>
|
9 |
+
<path d="M130.727 14.4551C130.775 13.7552 130.967 13.1123 131.3 12.5264C131.634 11.9404 132.057 11.4603 132.57 11.0859C133.091 10.7116 133.673 10.4227 134.315 10.2192C134.958 10.0076 135.618 9.90186 136.293 9.90186C137.782 9.90186 138.995 10.2925 139.931 11.0737C140.867 11.8468 141.334 12.974 141.334 14.4551V23H138.502V20.9858H138.441C138.124 21.6206 137.628 22.1536 136.952 22.585C136.277 23.0081 135.471 23.2197 134.535 23.2197C133.404 23.2197 132.456 22.8901 131.691 22.231C130.934 21.5636 130.556 20.6766 130.556 19.5698C130.556 18.6258 130.897 17.8161 131.581 17.1406C132.273 16.4652 133.205 16.0298 134.376 15.8345L136.72 15.4316C137.339 15.3258 137.786 15.159 138.063 14.9312C138.34 14.7033 138.478 14.3696 138.478 13.9302C138.478 13.4907 138.283 13.1082 137.892 12.7827C137.501 12.4572 136.977 12.2944 136.317 12.2944C135.536 12.2944 134.873 12.5426 134.328 13.0391C133.782 13.5355 133.498 14.1621 133.473 14.9189L130.727 14.4551ZM133.656 19.3745C133.656 19.8465 133.831 20.2209 134.181 20.4976C134.531 20.7743 134.999 20.9126 135.585 20.9126C135.837 20.9126 136.09 20.876 136.342 20.8027C136.602 20.7295 136.863 20.6074 137.123 20.4365C137.383 20.2656 137.611 20.0581 137.807 19.814C138.01 19.5698 138.173 19.2565 138.295 18.874C138.417 18.4834 138.478 18.0562 138.478 17.5923V16.9819C138.128 17.104 137.53 17.2424 136.684 17.397L135.585 17.5923C134.942 17.7144 134.458 17.93 134.132 18.2393C133.815 18.5485 133.656 18.9269 133.656 19.3745Z" fill="#13152D"/>
|
10 |
+
<path d="M144.801 23V4.12793H147.853V11.8306H147.89C148.874 10.5448 150.148 9.90186 151.71 9.90186C153.265 9.90186 154.559 10.5 155.592 11.6963C156.634 12.8844 157.155 14.4958 157.155 16.5303C157.155 17.5557 157.012 18.4915 156.728 19.3379C156.443 20.1842 156.052 20.8882 155.556 21.4497C155.067 22.0031 154.49 22.4344 153.822 22.7437C153.163 23.0448 152.459 23.1953 151.71 23.1953C150.018 23.1953 148.671 22.4425 147.67 20.937H147.609V23H144.801ZM147.853 16.5547C147.853 17.7103 148.134 18.6665 148.695 19.4233C149.257 20.1802 150.022 20.5586 150.99 20.5586C151.942 20.5586 152.691 20.1802 153.236 19.4233C153.782 18.6665 154.054 17.7103 154.054 16.5547C154.054 15.4154 153.778 14.4714 153.224 13.7227C152.679 12.9658 151.934 12.5874 150.99 12.5874C150.022 12.5874 149.257 12.9618 148.695 13.7104C148.134 14.4591 147.853 15.4072 147.853 16.5547Z" fill="#13152D"/>
|
11 |
+
<path d="M164.406 23.2441C162.892 23.2441 161.618 22.8332 160.585 22.0112C159.551 21.1893 159.002 20.1924 158.937 19.0205L161.684 18.6299C161.798 19.3542 162.115 19.9279 162.636 20.3511C163.157 20.7743 163.779 20.9858 164.503 20.9858C165.138 20.9858 165.643 20.8312 166.017 20.522C166.391 20.2127 166.579 19.8262 166.579 19.3623C166.579 18.5078 166.029 17.9788 164.931 17.7754L162.794 17.3481C161.688 17.1366 160.825 16.7337 160.207 16.1396C159.596 15.5374 159.291 14.7643 159.291 13.8203C159.291 12.7217 159.787 11.7939 160.78 11.0371C161.781 10.2803 162.986 9.90186 164.394 9.90186C165.753 9.90186 166.92 10.2681 167.897 11.0005C168.882 11.7329 169.427 12.7054 169.533 13.918L166.884 14.394C166.811 13.7267 166.534 13.1815 166.054 12.7583C165.582 12.327 165 12.1113 164.308 12.1113C163.69 12.1113 163.193 12.266 162.819 12.5752C162.444 12.8844 162.257 13.2507 162.257 13.6738C162.257 14.0726 162.388 14.39 162.648 14.626C162.908 14.862 163.336 15.0329 163.93 15.1387L166.273 15.5659C167.315 15.7531 168.129 16.1396 168.715 16.7256C169.309 17.3034 169.606 18.0887 169.606 19.0815C169.606 20.2778 169.134 21.2707 168.19 22.0601C167.246 22.8494 165.985 23.2441 164.406 23.2441Z" fill="#13152D"/>
|
12 |
+
<path d="M27.4657 28H0.509524C0.163192 28 -0.0869367 27.642 0.0285074 27.304L6.41641 12.3295C6.53186 11.9716 6.97439 11.8523 7.24376 12.1108L13.3623 20.2642C13.6894 20.5824 14.2089 20.5824 14.5552 20.2642L20.77 12.1108C21.0393 11.8523 21.4819 11.9716 21.5973 12.3295L27.9852 27.3239C28.0622 27.642 27.8313 28 27.4657 28Z" fill="#00BEFF"/>
|
13 |
+
<path d="M14.7092 15.9688C14.3051 16.3665 13.6702 16.3665 13.2661 15.9688L7.12833 7.77557C6.99365 7.63636 6.91669 7.45739 6.91669 7.25852V0.894886C6.91669 0.397727 7.3015 0 7.78252 0H20.1928C20.6738 0 21.0778 0.397727 21.0778 0.914773V7.25852C21.0778 7.45739 21.0009 7.63636 20.8662 7.77557L14.7092 15.9688Z" fill="#00BEFF"/>
|
14 |
+
</svg>
|
|
|
|
|
|
|
|
|
|
assets/images/welcome/icon-github.png
DELETED
Binary file
|
assets/images/welcome/icon-instagram.png
DELETED
Binary file
|
assets/images/welcome/icon-linkedin.png
DELETED
Binary file
|
assets/images/welcome/icon-twitter.png
DELETED
Binary file
|
assets/images/welcome/stars.png
DELETED
Binary file
|
assets/images/welcome/what-is-new/coupon-code.png
DELETED
Binary file
|
assets/images/welcome/what-is-new/wp-telegram-channels.png
DELETED
Binary file
|
assets/images/welcome/what-is-new/wp-telegram-chatbox.gif
DELETED
Binary file
|
assets/images/welcome/what-is-new/wp-telegram-iphone-2.png
DELETED
Binary file
|
assets/images/welcome/what-is-new/wp-telegram-send.png
DELETED
Binary file
|
assets/images/welcome/what-is-new/wp-telegram-settings.png
DELETED
Binary file
|
includes/admin/meta-box/wp-statistics-meta-box-browsers.php
CHANGED
@@ -130,8 +130,10 @@ class browsers
|
|
130 |
$lists_keys[] = strtolower($args['browser']);
|
131 |
$lists_logo[] = UserAgent::getBrowserLogo($args['browser']);
|
132 |
|
|
|
|
|
133 |
// Get List Of Version From Custom Browser
|
134 |
-
$list = $wpdb->get_results(
|
135 |
|
136 |
// Sort By Count
|
137 |
Helper::SortByKeyValue($list, 'count');
|
130 |
$lists_keys[] = strtolower($args['browser']);
|
131 |
$lists_logo[] = UserAgent::getBrowserLogo($args['browser']);
|
132 |
|
133 |
+
$sql = $wpdb->prepare("SELECT version, COUNT(*) as count FROM " . DB::table('visitor') . " WHERE agent = %s AND `last_counter` BETWEEN '" . reset($days_time_list) . "' AND '" . end($days_time_list) . "' GROUP BY version", $args['browser']);
|
134 |
+
|
135 |
// Get List Of Version From Custom Browser
|
136 |
+
$list = $wpdb->get_results($sql, ARRAY_A);
|
137 |
|
138 |
// Sort By Count
|
139 |
Helper::SortByKeyValue($list, 'count');
|
includes/admin/meta-box/wp-statistics-meta-box-devices.php
CHANGED
@@ -69,8 +69,15 @@ class devices
|
|
69 |
$total = $count = 0;
|
70 |
$lists_value = $lists_name = array();
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
// Get List All Platforms
|
73 |
-
$list = $wpdb->get_results(
|
74 |
|
75 |
// Sort By Count
|
76 |
Helper::SortByKeyValue($list, 'count');
|
@@ -103,17 +110,17 @@ class devices
|
|
103 |
|
104 |
// Prepare Response
|
105 |
$response = array(
|
106 |
-
'days'
|
107 |
-
'from'
|
108 |
-
'to'
|
109 |
-
'type'
|
110 |
-
'title'
|
111 |
'device_name' => $lists_name,
|
112 |
'device_value' => $lists_value,
|
113 |
-
'info'
|
114 |
'visitor_page' => Menus::admin_url('visitors')
|
115 |
),
|
116 |
-
'total'
|
117 |
);
|
118 |
|
119 |
// Check For No Data Meta Box
|
69 |
$total = $count = 0;
|
70 |
$lists_value = $lists_name = array();
|
71 |
|
72 |
+
$order_by = '';
|
73 |
+
if ($args['order'] and in_array($args['order'], array('DESC', 'ASC', 'desc', 'asc'))) {
|
74 |
+
$order_by = "ORDER BY `count` " . esc_sql($args['order']);
|
75 |
+
}
|
76 |
+
|
77 |
+
$sql = $wpdb->prepare("SELECT device, COUNT(*) as count FROM " . DB::table('visitor') . " WHERE device != '" . _x('Unknown', 'Device', 'wp-statistics') . "' AND `last_counter` BETWEEN %s AND %s GROUP BY device {$order_by}", reset($days_time_list), end($days_time_list));
|
78 |
+
|
79 |
// Get List All Platforms
|
80 |
+
$list = $wpdb->get_results($sql, ARRAY_A);
|
81 |
|
82 |
// Sort By Count
|
83 |
Helper::SortByKeyValue($list, 'count');
|
110 |
|
111 |
// Prepare Response
|
112 |
$response = array(
|
113 |
+
'days' => $count_day,
|
114 |
+
'from' => reset($days_time_list),
|
115 |
+
'to' => end($days_time_list),
|
116 |
+
'type' => (($args['from'] != "" and $args['to'] != "") ? 'between' : 'ago'),
|
117 |
+
'title' => $title,
|
118 |
'device_name' => $lists_name,
|
119 |
'device_value' => $lists_value,
|
120 |
+
'info' => array(
|
121 |
'visitor_page' => Menus::admin_url('visitors')
|
122 |
),
|
123 |
+
'total' => $total
|
124 |
);
|
125 |
|
126 |
// Check For No Data Meta Box
|
includes/admin/meta-box/wp-statistics-meta-box-models.php
CHANGED
@@ -69,8 +69,15 @@ class models
|
|
69 |
$total = $count = 0;
|
70 |
$lists_value = $lists_name = array();
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
// Get List All Platforms
|
73 |
-
$list = $wpdb->get_results(
|
74 |
|
75 |
// Sort By Count
|
76 |
Helper::SortByKeyValue($list, 'count');
|
@@ -103,17 +110,17 @@ class models
|
|
103 |
|
104 |
// Prepare Response
|
105 |
$response = array(
|
106 |
-
'days'
|
107 |
-
'from'
|
108 |
-
'to'
|
109 |
-
'type'
|
110 |
-
'title'
|
111 |
'model_name' => $lists_name,
|
112 |
'model_value' => $lists_value,
|
113 |
-
'info'
|
114 |
'visitor_page' => Menus::admin_url('visitors')
|
115 |
),
|
116 |
-
'total'
|
117 |
);
|
118 |
|
119 |
// Check For No Data Meta Box
|
69 |
$total = $count = 0;
|
70 |
$lists_value = $lists_name = array();
|
71 |
|
72 |
+
$order_by = '';
|
73 |
+
if ($args['order'] and in_array($args['order'], array('DESC', 'ASC', 'desc', 'asc'))) {
|
74 |
+
$order_by = "ORDER BY `count` " . esc_sql($args['order']);
|
75 |
+
}
|
76 |
+
|
77 |
+
$sql = $wpdb->prepare("SELECT model, COUNT(*) as count FROM " . DB::table('visitor') . " WHERE model != '" . _x('Unknown', 'Model', 'wp-statistics') . "' AND `last_counter` BETWEEN %s AND %s GROUP BY model {$order_by}", reset($days_time_list), end($days_time_list));
|
78 |
+
|
79 |
// Get List All Platforms
|
80 |
+
$list = $wpdb->get_results($sql, ARRAY_A);
|
81 |
|
82 |
// Sort By Count
|
83 |
Helper::SortByKeyValue($list, 'count');
|
110 |
|
111 |
// Prepare Response
|
112 |
$response = array(
|
113 |
+
'days' => $count_day,
|
114 |
+
'from' => reset($days_time_list),
|
115 |
+
'to' => end($days_time_list),
|
116 |
+
'type' => (($args['from'] != "" and $args['to'] != "") ? 'between' : 'ago'),
|
117 |
+
'title' => $title,
|
118 |
'model_name' => $lists_name,
|
119 |
'model_value' => $lists_value,
|
120 |
+
'info' => array(
|
121 |
'visitor_page' => Menus::admin_url('visitors')
|
122 |
),
|
123 |
+
'total' => $total
|
124 |
);
|
125 |
|
126 |
// Check For No Data Meta Box
|
includes/admin/meta-box/wp-statistics-meta-box-platforms.php
CHANGED
@@ -69,8 +69,15 @@ class platforms
|
|
69 |
$total = $count = 0;
|
70 |
$lists_value = $lists_name = array();
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
// Get List All Platforms
|
73 |
-
$list = $wpdb->get_results(
|
74 |
|
75 |
// Sort By Count
|
76 |
Helper::SortByKeyValue($list, 'count');
|
69 |
$total = $count = 0;
|
70 |
$lists_value = $lists_name = array();
|
71 |
|
72 |
+
$order_by = '';
|
73 |
+
if ($args['order'] and in_array($args['order'], array('DESC', 'ASC', 'desc', 'asc'))) {
|
74 |
+
$order_by = "ORDER BY `count` " . esc_sql($args['order']);
|
75 |
+
}
|
76 |
+
|
77 |
+
$sql = $wpdb->prepare("SELECT platform, COUNT(*) as count FROM " . DB::table('visitor') . " WHERE platform != '" . _x('Unknown', 'Platform', 'wp-statistics') . "' AND `last_counter` BETWEEN %s AND %s GROUP BY platform {$order_by}", reset($days_time_list), end($days_time_list));
|
78 |
+
|
79 |
// Get List All Platforms
|
80 |
+
$list = $wpdb->get_results($sql, ARRAY_A);
|
81 |
|
82 |
// Sort By Count
|
83 |
Helper::SortByKeyValue($list, 'count');
|
includes/admin/templates/meta-box/about.php
CHANGED
@@ -18,7 +18,7 @@ if ($aboutWidgetContent) {
|
|
18 |
<a href="https://wp-statistics.com/add-ons/" target="_blank"><?php _e('Add-Ons', 'wp-statistics'); ?></a> |
|
19 |
<a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank"><?php _e('Rate & Review', 'wp-statistics'); ?></a>
|
20 |
<div class="wps-postbox-veronalabs">
|
21 |
-
<a href="https://veronalabs.com/?utm_source=wp_statistics&utm_medium=display&utm_campaign=wordpress" target="_blank" title="<?php _e('Power by VeronaLabs', 'wp-statistics'); ?>"><img src="<?php echo esc_url(WP_STATISTICS_URL); ?>assets/images/veronalabs.svg" alt="VeronaLabs" style="width:
|
22 |
</div>
|
23 |
</div>
|
24 |
</td>
|
18 |
<a href="https://wp-statistics.com/add-ons/" target="_blank"><?php _e('Add-Ons', 'wp-statistics'); ?></a> |
|
19 |
<a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank"><?php _e('Rate & Review', 'wp-statistics'); ?></a>
|
20 |
<div class="wps-postbox-veronalabs">
|
21 |
+
<a href="https://veronalabs.com/?utm_source=wp_statistics&utm_medium=display&utm_campaign=wordpress" target="_blank" title="<?php _e('Power by VeronaLabs', 'wp-statistics'); ?>"><img src="<?php echo esc_url(WP_STATISTICS_URL); ?>assets/images/veronalabs.svg" alt="VeronaLabs" style="width: 100px;"/></a>
|
22 |
</div>
|
23 |
</div>
|
24 |
</td>
|
includes/admin/templates/settings/general.php
CHANGED
@@ -109,16 +109,6 @@
|
|
109 |
<p class="description"><?php _e('Enable this option to show the list of user visits, link in the WordPress admin user list page.', 'wp-statistics'); ?></p>
|
110 |
</td>
|
111 |
</tr>
|
112 |
-
|
113 |
-
<tr valign="top" data-view="visitors_log_tr" <?php echo(WP_STATISTICS\Option::get('visitors') == false ? 'style="display:none;"' : '') ?>>
|
114 |
-
<th scope="row">
|
115 |
-
<label for="coefficient"><?php _e('Coefficient per Visitor:', 'wp-statistics'); ?></label>
|
116 |
-
</th>
|
117 |
-
<td>
|
118 |
-
<input type="text" class="small-text code" id="coefficient" name="wps_coefficient" value="<?php echo esc_attr(WP_STATISTICS\Option::get('coefficient')); ?>"/>
|
119 |
-
<p class="description"><?php echo sprintf(__('This feature multiplies the number of each visitor. Currently %s.', 'wp-statistics'), WP_STATISTICS\Option::get('coefficient')); ?></p>
|
120 |
-
</td>
|
121 |
-
</tr>
|
122 |
</tbody>
|
123 |
</table>
|
124 |
</div>
|
109 |
<p class="description"><?php _e('Enable this option to show the list of user visits, link in the WordPress admin user list page.', 'wp-statistics'); ?></p>
|
110 |
</td>
|
111 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
</tbody>
|
113 |
</table>
|
114 |
</div>
|
includes/api/v2/class-wp-statistics-api-hit.php
CHANGED
@@ -35,14 +35,8 @@ class Hit extends \WP_STATISTICS\RestAPI
|
|
35 |
public static function require_params_hit()
|
36 |
{
|
37 |
return array(
|
38 |
-
'browser' => array('required' => true, 'type' => 'string'),
|
39 |
-
'platform' => array('required' => true, 'type' => 'string'),
|
40 |
-
'version' => array('required' => true, 'type' => 'string'),
|
41 |
-
'ip' => array('required' => true, 'type' => 'string', 'format' => 'ip'),
|
42 |
'track_all' => array('required' => true, 'type' => 'integer'),
|
43 |
-
'timestamp' => array('required' => true, 'type' => 'integer'),
|
44 |
'page_uri' => array('required' => true, 'type' => 'string'),
|
45 |
-
'user_id' => array('required' => true, 'type' => 'integer'),
|
46 |
'_wpnonce' => array('required' => false, 'type' => 'string')
|
47 |
);
|
48 |
}
|
35 |
public static function require_params_hit()
|
36 |
{
|
37 |
return array(
|
|
|
|
|
|
|
|
|
38 |
'track_all' => array('required' => true, 'type' => 'integer'),
|
|
|
39 |
'page_uri' => array('required' => true, 'type' => 'string'),
|
|
|
40 |
'_wpnonce' => array('required' => false, 'type' => 'string')
|
41 |
);
|
42 |
}
|
includes/api/v2/class-wp-statistics-api-meta-box.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace WP_STATISTICS\Api\v2;
|
4 |
|
|
|
|
|
5 |
class Meta_Box extends \WP_STATISTICS\RestAPI
|
6 |
{
|
7 |
/**
|
@@ -37,7 +39,14 @@ class Meta_Box extends \WP_STATISTICS\RestAPI
|
|
37 |
)
|
38 |
),
|
39 |
'permission_callback' => function (\WP_REST_Request $request) {
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
)
|
43 |
));
|
@@ -52,12 +61,6 @@ class Meta_Box extends \WP_STATISTICS\RestAPI
|
|
52 |
*/
|
53 |
public function meta_box_callback(\WP_REST_Request $request)
|
54 |
{
|
55 |
-
// Check User Auth
|
56 |
-
$user = wp_get_current_user();
|
57 |
-
if ($user->ID == 0) {
|
58 |
-
return new \WP_REST_Response(array('code' => 'user_auth', 'message' => __('You do not have enough access privileges for checking out information. Please check the accessibility of the information display in the settings section of WP-Statistics.', 'wp-statistics')), 400);
|
59 |
-
}
|
60 |
-
|
61 |
// Check Exist MetaBox Name
|
62 |
if (in_array($request->get_param('name'), array_keys(\WP_STATISTICS\Meta_Box::getList())) and \WP_STATISTICS\Meta_Box::IsExistMetaBoxClass($request->get_param('name'))) {
|
63 |
$class = \WP_STATISTICS\Meta_Box::getMetaBoxClass($request->get_param('name'));
|
2 |
|
3 |
namespace WP_STATISTICS\Api\v2;
|
4 |
|
5 |
+
use WP_STATISTICS\Option;
|
6 |
+
|
7 |
class Meta_Box extends \WP_STATISTICS\RestAPI
|
8 |
{
|
9 |
/**
|
39 |
)
|
40 |
),
|
41 |
'permission_callback' => function (\WP_REST_Request $request) {
|
42 |
+
|
43 |
+
// Check User Auth
|
44 |
+
$user = wp_get_current_user();
|
45 |
+
if ($user->ID == 0) {
|
46 |
+
return false;
|
47 |
+
}
|
48 |
+
|
49 |
+
return current_user_can(Option::get('read_capability', 'manage_options'));
|
50 |
}
|
51 |
)
|
52 |
));
|
61 |
*/
|
62 |
public function meta_box_callback(\WP_REST_Request $request)
|
63 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
// Check Exist MetaBox Name
|
65 |
if (in_array($request->get_param('name'), array_keys(\WP_STATISTICS\Meta_Box::getList())) and \WP_STATISTICS\Meta_Box::IsExistMetaBoxClass($request->get_param('name'))) {
|
66 |
$class = \WP_STATISTICS\Meta_Box::getMetaBoxClass($request->get_param('name'));
|
includes/class-wp-statistics-country.php
CHANGED
@@ -84,11 +84,12 @@ class Country
|
|
84 |
// Check Custom Date
|
85 |
$where = '';
|
86 |
if (isset($args['from']) and isset($args['to'])) {
|
87 |
-
$where = "WHERE `last_counter` BETWEEN
|
88 |
}
|
89 |
|
90 |
// Get Result
|
91 |
$result = $wpdb->get_results("SELECT `location`, COUNT(`location`) AS `count` FROM `" . DB::table('visitor') . "` " . $where . " GROUP BY `location` ORDER BY `count` DESC " . ((isset($args['limit']) and $args['limit'] > 0) ? "LIMIT " . $args['limit'] : ''));
|
|
|
92 |
foreach ($result as $item) {
|
93 |
$item->location = strtoupper($item->location);
|
94 |
$list[] = array(
|
84 |
// Check Custom Date
|
85 |
$where = '';
|
86 |
if (isset($args['from']) and isset($args['to'])) {
|
87 |
+
$where = $wpdb->prepare("WHERE `last_counter` BETWEEN %s AND %s", $args['from'], $args['to']);
|
88 |
}
|
89 |
|
90 |
// Get Result
|
91 |
$result = $wpdb->get_results("SELECT `location`, COUNT(`location`) AS `count` FROM `" . DB::table('visitor') . "` " . $where . " GROUP BY `location` ORDER BY `count` DESC " . ((isset($args['limit']) and $args['limit'] > 0) ? "LIMIT " . $args['limit'] : ''));
|
92 |
+
|
93 |
foreach ($result as $item) {
|
94 |
$item->location = strtoupper($item->location);
|
95 |
$list[] = array(
|
includes/class-wp-statistics-frontend.php
CHANGED
@@ -31,11 +31,13 @@ class Frontend
|
|
31 |
}
|
32 |
|
33 |
/*
|
34 |
-
* Create Comment support Wappalyzer
|
35 |
*/
|
36 |
public function html_comment()
|
37 |
{
|
38 |
-
|
|
|
|
|
39 |
}
|
40 |
|
41 |
/**
|
@@ -68,7 +70,7 @@ class Frontend
|
|
68 |
{
|
69 |
if (Option::get('use_cache_plugin')) {
|
70 |
|
71 |
-
//
|
72 |
$this->html_comment();
|
73 |
|
74 |
// Prepare Params
|
31 |
}
|
32 |
|
33 |
/*
|
34 |
+
* Create HTML Comment support Wappalyzer
|
35 |
*/
|
36 |
public function html_comment()
|
37 |
{
|
38 |
+
if (apply_filters('wp_statistics_html_comment', true)) {
|
39 |
+
echo '<!-- Analytics by WP Statistics v' . WP_STATISTICS_VERSION . ' - ' . WP_STATISTICS_SITE . ' -->' . "\n";
|
40 |
+
}
|
41 |
}
|
42 |
|
43 |
/**
|
70 |
{
|
71 |
if (Option::get('use_cache_plugin')) {
|
72 |
|
73 |
+
// WP Statistics HTML comment
|
74 |
$this->html_comment();
|
75 |
|
76 |
// Prepare Params
|
includes/class-wp-statistics-helper.php
CHANGED
@@ -1098,29 +1098,17 @@ class Helper
|
|
1098 |
// Create Empty Params Object
|
1099 |
$params = array();
|
1100 |
|
1101 |
-
//Set UserAgent [browser|platform|version]
|
1102 |
-
$params = wp_parse_args($params, UserAgent::getUserAgent());
|
1103 |
-
|
1104 |
//Set Referred
|
1105 |
$params['referred'] = urlencode(Referred::get());
|
1106 |
|
1107 |
-
//Set IP
|
1108 |
-
$params['ip'] = esc_html(IP::getIP());
|
1109 |
-
|
1110 |
//exclude
|
1111 |
$exclude = Exclusion::check();
|
1112 |
$params['exclusion_match'] = ($exclude['exclusion_match'] === true ? 'yes' : 'no');
|
1113 |
$params['exclusion_reason'] = (string)$exclude['exclusion_reason'];
|
1114 |
|
1115 |
-
//User Agent String
|
1116 |
-
$params['ua'] = urlencode(esc_html(UserAgent::getHttpUserAgent()));
|
1117 |
-
|
1118 |
//track all page
|
1119 |
$params['track_all'] = (Pages::is_track_all_page() === true ? 1 : 0);
|
1120 |
|
1121 |
-
//timestamp
|
1122 |
-
$params['timestamp'] = TimeZone::getCurrentTimestamp();
|
1123 |
-
|
1124 |
//Set Page Type
|
1125 |
$get_page_type = Pages::get_page_type();
|
1126 |
$params['current_page_type'] = $get_page_type['type'];
|
@@ -1130,9 +1118,6 @@ class Helper
|
|
1130 |
//page url
|
1131 |
$params['page_uri'] = Pages::get_page_uri();
|
1132 |
|
1133 |
-
//Get User id
|
1134 |
-
$params['user_id'] = User::get_user_id();
|
1135 |
-
|
1136 |
//return Json Data
|
1137 |
return $params;
|
1138 |
}
|
1098 |
// Create Empty Params Object
|
1099 |
$params = array();
|
1100 |
|
|
|
|
|
|
|
1101 |
//Set Referred
|
1102 |
$params['referred'] = urlencode(Referred::get());
|
1103 |
|
|
|
|
|
|
|
1104 |
//exclude
|
1105 |
$exclude = Exclusion::check();
|
1106 |
$params['exclusion_match'] = ($exclude['exclusion_match'] === true ? 'yes' : 'no');
|
1107 |
$params['exclusion_reason'] = (string)$exclude['exclusion_reason'];
|
1108 |
|
|
|
|
|
|
|
1109 |
//track all page
|
1110 |
$params['track_all'] = (Pages::is_track_all_page() === true ? 1 : 0);
|
1111 |
|
|
|
|
|
|
|
1112 |
//Set Page Type
|
1113 |
$get_page_type = Pages::get_page_type();
|
1114 |
$params['current_page_type'] = $get_page_type['type'];
|
1118 |
//page url
|
1119 |
$params['page_uri'] = Pages::get_page_uri();
|
1120 |
|
|
|
|
|
|
|
1121 |
//return Json Data
|
1122 |
return $params;
|
1123 |
}
|
includes/class-wp-statistics-hits.php
CHANGED
@@ -33,16 +33,10 @@ class Hits
|
|
33 |
$this->rest_hits = (object)self::rest_params();
|
34 |
|
35 |
# Filter Data
|
36 |
-
add_filter('wp_statistics_user_agent', array($this, 'set_user_agent'));
|
37 |
add_filter('wp_statistics_user_referer', array($this, 'set_user_referer'));
|
38 |
-
add_filter('wp_statistics_user_ip', array($this, 'set_user_ip'));
|
39 |
-
add_filter('wp_statistics_hash_ip', array($this, 'set_hash_ip'));
|
40 |
add_filter('wp_statistics_exclusion', array($this, 'set_exclusion'));
|
41 |
-
add_filter('wp_statistics_user_http_agent', array($this, 'set_user_http_agent'));
|
42 |
-
add_filter('wp_statistics_current_timestamp', array($this, 'set_current_timestamp'));
|
43 |
add_filter('wp_statistics_current_page', array($this, 'set_current_page'));
|
44 |
add_filter('wp_statistics_page_uri', array($this, 'set_page_uri'));
|
45 |
-
add_filter('wp_statistics_user_id', array($this, 'set_user_id'));
|
46 |
add_filter('wp_statistics_track_all_pages', array($this, 'set_track_all'));
|
47 |
}
|
48 |
|
@@ -55,28 +49,6 @@ class Hits
|
|
55 |
add_action('wp', array($this, 'record_wp_hits'));
|
56 |
}
|
57 |
|
58 |
-
/**
|
59 |
-
* Set User Agent
|
60 |
-
*
|
61 |
-
* @param $agent
|
62 |
-
* @return array
|
63 |
-
*/
|
64 |
-
public function set_user_agent($agent)
|
65 |
-
{
|
66 |
-
|
67 |
-
if (isset($this->rest_hits->browser, $this->rest_hits->platform, $this->rest_hits->version, $this->rest_hits->device, $this->rest_hits->model)) {
|
68 |
-
return array(
|
69 |
-
'browser' => esc_sql(sanitize_text_field($this->rest_hits->browser)),
|
70 |
-
'platform' => esc_sql(sanitize_text_field($this->rest_hits->platform)),
|
71 |
-
'version' => esc_sql(sanitize_text_field($this->rest_hits->version)),
|
72 |
-
'device' => esc_sql(sanitize_text_field($this->rest_hits->device)),
|
73 |
-
'model' => esc_sql(sanitize_text_field($this->rest_hits->model)),
|
74 |
-
);
|
75 |
-
}
|
76 |
-
|
77 |
-
return $agent;
|
78 |
-
}
|
79 |
-
|
80 |
/**
|
81 |
* Set User Referer
|
82 |
*
|
@@ -88,33 +60,6 @@ class Hits
|
|
88 |
return isset($this->rest_hits->referred) ? $this->rest_hits->referred : $referred;
|
89 |
}
|
90 |
|
91 |
-
/**
|
92 |
-
* Set User IP
|
93 |
-
*
|
94 |
-
* @param $ip
|
95 |
-
* @return string
|
96 |
-
*/
|
97 |
-
public function set_user_ip($ip)
|
98 |
-
{
|
99 |
-
return isset($this->rest_hits->ip) ? esc_sql($this->rest_hits->ip) : esc_sql($ip);
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Set Hash IP
|
104 |
-
*
|
105 |
-
* @param $hash_ip
|
106 |
-
* @return mixed
|
107 |
-
*/
|
108 |
-
public function set_hash_ip($hash_ip)
|
109 |
-
{
|
110 |
-
if (isset($this->rest_hits->ua) and trim($this->rest_hits->ua) != "") {
|
111 |
-
$key = $this->rest_hits->ua;
|
112 |
-
} else {
|
113 |
-
$key = 'Unknown';
|
114 |
-
}
|
115 |
-
return $hash_ip = '#hash#' . sha1($this->rest_hits->ip . $key);
|
116 |
-
}
|
117 |
-
|
118 |
/**
|
119 |
* Set Exclusion
|
120 |
*
|
@@ -134,28 +79,6 @@ class Hits
|
|
134 |
return $exclude;
|
135 |
}
|
136 |
|
137 |
-
/**
|
138 |
-
* Set User Http Agent
|
139 |
-
*
|
140 |
-
* @param $http_agent
|
141 |
-
* @return string
|
142 |
-
*/
|
143 |
-
public function set_user_http_agent($http_agent)
|
144 |
-
{
|
145 |
-
return isset($this->rest_hits->ua) ? $this->rest_hits->ua : $http_agent;
|
146 |
-
}
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Set Current timeStamp
|
150 |
-
*
|
151 |
-
* @param $timestamp
|
152 |
-
* @return mixed
|
153 |
-
*/
|
154 |
-
public function set_current_timestamp($timestamp)
|
155 |
-
{
|
156 |
-
return isset($this->rest_hits->timestamp) ? $this->rest_hits->timestamp : $timestamp;
|
157 |
-
}
|
158 |
-
|
159 |
/**
|
160 |
* Set is track All Pages
|
161 |
*
|
@@ -202,17 +125,6 @@ class Hits
|
|
202 |
return isset($this->rest_hits->page_uri) ? $this->rest_hits->page_uri : $page_uri;
|
203 |
}
|
204 |
|
205 |
-
/**
|
206 |
-
* Set Current User ID
|
207 |
-
*
|
208 |
-
* @param $user_id
|
209 |
-
* @return int
|
210 |
-
*/
|
211 |
-
public function set_user_id($user_id)
|
212 |
-
{
|
213 |
-
return isset($this->rest_hits->user_id) ? $this->rest_hits->user_id : $user_id;
|
214 |
-
}
|
215 |
-
|
216 |
/**
|
217 |
* Check If Record Hits in Rest-Api Request
|
218 |
*
|
33 |
$this->rest_hits = (object)self::rest_params();
|
34 |
|
35 |
# Filter Data
|
|
|
36 |
add_filter('wp_statistics_user_referer', array($this, 'set_user_referer'));
|
|
|
|
|
37 |
add_filter('wp_statistics_exclusion', array($this, 'set_exclusion'));
|
|
|
|
|
38 |
add_filter('wp_statistics_current_page', array($this, 'set_current_page'));
|
39 |
add_filter('wp_statistics_page_uri', array($this, 'set_page_uri'));
|
|
|
40 |
add_filter('wp_statistics_track_all_pages', array($this, 'set_track_all'));
|
41 |
}
|
42 |
|
49 |
add_action('wp', array($this, 'record_wp_hits'));
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
/**
|
53 |
* Set User Referer
|
54 |
*
|
60 |
return isset($this->rest_hits->referred) ? $this->rest_hits->referred : $referred;
|
61 |
}
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
/**
|
64 |
* Set Exclusion
|
65 |
*
|
79 |
return $exclude;
|
80 |
}
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
/**
|
83 |
* Set is track All Pages
|
84 |
*
|
125 |
return isset($this->rest_hits->page_uri) ? $this->rest_hits->page_uri : $page_uri;
|
126 |
}
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
/**
|
129 |
* Check If Record Hits in Rest-Api Request
|
130 |
*
|
includes/class-wp-statistics-option.php
CHANGED
@@ -47,7 +47,7 @@ class Option
|
|
47 |
'pages' => true,
|
48 |
'check_online' => UserOnline::$reset_user_time,
|
49 |
'menu_bar' => false,
|
50 |
-
'coefficient' => Visitor
|
51 |
'stats_report' => false,
|
52 |
'time_report' => 'daily',
|
53 |
'send_report' => 'mail',
|
47 |
'pages' => true,
|
48 |
'check_online' => UserOnline::$reset_user_time,
|
49 |
'menu_bar' => false,
|
50 |
+
'coefficient' => Visitor::getCoefficient(),
|
51 |
'stats_report' => false,
|
52 |
'time_report' => 'daily',
|
53 |
'send_report' => 'mail',
|
includes/class-wp-statistics-pages.php
CHANGED
@@ -395,7 +395,7 @@ class Pages
|
|
395 |
// Date Time SQL
|
396 |
$DateTimeSql = "";
|
397 |
if (!empty($args['from']) and !empty($args['to'])) {
|
398 |
-
$DateTimeSql = "WHERE (`pages`.`date` BETWEEN
|
399 |
}
|
400 |
|
401 |
// Generate SQL
|
395 |
// Date Time SQL
|
396 |
$DateTimeSql = "";
|
397 |
if (!empty($args['from']) and !empty($args['to'])) {
|
398 |
+
$DateTimeSql = $wpdb->prepare("WHERE (`pages`.`date` BETWEEN %s AND %s)", $args['from'], $args['to']);
|
399 |
}
|
400 |
|
401 |
// Generate SQL
|
includes/class-wp-statistics-referred.php
CHANGED
@@ -246,7 +246,9 @@ class Referred
|
|
246 |
//Get Top Referring
|
247 |
if (false === ($get_urls = get_transient(self::$top_referring_transient))) {
|
248 |
|
249 |
-
$
|
|
|
|
|
250 |
foreach ($result as $items) {
|
251 |
$get_urls[$items->domain] = self::get_referer_from_domain($items->domain);
|
252 |
}
|
246 |
//Get Top Referring
|
247 |
if (false === ($get_urls = get_transient(self::$top_referring_transient))) {
|
248 |
|
249 |
+
$sql = $wpdb->prepare("ORDER BY `number` DESC LIMIT %d", $number);
|
250 |
+
|
251 |
+
$result = $wpdb->get_results(self::GenerateReferSQL($sql, ''));
|
252 |
foreach ($result as $items) {
|
253 |
$get_urls[$items->domain] = self::get_referer_from_domain($items->domain);
|
254 |
}
|
includes/class-wp-statistics-user-agent.php
CHANGED
@@ -97,8 +97,8 @@ class UserAgent
|
|
97 |
|
98 |
public static function getBrowserInfo($userAgent = null)
|
99 |
{
|
100 |
-
$version
|
101 |
-
$model
|
102 |
|
103 |
if (preg_match('/linux|ubuntu/i', $userAgent)) {
|
104 |
$platform = 'linux';
|
97 |
|
98 |
public static function getBrowserInfo($userAgent = null)
|
99 |
{
|
100 |
+
$version = '';
|
101 |
+
$model = _x('Unknown', 'Device Model', 'wp-statistics');
|
102 |
|
103 |
if (preg_match('/linux|ubuntu/i', $userAgent)) {
|
104 |
$platform = 'linux';
|
includes/class-wp-statistics-user-online.php
CHANGED
@@ -52,7 +52,7 @@ class UserOnline
|
|
52 |
{
|
53 |
global $wpdb;
|
54 |
|
55 |
-
//Check User Online is Active in this
|
56 |
if (self::active()) {
|
57 |
|
58 |
//Get Not timestamp
|
@@ -231,7 +231,8 @@ class UserOnline
|
|
231 |
$args = wp_parse_args($arg, $defaults);
|
232 |
|
233 |
// Prepare SQL
|
234 |
-
$
|
|
|
235 |
|
236 |
// Check Fields
|
237 |
if ($args['fields'] == "count") {
|
@@ -254,7 +255,7 @@ class UserOnline
|
|
254 |
}
|
255 |
|
256 |
// Set Pagination
|
257 |
-
$args['sql'] = $args['sql'] . " LIMIT
|
258 |
|
259 |
// Send Request
|
260 |
$result = $wpdb->get_results($args['sql']);
|
52 |
{
|
53 |
global $wpdb;
|
54 |
|
55 |
+
//Check User Online is Active in this WordPress
|
56 |
if (self::active()) {
|
57 |
|
58 |
//Get Not timestamp
|
231 |
$args = wp_parse_args($arg, $defaults);
|
232 |
|
233 |
// Prepare SQL
|
234 |
+
$args['sql'] = null;
|
235 |
+
$SQL = "SELECT";
|
236 |
|
237 |
// Check Fields
|
238 |
if ($args['fields'] == "count") {
|
255 |
}
|
256 |
|
257 |
// Set Pagination
|
258 |
+
$args['sql'] = esc_sql($args['sql']) . $wpdb->prepare(" LIMIT %d, %d", $args['offset'], $args['per_page']);
|
259 |
|
260 |
// Send Request
|
261 |
$result = $wpdb->get_results($args['sql']);
|
includes/class-wp-statistics-visitor.php
CHANGED
@@ -16,8 +16,7 @@ class Visitor
|
|
16 |
*/
|
17 |
public static function getCoefficient()
|
18 |
{
|
19 |
-
|
20 |
-
return (is_numeric($coefficient) and $coefficient > 0) ? $coefficient : self::$coefficient;
|
21 |
}
|
22 |
|
23 |
/**
|
@@ -248,8 +247,10 @@ class Visitor
|
|
248 |
$args['sql'] = "SELECT * FROM `" . DB::table('visitor') . "` ORDER BY ID DESC";
|
249 |
}
|
250 |
|
|
|
|
|
251 |
// Set Pagination
|
252 |
-
$args['sql'] = $args['sql'] . " LIMIT
|
253 |
|
254 |
// Send Request
|
255 |
$result = $wpdb->get_results($args['sql']);
|
16 |
*/
|
17 |
public static function getCoefficient()
|
18 |
{
|
19 |
+
return apply_filters('wp_statistics_coefficient_per_visitor', self::$coefficient);
|
|
|
20 |
}
|
21 |
|
22 |
/**
|
247 |
$args['sql'] = "SELECT * FROM `" . DB::table('visitor') . "` ORDER BY ID DESC";
|
248 |
}
|
249 |
|
250 |
+
$limit = (($args['paged'] - 1) * $args['per_page']);
|
251 |
+
|
252 |
// Set Pagination
|
253 |
+
$args['sql'] = $args['sql'] . " LIMIT {$limit}, {$args['per_page']}";
|
254 |
|
255 |
// Send Request
|
256 |
$result = $wpdb->get_results($args['sql']);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wp-statistics.com/donate/
|
|
4 |
Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 6.0
|
7 |
-
Stable tag: 13.2.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -131,6 +131,12 @@ Before updating, make sure you disabled all your add-ons, then after that, try t
|
|
131 |
If you encounter any bug, please create an issue on [GitHub](https://github.com/wp-statistics/wp-statistics/issues/new) where we can act upon them more efficiently. Since [GitHub](https://github.com/wp-statistics/wp-statistics) is not a support forum, just bugs are welcomed, and any other request will be closed.
|
132 |
|
133 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
= v13.2.5 - 27.07.2022 =
|
135 |
* Feature: Support plugin in the Privacy Policy content
|
136 |
* Feature: Support plugin in Data Privacy Exporter and Data Eraser
|
4 |
Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 6.0
|
7 |
+
Stable tag: 13.2.6
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
131 |
If you encounter any bug, please create an issue on [GitHub](https://github.com/wp-statistics/wp-statistics/issues/new) where we can act upon them more efficiently. Since [GitHub](https://github.com/wp-statistics/wp-statistics) is not a support forum, just bugs are welcomed, and any other request will be closed.
|
132 |
|
133 |
== Changelog ==
|
134 |
+
= v13.2.6 - 07.09.2022 =
|
135 |
+
* Improvement: Compatibility with Apache `security_mode`
|
136 |
+
* Improvement: Remove coefficient per visitor field from general/visitors settings
|
137 |
+
* Improvement: Hardened plugin security and improvement
|
138 |
+
* Improvement: Avoid printing visitor data to the page while caching compatibility
|
139 |
+
|
140 |
= v13.2.5 - 27.07.2022 =
|
141 |
* Feature: Support plugin in the Privacy Policy content
|
142 |
* Feature: Support plugin in Data Privacy Exporter and Data Eraser
|
wp-statistics.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WP Statistics
|
4 |
* Plugin URI: https://wp-statistics.com/
|
5 |
* Description: This plugin gives you the complete information on your website's visitors.
|
6 |
-
* Version: 13.2.
|
7 |
* Author: VeronaLabs
|
8 |
* Author URI: https://veronalabs.com/
|
9 |
* Text Domain: wp-statistics
|
3 |
* Plugin Name: WP Statistics
|
4 |
* Plugin URI: https://wp-statistics.com/
|
5 |
* Description: This plugin gives you the complete information on your website's visitors.
|
6 |
+
* Version: 13.2.6
|
7 |
* Author: VeronaLabs
|
8 |
* Author URI: https://veronalabs.com/
|
9 |
* Text Domain: wp-statistics
|