Changeset 3444371
- Timestamp:
- 01/21/2026 07:29:15 PM (4 weeks ago)
- Location:
- wps-visitor-counter
- Files:
-
- 336 added
- 8 edited
-
tags/1.4.9 (added)
-
tags/1.4.9/counter (added)
-
tags/1.4.9/counter/30days_user.png (added)
-
tags/1.4.9/counter/30days_views.png (added)
-
tags/1.4.9/counter/7days_user.png (added)
-
tags/1.4.9/counter/7days_views.png (added)
-
tags/1.4.9/counter/fb.png (added)
-
tags/1.4.9/counter/index.html (added)
-
tags/1.4.9/counter/twitter.png (added)
-
tags/1.4.9/counter/user_month.png (added)
-
tags/1.4.9/counter/user_today.png (added)
-
tags/1.4.9/counter/user_total.png (added)
-
tags/1.4.9/counter/user_year.png (added)
-
tags/1.4.9/counter/user_yesterday.png (added)
-
tags/1.4.9/counter/views_month.png (added)
-
tags/1.4.9/counter/views_today.png (added)
-
tags/1.4.9/counter/views_total.png (added)
-
tags/1.4.9/counter/views_year.png (added)
-
tags/1.4.9/counter/views_yesterday.png (added)
-
tags/1.4.9/counter/whos_online.png (added)
-
tags/1.4.9/languages (added)
-
tags/1.4.9/languages/README.md (added)
-
tags/1.4.9/languages/messages.mo (added)
-
tags/1.4.9/languages/wps-visitor-counter-es_ES.mo (added)
-
tags/1.4.9/languages/wps-visitor-counter-es_ES.po (added)
-
tags/1.4.9/languages/wps-visitor-counter.pot (added)
-
tags/1.4.9/readme.txt (added)
-
tags/1.4.9/styles (added)
-
tags/1.4.9/styles/css (added)
-
tags/1.4.9/styles/css/default.css (added)
-
tags/1.4.9/styles/css/index.html (added)
-
tags/1.4.9/styles/image (added)
-
tags/1.4.9/styles/image/Allstar (added)
-
tags/1.4.9/styles/image/Allstar/0.gif (added)
-
tags/1.4.9/styles/image/Allstar/1.gif (added)
-
tags/1.4.9/styles/image/Allstar/11.jpg (added)
-
tags/1.4.9/styles/image/Allstar/2.gif (added)
-
tags/1.4.9/styles/image/Allstar/3.gif (added)
-
tags/1.4.9/styles/image/Allstar/4.gif (added)
-
tags/1.4.9/styles/image/Allstar/5.gif (added)
-
tags/1.4.9/styles/image/Allstar/6.gif (added)
-
tags/1.4.9/styles/image/Allstar/7.gif (added)
-
tags/1.4.9/styles/image/Allstar/8.gif (added)
-
tags/1.4.9/styles/image/Allstar/9.gif (added)
-
tags/1.4.9/styles/image/Allstar/index.html (added)
-
tags/1.4.9/styles/image/Blueberry (added)
-
tags/1.4.9/styles/image/Blueberry/0.gif (added)
-
tags/1.4.9/styles/image/Blueberry/1.gif (added)
-
tags/1.4.9/styles/image/Blueberry/11.jpg (added)
-
tags/1.4.9/styles/image/Blueberry/2.gif (added)
-
tags/1.4.9/styles/image/Blueberry/3.gif (added)
-
tags/1.4.9/styles/image/Blueberry/4.gif (added)
-
tags/1.4.9/styles/image/Blueberry/5.gif (added)
-
tags/1.4.9/styles/image/Blueberry/6.gif (added)
-
tags/1.4.9/styles/image/Blueberry/7.gif (added)
-
tags/1.4.9/styles/image/Blueberry/8.gif (added)
-
tags/1.4.9/styles/image/Blueberry/9.gif (added)
-
tags/1.4.9/styles/image/Blueberry/index.html (added)
-
tags/1.4.9/styles/image/College (added)
-
tags/1.4.9/styles/image/College/0.gif (added)
-
tags/1.4.9/styles/image/College/1.gif (added)
-
tags/1.4.9/styles/image/College/11.jpg (added)
-
tags/1.4.9/styles/image/College/2.gif (added)
-
tags/1.4.9/styles/image/College/3.gif (added)
-
tags/1.4.9/styles/image/College/4.gif (added)
-
tags/1.4.9/styles/image/College/5.gif (added)
-
tags/1.4.9/styles/image/College/6.gif (added)
-
tags/1.4.9/styles/image/College/7.gif (added)
-
tags/1.4.9/styles/image/College/8.gif (added)
-
tags/1.4.9/styles/image/College/9.gif (added)
-
tags/1.4.9/styles/image/College/index.html (added)
-
tags/1.4.9/styles/image/RomanSD (added)
-
tags/1.4.9/styles/image/RomanSD/0.gif (added)
-
tags/1.4.9/styles/image/RomanSD/1.gif (added)
-
tags/1.4.9/styles/image/RomanSD/11.jpg (added)
-
tags/1.4.9/styles/image/RomanSD/2.gif (added)
-
tags/1.4.9/styles/image/RomanSD/3.gif (added)
-
tags/1.4.9/styles/image/RomanSD/4.gif (added)
-
tags/1.4.9/styles/image/RomanSD/5.gif (added)
-
tags/1.4.9/styles/image/RomanSD/6.gif (added)
-
tags/1.4.9/styles/image/RomanSD/7.gif (added)
-
tags/1.4.9/styles/image/RomanSD/8.gif (added)
-
tags/1.4.9/styles/image/RomanSD/9.gif (added)
-
tags/1.4.9/styles/image/RomanSD/index.html (added)
-
tags/1.4.9/styles/image/Russian (added)
-
tags/1.4.9/styles/image/Russian/0.gif (added)
-
tags/1.4.9/styles/image/Russian/1.gif (added)
-
tags/1.4.9/styles/image/Russian/11.jpg (added)
-
tags/1.4.9/styles/image/Russian/2.gif (added)
-
tags/1.4.9/styles/image/Russian/3.gif (added)
-
tags/1.4.9/styles/image/Russian/4.gif (added)
-
tags/1.4.9/styles/image/Russian/5.gif (added)
-
tags/1.4.9/styles/image/Russian/6.gif (added)
-
tags/1.4.9/styles/image/Russian/7.gif (added)
-
tags/1.4.9/styles/image/Russian/8.gif (added)
-
tags/1.4.9/styles/image/Russian/9.gif (added)
-
tags/1.4.9/styles/image/Russian/index.html (added)
-
tags/1.4.9/styles/image/ScareArms (added)
-
tags/1.4.9/styles/image/ScareArms/0.gif (added)
-
tags/1.4.9/styles/image/ScareArms/1.gif (added)
-
tags/1.4.9/styles/image/ScareArms/11.jpg (added)
-
tags/1.4.9/styles/image/ScareArms/2.gif (added)
-
tags/1.4.9/styles/image/ScareArms/3.gif (added)
-
tags/1.4.9/styles/image/ScareArms/4.gif (added)
-
tags/1.4.9/styles/image/ScareArms/5.gif (added)
-
tags/1.4.9/styles/image/ScareArms/6.gif (added)
-
tags/1.4.9/styles/image/ScareArms/7.gif (added)
-
tags/1.4.9/styles/image/ScareArms/8.gif (added)
-
tags/1.4.9/styles/image/ScareArms/9.gif (added)
-
tags/1.4.9/styles/image/ScareArms/index.html (added)
-
tags/1.4.9/styles/image/TrueLies (added)
-
tags/1.4.9/styles/image/TrueLies/0.gif (added)
-
tags/1.4.9/styles/image/TrueLies/1.gif (added)
-
tags/1.4.9/styles/image/TrueLies/11.jpg (added)
-
tags/1.4.9/styles/image/TrueLies/2.gif (added)
-
tags/1.4.9/styles/image/TrueLies/3.gif (added)
-
tags/1.4.9/styles/image/TrueLies/4.gif (added)
-
tags/1.4.9/styles/image/TrueLies/5.gif (added)
-
tags/1.4.9/styles/image/TrueLies/6.gif (added)
-
tags/1.4.9/styles/image/TrueLies/7.gif (added)
-
tags/1.4.9/styles/image/TrueLies/8.gif (added)
-
tags/1.4.9/styles/image/TrueLies/9.gif (added)
-
tags/1.4.9/styles/image/TrueLies/index.html (added)
-
tags/1.4.9/styles/image/bbldotg (added)
-
tags/1.4.9/styles/image/bbldotg/0.gif (added)
-
tags/1.4.9/styles/image/bbldotg/1.gif (added)
-
tags/1.4.9/styles/image/bbldotg/11.jpg (added)
-
tags/1.4.9/styles/image/bbldotg/2.gif (added)
-
tags/1.4.9/styles/image/bbldotg/3.gif (added)
-
tags/1.4.9/styles/image/bbldotg/4.gif (added)
-
tags/1.4.9/styles/image/bbldotg/5.gif (added)
-
tags/1.4.9/styles/image/bbldotg/6.gif (added)
-
tags/1.4.9/styles/image/bbldotg/7.gif (added)
-
tags/1.4.9/styles/image/bbldotg/8.gif (added)
-
tags/1.4.9/styles/image/bbldotg/9.gif (added)
-
tags/1.4.9/styles/image/bbldotg/index.html (added)
-
tags/1.4.9/styles/image/calculator (added)
-
tags/1.4.9/styles/image/calculator/0.gif (added)
-
tags/1.4.9/styles/image/calculator/1.gif (added)
-
tags/1.4.9/styles/image/calculator/11.jpg (added)
-
tags/1.4.9/styles/image/calculator/2.gif (added)
-
tags/1.4.9/styles/image/calculator/3.gif (added)
-
tags/1.4.9/styles/image/calculator/4.gif (added)
-
tags/1.4.9/styles/image/calculator/5.gif (added)
-
tags/1.4.9/styles/image/calculator/6.gif (added)
-
tags/1.4.9/styles/image/calculator/7.gif (added)
-
tags/1.4.9/styles/image/calculator/8.gif (added)
-
tags/1.4.9/styles/image/calculator/9.gif (added)
-
tags/1.4.9/styles/image/calculator/index.html (added)
-
tags/1.4.9/styles/image/charlotte (added)
-
tags/1.4.9/styles/image/charlotte/0.gif (added)
-
tags/1.4.9/styles/image/charlotte/1.gif (added)
-
tags/1.4.9/styles/image/charlotte/11.jpg (added)
-
tags/1.4.9/styles/image/charlotte/2.gif (added)
-
tags/1.4.9/styles/image/charlotte/3.gif (added)
-
tags/1.4.9/styles/image/charlotte/4.gif (added)
-
tags/1.4.9/styles/image/charlotte/5.gif (added)
-
tags/1.4.9/styles/image/charlotte/6.gif (added)
-
tags/1.4.9/styles/image/charlotte/7.gif (added)
-
tags/1.4.9/styles/image/charlotte/8.gif (added)
-
tags/1.4.9/styles/image/charlotte/9.gif (added)
-
tags/1.4.9/styles/image/charlotte/index.html (added)
-
tags/1.4.9/styles/image/chevy (added)
-
tags/1.4.9/styles/image/chevy/0.gif (added)
-
tags/1.4.9/styles/image/chevy/1.gif (added)
-
tags/1.4.9/styles/image/chevy/11.jpg (added)
-
tags/1.4.9/styles/image/chevy/2.gif (added)
-
tags/1.4.9/styles/image/chevy/3.gif (added)
-
tags/1.4.9/styles/image/chevy/4.gif (added)
-
tags/1.4.9/styles/image/chevy/5.gif (added)
-
tags/1.4.9/styles/image/chevy/6.gif (added)
-
tags/1.4.9/styles/image/chevy/7.gif (added)
-
tags/1.4.9/styles/image/chevy/8.gif (added)
-
tags/1.4.9/styles/image/chevy/9.gif (added)
-
tags/1.4.9/styles/image/chevy/index.html (added)
-
tags/1.4.9/styles/image/cntdwn (added)
-
tags/1.4.9/styles/image/cntdwn/0.gif (added)
-
tags/1.4.9/styles/image/cntdwn/1.gif (added)
-
tags/1.4.9/styles/image/cntdwn/11.jpg (added)
-
tags/1.4.9/styles/image/cntdwn/2.gif (added)
-
tags/1.4.9/styles/image/cntdwn/3.gif (added)
-
tags/1.4.9/styles/image/cntdwn/4.gif (added)
-
tags/1.4.9/styles/image/cntdwn/5.gif (added)
-
tags/1.4.9/styles/image/cntdwn/6.gif (added)
-
tags/1.4.9/styles/image/cntdwn/7.gif (added)
-
tags/1.4.9/styles/image/cntdwn/8.gif (added)
-
tags/1.4.9/styles/image/cntdwn/9.gif (added)
-
tags/1.4.9/styles/image/cntdwn/index.html (added)
-
tags/1.4.9/styles/image/computer (added)
-
tags/1.4.9/styles/image/computer/0.gif (added)
-
tags/1.4.9/styles/image/computer/1.gif (added)
-
tags/1.4.9/styles/image/computer/11.jpg (added)
-
tags/1.4.9/styles/image/computer/2.gif (added)
-
tags/1.4.9/styles/image/computer/3.gif (added)
-
tags/1.4.9/styles/image/computer/4.gif (added)
-
tags/1.4.9/styles/image/computer/5.gif (added)
-
tags/1.4.9/styles/image/computer/6.gif (added)
-
tags/1.4.9/styles/image/computer/7.gif (added)
-
tags/1.4.9/styles/image/computer/8.gif (added)
-
tags/1.4.9/styles/image/computer/9.gif (added)
-
tags/1.4.9/styles/image/computer/index.html (added)
-
tags/1.4.9/styles/image/crochet (added)
-
tags/1.4.9/styles/image/crochet/0.gif (added)
-
tags/1.4.9/styles/image/crochet/1.gif (added)
-
tags/1.4.9/styles/image/crochet/11.jpg (added)
-
tags/1.4.9/styles/image/crochet/2.gif (added)
-
tags/1.4.9/styles/image/crochet/3.gif (added)
-
tags/1.4.9/styles/image/crochet/4.gif (added)
-
tags/1.4.9/styles/image/crochet/5.gif (added)
-
tags/1.4.9/styles/image/crochet/6.gif (added)
-
tags/1.4.9/styles/image/crochet/7.gif (added)
-
tags/1.4.9/styles/image/crochet/8.gif (added)
-
tags/1.4.9/styles/image/crochet/9.gif (added)
-
tags/1.4.9/styles/image/crochet/index.html (added)
-
tags/1.4.9/styles/image/gabriella (added)
-
tags/1.4.9/styles/image/gabriella/0.gif (added)
-
tags/1.4.9/styles/image/gabriella/1.gif (added)
-
tags/1.4.9/styles/image/gabriella/11.jpg (added)
-
tags/1.4.9/styles/image/gabriella/2.gif (added)
-
tags/1.4.9/styles/image/gabriella/3.gif (added)
-
tags/1.4.9/styles/image/gabriella/4.gif (added)
-
tags/1.4.9/styles/image/gabriella/5.gif (added)
-
tags/1.4.9/styles/image/gabriella/6.gif (added)
-
tags/1.4.9/styles/image/gabriella/7.gif (added)
-
tags/1.4.9/styles/image/gabriella/8.gif (added)
-
tags/1.4.9/styles/image/gabriella/9.gif (added)
-
tags/1.4.9/styles/image/gabriella/index.html (added)
-
tags/1.4.9/styles/image/glass (added)
-
tags/1.4.9/styles/image/glass/0.gif (added)
-
tags/1.4.9/styles/image/glass/1.gif (added)
-
tags/1.4.9/styles/image/glass/11.jpg (added)
-
tags/1.4.9/styles/image/glass/2.gif (added)
-
tags/1.4.9/styles/image/glass/3.gif (added)
-
tags/1.4.9/styles/image/glass/4.gif (added)
-
tags/1.4.9/styles/image/glass/5.gif (added)
-
tags/1.4.9/styles/image/glass/6.gif (added)
-
tags/1.4.9/styles/image/glass/7.gif (added)
-
tags/1.4.9/styles/image/glass/8.gif (added)
-
tags/1.4.9/styles/image/glass/9.gif (added)
-
tags/1.4.9/styles/image/glass/index.html (added)
-
tags/1.4.9/styles/image/grobold (added)
-
tags/1.4.9/styles/image/grobold/0.gif (added)
-
tags/1.4.9/styles/image/grobold/1.gif (added)
-
tags/1.4.9/styles/image/grobold/11.jpg (added)
-
tags/1.4.9/styles/image/grobold/2.gif (added)
-
tags/1.4.9/styles/image/grobold/3.gif (added)
-
tags/1.4.9/styles/image/grobold/4.gif (added)
-
tags/1.4.9/styles/image/grobold/5.gif (added)
-
tags/1.4.9/styles/image/grobold/6.gif (added)
-
tags/1.4.9/styles/image/grobold/7.gif (added)
-
tags/1.4.9/styles/image/grobold/8.gif (added)
-
tags/1.4.9/styles/image/grobold/9.gif (added)
-
tags/1.4.9/styles/image/grobold/index.html (added)
-
tags/1.4.9/styles/image/index.html (added)
-
tags/1.4.9/styles/image/led (added)
-
tags/1.4.9/styles/image/led/0.gif (added)
-
tags/1.4.9/styles/image/led/1.gif (added)
-
tags/1.4.9/styles/image/led/11.jpg (added)
-
tags/1.4.9/styles/image/led/2.gif (added)
-
tags/1.4.9/styles/image/led/3.gif (added)
-
tags/1.4.9/styles/image/led/4.gif (added)
-
tags/1.4.9/styles/image/led/5.gif (added)
-
tags/1.4.9/styles/image/led/6.gif (added)
-
tags/1.4.9/styles/image/led/7.gif (added)
-
tags/1.4.9/styles/image/led/8.gif (added)
-
tags/1.4.9/styles/image/led/9.gif (added)
-
tags/1.4.9/styles/image/led/index.html (added)
-
tags/1.4.9/styles/image/links (added)
-
tags/1.4.9/styles/image/links/0.gif (added)
-
tags/1.4.9/styles/image/links/1.gif (added)
-
tags/1.4.9/styles/image/links/11.jpg (added)
-
tags/1.4.9/styles/image/links/2.gif (added)
-
tags/1.4.9/styles/image/links/3.gif (added)
-
tags/1.4.9/styles/image/links/4.gif (added)
-
tags/1.4.9/styles/image/links/5.gif (added)
-
tags/1.4.9/styles/image/links/6.gif (added)
-
tags/1.4.9/styles/image/links/7.gif (added)
-
tags/1.4.9/styles/image/links/8.gif (added)
-
tags/1.4.9/styles/image/links/9.gif (added)
-
tags/1.4.9/styles/image/links/index.html (added)
-
tags/1.4.9/styles/image/marsil (added)
-
tags/1.4.9/styles/image/marsil/0.gif (added)
-
tags/1.4.9/styles/image/marsil/1.gif (added)
-
tags/1.4.9/styles/image/marsil/11.jpg (added)
-
tags/1.4.9/styles/image/marsil/2.gif (added)
-
tags/1.4.9/styles/image/marsil/3.gif (added)
-
tags/1.4.9/styles/image/marsil/4.gif (added)
-
tags/1.4.9/styles/image/marsil/5.gif (added)
-
tags/1.4.9/styles/image/marsil/6.gif (added)
-
tags/1.4.9/styles/image/marsil/7.gif (added)
-
tags/1.4.9/styles/image/marsil/8.gif (added)
-
tags/1.4.9/styles/image/marsil/9.gif (added)
-
tags/1.4.9/styles/image/marsil/index.html (added)
-
tags/1.4.9/styles/image/rhyndatton (added)
-
tags/1.4.9/styles/image/rhyndatton/0.gif (added)
-
tags/1.4.9/styles/image/rhyndatton/1.gif (added)
-
tags/1.4.9/styles/image/rhyndatton/11.jpg (added)
-
tags/1.4.9/styles/image/rhyndatton/2.gif (added)
-
tags/1.4.9/styles/image/rhyndatton/3.gif (added)
-
tags/1.4.9/styles/image/rhyndatton/4.gif (added)
-
tags/1.4.9/styles/image/rhyndatton/5.gif (added)
-
tags/1.4.9/styles/image/rhyndatton/6.gif (added)
-
tags/1.4.9/styles/image/rhyndatton/7.gif (added)
-
tags/1.4.9/styles/image/rhyndatton/8.gif (added)
-
tags/1.4.9/styles/image/rhyndatton/9.gif (added)
-
tags/1.4.9/styles/image/rhyndatton/index.html (added)
-
tags/1.4.9/styles/image/web (added)
-
tags/1.4.9/styles/image/web/0.gif (added)
-
tags/1.4.9/styles/image/web/1.gif (added)
-
tags/1.4.9/styles/image/web/11.jpg (added)
-
tags/1.4.9/styles/image/web/2.gif (added)
-
tags/1.4.9/styles/image/web/3.gif (added)
-
tags/1.4.9/styles/image/web/4.gif (added)
-
tags/1.4.9/styles/image/web/5.gif (added)
-
tags/1.4.9/styles/image/web/6.gif (added)
-
tags/1.4.9/styles/image/web/7.gif (added)
-
tags/1.4.9/styles/image/web/8.gif (added)
-
tags/1.4.9/styles/image/web/9.gif (added)
-
tags/1.4.9/styles/image/web/index.html (added)
-
tags/1.4.9/styles/index.html (added)
-
tags/1.4.9/styles/js (added)
-
tags/1.4.9/styles/js/custom.js (added)
-
tags/1.4.9/styles/js/index.html (added)
-
tags/1.4.9/wps-gutenberg-block.js (added)
-
tags/1.4.9/wps-visitor-counter-count.php (added)
-
tags/1.4.9/wps-visitor-counter-options-general.php (added)
-
tags/1.4.9/wps-visitor-counter-widgets.php (added)
-
tags/1.4.9/wps-visitor-counter.php (added)
-
tags/1.4.9/wps_visitor_counter_views.php (added)
-
tags/1.4.9/wps_wp_query.php (added)
-
trunk/languages (added)
-
trunk/languages/README.md (added)
-
trunk/languages/messages.mo (added)
-
trunk/languages/wps-visitor-counter-es_ES.mo (added)
-
trunk/languages/wps-visitor-counter-es_ES.po (added)
-
trunk/languages/wps-visitor-counter.pot (added)
-
trunk/readme.txt (modified) (8 diffs)
-
trunk/wps-gutenberg-block.js (modified) (1 diff)
-
trunk/wps-visitor-counter-count.php (modified) (2 diffs)
-
trunk/wps-visitor-counter-options-general.php (modified) (10 diffs)
-
trunk/wps-visitor-counter-widgets.php (modified) (1 diff)
-
trunk/wps-visitor-counter.php (modified) (5 diffs)
-
trunk/wps_visitor_counter_views.php (modified) (20 diffs)
-
trunk/wps_wp_query.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wps-visitor-counter/trunk/readme.txt
r2557553 r3444371 1 1 2 === WPS Visitor Counter Plugin===2 === WPS Visitor Counter === 3 3 Contributors: arifulislamsobuj, techmix 4 Tags: website visitor counter, Visitor counter, visitor traffic, traffic statistics, traffic counter, blog stats, blog traffic, traffic count, visitor view count, visitor counter wordpress, visitor counter wp, website hit counter 5 Requires at least: 3.0.1 6 Tested up to: 5.7.2 7 Stable tag: trunk 4 Tags: visitor counter, traffic statistics, website counter, blog stats, hit counter 5 Requires at least: 5.0 6 Tested up to: 6.9 7 Requires PHP: 7.4 8 Stable tag: 1.4.9 8 9 License: GPLv2 or later 9 10 10 WPS Visitor Counter plugin will display your websites traffic statistics at front end. This Plugin support Widget, Shortcode and Gutenberg Block. Some of the features offered include Today Visitor, Today Hits, Yestarday Visitors, Yestraday Hits, This Month Visitors, This Months Hits, Total Hits, Total Visit, Who's Online and IP Address Visitors.11 Display website visitor statistics with widget, shortcode, and Gutenberg block support. 11 12 12 13 == Description == … … 14 15 WPS Visitor Counter plugin is one of the best visitor counter plugin in wordpress. This plugin will help you to display the number of visitor your website have and its traffic statistics for your WordPress website. We have tried to include all the available data you needed to show in the visitor counter. Here are the items we are showing on our visitor counter: 15 16 16 <ul><li>Users Today </li>17 <li>Users Yesterday </li>17 <ul><li>Users Today</li> 18 <li>Users Yesterday</li> 18 19 <li>Users Last 7 days</li> 19 20 <li>Users Last 30 days</li> 20 <li>Users This Month </li>21 <li>Users This Month</li> 21 22 <li>Users This Year</li> 22 <li>Total Users </li>23 <li>Views Today </li>23 <li>Total Users</li> 24 <li>Views Today</li> 24 25 <li>Views Yesterday</li> 25 26 <li>Views Last 7 days</li> 26 27 <li>Views Last 30 days</li> 27 28 <li>Views This Month</li> 28 <li>Views This Year </li>29 <li>Total views</li>29 <li>Views This Year</li> 30 <li>Total Views</li> 30 31 <li>Who's Online</li> 31 <li>Your IP Address </li> 32 <li>Views Today </li> 33 <li>Total number of views</li> 34 <li>How many people are currently Online</li> 35 <li>Your IP Address </li> 32 <li>Your IP Address</li> 36 33 <li>Server Time</li></ul> 37 34 38 You will find all the data authentic and this will help you to get your website traffic stat . Just install the plugin. It will affect just after you install it in your website. Our plugin is compatible for all types of websites and able to run in all versions of wordpress.35 You will find all the data authentic and this will help you to get your website traffic stats. Just install the plugin. It will take effect just after you install it on your website. Our plugin is compatible for all types of websites and able to run in all versions of WordPress. 39 36 = WPS Visitor Counter shortcode = 40 37 Use this [wps_visitor_counter] Shortcode anywhere in your website where you want to show visitor counter. 41 38 42 39 == gutenberg block supported == 40 41 = Translation Support = 42 43 The plugin is fully internationalized and supports multiple languages. Translation files are located in the /languages/ directory. 44 45 Currently available languages: 46 * English (default) 47 * Spanish (es_ES) - Complete translation included 48 49 To create translations for other languages: 50 1. Use the wps-visitor-counter.pot file as a template 51 2. Create a .po file for your language (e.g., wps-visitor-counter-fr_FR.po) 52 3. Translate the strings and compile to .mo format 53 4. WordPress will automatically load the appropriate translation file 43 54 44 55 == Installation == … … 57 68 = How to add more counter Images? = 58 69 59 As of now, adding another counter images, you can do to access the folder "styles/image/" on the installation of plugins70 As of now, to add more counter images, you can access the folder "styles/image/" in the plugin installation directory 60 71 61 72 = How to use shortcode? = 62 73 63 Use this [wps_visitor_counter] Shortcode anywhere in your website where you want to showvisitor counter.74 Use this [wps_visitor_counter] shortcode anywhere in your website where you want to show the visitor counter. 64 75 65 = Does WPS Visitor Counter Support shortcode? =66 Yes. WPS Visitor Counter support shortcode. Just Use this [wps_visitor_counter] Shortcode anywhere in your website where you want to showvisitor counter.76 = Does WPS Visitor Counter support shortcode? = 77 Yes. WPS Visitor Counter supports shortcode. Just use this [wps_visitor_counter] shortcode anywhere in your website where you want to show the visitor counter. 67 78 68 = Does WPS Visitor Counter plugin gutenberg block supported? =79 = Does WPS Visitor Counter plugin support Gutenberg blocks? = 69 80 70 Yes. WPS Visitor Counter plugin gutenberg block supported.81 Yes. WPS Visitor Counter plugin supports Gutenberg blocks. 71 82 72 83 = What is website visitor counter? = 73 84 74 A website visitor counter is a type of plugin which will help you to tell how much or how many people have visited your website in a certain period of time. Different types of plugins helps you to get different types data analytics supportabout your website traffic.85 A website visitor counter is a type of plugin which will help you to see how many people have visited your website in a certain period of time. Different types of plugins help you to get various data analytics about your website traffic. 75 86 76 87 = How can I track visitors of my website by WPS visitor Counter? = 77 88 78 No. We can only show your number of visitor visti your website. We cannot help you to track your website visitor. Hope in future update we will include this feature.89 No. We can only show the number of visitors to your website. We cannot help you to track individual website visitors. We hope to include this feature in a future update. 79 90 80 91 81 92 = Is visitor counter is free? = 82 93 83 Most of the case the website visitor counter is free. But in case of custom modification and for custom features you need to pay for that visitor counter. These custom website visitor counter will give you a overview on Geographical location tracking and IP address locator.94 In most cases, website visitor counters are free. But for custom modifications and additional features, you may need to pay for enhanced visitor counter plugins. These custom website visitor counters will give you an overview of geographical location tracking and IP address location. 84 95 85 96 = Can I use WPS visitor counter in my Wordpress website? = 86 97 87 Yes. This is absolutely free to use for your wordpress website. just download it and install it to your desired wordpress website.98 Yes. This is absolutely free to use for your WordPress website. Just download it and install it on your desired WordPress website. 88 99 89 100 = Is WPS visitor counter is bug free? = 90 101 91 Yes. We have tested our plugin every now and then to find bug. Recently this plugin has been testat optimum level for the assurance of the quality of our plugin.102 Yes. We have tested our plugin regularly to find bugs. Recently this plugin has been tested at optimum level for the assurance of the quality of our plugin. 92 103 93 104 = Can we use WPS visitor counter plugin from any country? = … … 101 112 = Is this visitor counter works on all versions of wordpress? = 102 113 103 We are recommend you to use our visitor counter plugin at latest version of wordpress. This will help you to get the best interface and this also makes your website secured.114 We recommend you to use our visitor counter plugin with the latest version of WordPress. This will help you to get the best interface and this also makes your website secure. 104 115 105 116 = Is this works as same as visitor hit counter? = 106 117 107 Yes. Both of them are same thing in nature and works exactly in same way. But our visitor counter is better than the others hit counter due to secured coding and state of the art testing procedure.118 Yes. Both of them are the same thing in nature and work exactly the same way. But our visitor counter is better than other hit counters due to secure coding and state-of-the-art testing procedures. 108 119 109 120 = Is our visitor counter works on custom made website? = 110 121 111 No. This is only usable in wordpress. If you need any custom visitor counter than we will make that for you122 No. This is only usable in WordPress. If you need any custom visitor counter, then we will make that for you 112 123 113 124 = Is this website visitor counter online works properly all the time? = 114 125 115 Yes. In every geo logical location or for any amount of visitor or in any wordpress site this visitor counter is working insame efficiency126 Yes. In every geographical location, for any amount of visitors, or on any WordPress site, this visitor counter works with the same efficiency 116 127 117 128 == Screenshots == … … 124 135 125 136 126 Plug-in is now compatible upto wordpress version 5.2127 128 129 137 130 138 = 1.1 = 131 139 <ul> 132 <li>We have made some arbit ary changes in our plugin</li>140 <li>We have made some arbitrary changes in our plugin</li> 133 141 <li>We have updated some graphical and spelling mistakes</li> 134 142 </ul> … … 142 150 <ul> 143 151 <li>CSS Update</li> 144 <li> Error FIX</li>152 <li>Bug fixes</li> 145 153 </ul> 146 154 … … 148 156 <ul> 149 157 <li>Add More Options</li> 150 <li>Change Def ult options</li>158 <li>Change Default options</li> 151 159 </ul> 152 160 … … 157 165 </ul> 158 166 167 = 1.4.9 = 168 * Updated for WordPress 6.9 compatibility 169 * **Security Hardening**: Fixed XSS vulnerabilities, added input sanitization, capability checks, and ABSPATH protection 170 * **SQL Injection Prevention**: Converted all queries to use prepared statements with proper escaping 171 * **Code Quality**: Fixed PHPCS/WPCS violations, added translators comments, proper escaping throughout 172 * **UI Improvements**: Added Settings link to plugin list, display server date+time, removed flagged affiliate content 173 * **Plugin Compliance**: Fixed plugin name, readme tags/description, added proper license headers 174 * **Translation**: Removed discouraged load_plugin_textdomain, improved i18n support 175 159 176 == Arbitrary section == 160 177 161 178 Refer Installation and FAQ section for all required information 162 179 163 == A brief Markdown Example==180 == Support == 164 181 165 Ordered list: 166 167 1. Most simple plugin available so far 168 1. Do not remove developer plugins link 182 For support and feature requests, please visit our website at https://techmix.xyz/ 169 183 170 184 == Upgrade Notice == 171 Upgrade your already installed plug-ins to latest version 1.0 185 = 1.4.9 = 186 Upgrade your already installed plugin to the latest version 1.4.9 for WordPress 6.9 compatibility, enhanced security, and full translation support. -
wps-visitor-counter/trunk/wps-gutenberg-block.js
r2118819 r3444371 1 ( function( blocks, components, i18n, element) {2 var el = wp.element.createElement,3 registerBlockType = wp.blocks.registerBlockType,4 blockStyle = { backgroundColor: '#fff', color: '#000' };1 ( function( wp ) { 2 var registerBlockType = wp.blocks.registerBlockType; 3 var el = wp.element.createElement; 4 var __ = wp.i18n.__; 5 5 6 7 8 9 10 registerBlockType( 'wps/shortcodeblock', { 11 12 title: 'WPS Visitor Counter Block', 13 14 15 16 icon: 'screenoptions', 17 18 19 20 category: 'common', 21 22 23 24 keywords: [ ], 25 attributes: {}, 26 27 28 edit: function( props ) { 29 30 return [ 31 32 el( 'p', { style: blockStyle }, 'WPS Visitor Counter Shortcode Block' ), 33 34 ]; 35 36 }, 37 38 39 40 save: function( props ) { 41 42 return null; 43 44 }, 45 46 } ); 47 48 49 6 registerBlockType( 'wps/wps-visitor-counter', { 7 title: __( 'WPS Visitor Counter', 'wps-visitor-counter' ), 8 icon: 'chart-bar', 9 category: 'widgets', 10 keywords: [ 11 __( 'visitor', 'wps-visitor-counter' ), 12 __( 'counter', 'wps-visitor-counter' ), 13 __( 'statistics', 'wps-visitor-counter' ), 14 ], 15 attributes: { 16 className: { 17 type: 'string', 18 default: '', 19 }, 20 }, 21 edit: function( props ) { 22 return el( 23 'div', 24 { 25 className: props.className, 26 style: { 27 backgroundColor: '#f8f9fa', 28 padding: '20px', 29 border: '1px solid #dee2e6', 30 borderRadius: '4px', 31 textAlign: 'center' 32 } 33 }, 34 el( 'p', { style: { margin: 0, fontWeight: 'bold' } }, __( 'WPS Visitor Counter', 'wps-visitor-counter' ) ), 35 el( 'p', { style: { margin: '10px 0 0 0', fontSize: '14px', color: '#6c757d' } }, __( 'Visitor counter will be displayed here on the frontend.', 'wps-visitor-counter' ) ) 36 ); 37 }, 38 save: function( props ) { 39 return el( 'div', { className: props.className }, '[wps_visitor_counter]' ); 40 }, 41 } ); 50 42 } )( 51 52 window.wp.blocks, 53 54 window.wp.components, 55 56 window.wp.i18n, 57 58 window.wp.element, 59 43 window.wp 60 44 ); -
wps-visitor-counter/trunk/wps-visitor-counter-count.php
r2212754 r3444371 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) exit; 2 3 function wps_enqueue_scripts() { 3 global $wp;4 4 if ( !is_admin() ) { 5 wp_enqueue_script( 'wps', plugin_dir_url( __FILE__ ) . 'styles/js/custom.js', array( 'jquery' ),'1', false );6 $params = array(7 'ajaxurl' => admin_url('admin-ajax.php'),8 'ajax_nonce' => wp_create_nonce('wps-nonce'),9 );10 wp_localize_script( 'wps', 'wpspagevisit', $params);5 wp_enqueue_script( 'wps-visitor-counter', plugin_dir_url( __FILE__ ) . 'styles/js/custom.js', array( 'jquery' ), '1.4.9', false ); 6 $params = array( 7 'ajaxurl' => admin_url('admin-ajax.php'), 8 'ajax_nonce' => wp_create_nonce('wps-nonce'), 9 ); 10 wp_localize_script( 'wps-visitor-counter', 'wpspagevisit', $params ); 11 11 } 12 13 wp_enqueue_style( 'wps-visitor-style', plugin_dir_url( __FILE__ ).'styles/css/default.css', array(),'2' );14 12 13 wp_enqueue_style( 'wps-visitor-style', plugin_dir_url( __FILE__ ) . 'styles/css/default.css', array(), '1.4.9' ); 15 14 } 16 15 … … 25 24 function wps_count_page_visit() { 26 25 check_ajax_referer( 'wps-nonce', 'nonce' ); 26 27 if ( ! wp_doing_ajax() ) { 28 wp_die( 'Invalid request' ); 29 } 30 27 31 global $wpdb; 28 $ip = wps_getRealIpAddr(); // Getting the user's computer IP 29 $date = date("Y-m-d"); // Getting the current date 30 $waktu = time(); 31 $sql = $wpdb->query( $wpdb->prepare("INSERT INTO `". WPS_VC_TABLE_NAME . "`(`ip`, `date`, `views`, `online`) VALUES(%s, %s, %d, %s) ON DUPLICATE KEY UPDATE `views` = `views` +1, `online` = %s;",$ip, $date, 1, $waktu,$waktu )); 32 wp_die(); 32 33 $ip = wps_getRealIpAddr(); 34 $date = current_time( 'Y-m-d' ); 35 $waktu = current_time( 'timestamp' ); 36 37 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Table name is a constant; direct query needed for visitor statistics. 38 $wpdb->query( $wpdb->prepare( "INSERT INTO `" . WPS_VC_TABLE_NAME . "` (`ip`, `date`, `views`, `online`) VALUES (%s, %s, 1, %d) ON DUPLICATE KEY UPDATE `views` = `views` + 1, `online` = %d", $ip, $date, $waktu, $waktu ) ); 39 40 41 wp_die(); 33 42 } 43 34 44 ?> -
wps-visitor-counter/trunk/wps-visitor-counter-options-general.php
r2182898 r3444371 1 1 <?php 2 if (!current_user_can('administrator')) { 3 wp_die( __('You do not have sufficient permissions to access this page.', 'wps-visitor-counter') ); 2 if ( ! defined( 'ABSPATH' ) ) exit; 3 if (!current_user_can('manage_options')) { 4 wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'wps-visitor-counter' ) ); 4 5 } 5 6 … … 10 11 <div class="wrap"> 11 12 <div id="icon-options-general" class="icon32"></div> 12 <h2><?php _e('Plugin Options WPS Visitor Counter', 'wps-visitor-counter')?></h2><br/>13 <h2><?php esc_html_e( 'Plugin Options WPS Visitor Counter', 'wps-visitor-counter' ); ?></h2><br/> 13 14 <div class="wpsvc_plugins_wrap"><!-- start mvc wrap --> 14 15 <div class="wpsvc_right_sidebar"><!-- start right sidebar --> … … 18 19 <div class="wpsvc_plugins_text"> 19 20 <div class="wpsvc_option_wrap"> 20 <h3 class="hndle"><?php _e('Recommended Web Hosting', 'wps-visitor-counter')?></h3>21 <h3 class="hndle"><?php esc_html_e( 'Recommended Web Hosting', 'wps-visitor-counter' ); ?></h3> 21 22 22 23 23 24 <!----fastcomet-----> 24 <script type="text/javascript">document.write("<iframe name='banner' src='https://affiliate.fastcomet.com/scripts/banner.php?a_aid=5bd818a517dc6&a_bid=a881856b&w=1&refx2s6d="+encodeURIComponent(encodeURIComponent(document.URL))+"' framespacing='0' frameborder='no' scrolling='no' width='264' height='264' allowtransparency='true'><a href='https://affiliate.fastcomet.com/scripts/click.php?a_aid=5bd818a517dc6&a_bid=a881856b' target='_top'>264x264 Robot Clipart (animated)</a></iframe>");25 25 </script> 26 26 <noscript> … … 28 28 </noscript> 29 29 <!----fastcomet end-----> 30 <a href="https://www.a2hosting.com?aid=5bf7c623aa2a9&bid=d6664600" target="_top"><img src="//affiliates.a2hosting.com/accounts/default1/banners/d6664600.jpg" alt="" title="" width="336" height="280" /></a><img style="border:0" src="https://affiliates.a2hosting.com/scripts/imp.php?aid=5bf7c623aa2a9&bid=d6664600" width="1" height="1" alt="" />31 30 32 31 </div> … … 40 39 $wps_display_field_arr = explode(",",$wps_display_field); 41 40 ?> 42 <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" class="wps_plugin_main_form">41 <form method="post" action="<?php echo esc_url_raw( isset( $_SERVER["REQUEST_URI"] ) ? wp_unslash( $_SERVER["REQUEST_URI"] ) : '' ); ?>" class="wps_plugin_main_form"> 43 42 <?php wp_nonce_field('wps_my_front_end_setting'); ?> 44 <div><label for="wps_visitor_title"><?php _e('Title:', 'wps-visitor-counter')?> <input class="widefat" id="wps_visitor_titletitle" name="wps_visitor_title" type="text" value="<?php echo esc_html($wps_option_data['visitor_title']);?>" /></label></div>43 <div><label for="wps_visitor_title"><?php esc_html_e( 'Title:', 'wps-visitor-counter' ); ?> <input class="widefat" id="wps_visitor_titletitle" name="wps_visitor_title" type="text" value="<?php echo esc_attr($wps_option_data['visitor_title']);?>" /></label></div> 45 44 <?php 46 45 wp_enqueue_script('wp-color-picker'); 47 46 wp_enqueue_style( 'wp-color-picker' ); 48 47 ?> 49 <div><label for="wps_visitor_font_color"><?php _e('Font Color:', 'wps-visitor-counter')?> </label><input class="widefat" id="wps_visitor_font_color" data-default-color="#000000" name="wps_visitor_font_color" type="text" value="<?php echo esc_html($wps_option_data['font_color']);?>" /></div>48 <div><label for="wps_visitor_font_color"><?php esc_html_e( 'Font Color:', 'wps-visitor-counter' ); ?> </label><input class="widefat" id="wps_visitor_font_color" data-default-color="#000000" name="wps_visitor_font_color" type="text" value="<?php echo esc_attr($wps_option_data['font_color']);?>" /></div> 50 49 <script type="text/javascript"> 51 50 jQuery(document).ready(function($) { … … 54 53 </script> 55 54 56 <div><font size='2'><?php _e('To change the font color, select the color with color picker.', 'wps-visitor-counter')?> </font></div>57 <div><font size='3'>< ?php _e('<b>PLugin Options</b>', 'wps-visitor-counter')?></font></div>55 <div><font size='2'><?php esc_html_e( 'To change the font color, select the color with color picker.', 'wps-visitor-counter' ); ?> </font></div> 56 <div><font size='3'><b><?php esc_html_e( 'Plugin Options', 'wps-visitor-counter' ); ?></b></font></div> 58 57 <!-- UPDATE PLAN --> 59 <div><label for="wps_visitor_user_start">Users Count Start: <input class="widefat" id="wps_visitor_user_start" name="wps_visitor_user_start" type="number" min="0" value="<?php echo esc_ html($wps_option_data['user_start']);?>" /></label></div>58 <div><label for="wps_visitor_user_start">Users Count Start: <input class="widefat" id="wps_visitor_user_start" name="wps_visitor_user_start" type="number" min="0" value="<?php echo esc_attr($wps_option_data['user_start']);?>" /></label></div> 60 59 <div><font size='2'>Fill in with numbers to start the initial calculation of the user counter, if the empty counter will start from 1</font></div> 61 <div><label for="wps_visitor_views_start">views Start: <input class="widefat" id="wps_visitor_views_start" name="wps_visitor_views_start" type="number" min="0" value="<?php echo esc_ html($wps_option_data['views_start']);?>" /></label></div>60 <div><label for="wps_visitor_views_start">views Start: <input class="widefat" id="wps_visitor_views_start" name="wps_visitor_views_start" type="number" min="0" value="<?php echo esc_attr($wps_option_data['views_start']);?>" /></label></div> 62 61 <div><font size='2'>Fill in the numbers to start the initial calculation of the views, if the empty views will start from 1</font></div> 63 62 <!-- END UPDATE --> 64 <div><label for="wps_visitor_today_user"><?php _e('Enable Users Today display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("today_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_today_user" name="wps_visitor_today_user" /></label></div>65 <div><label for="wps_visitor_yesterday_user"><?php _e('Enable Users Yesterday display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("yesterday_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_yesterday_user" name="wps_visitor_yesterday_user" /></label></div>66 67 <div><label for="wps_visitor_last7_day_user"><?php _e('Enable Users Last 7 Days display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("last7_day_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_last7_day_user" name="wps_visitor_last7_day_user" /></label></div>68 69 <div><label for="wps_visitor_last30_day_user"><?php _e('Enable Users Last 30 Days display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("last30_day_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_last30_day_user" name="wps_visitor_last30_day_user" /></label></div>70 71 <div><label for="wps_visitor_month_user"><?php _e('Enable Users This Month display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("month_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_month_user" name="wps_visitor_month_user" /></label></div>72 <div><label for="wps_visitor_year_user"><?php _e('Enable Users This Year display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("year_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_year_user" name="wps_visitor_year_user" /></label></div>73 <div><label for="wps_visitor_total_user"><?php _e('Enable Total Users display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("total_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_total_user" name="wps_visitor_total_user" /></label></div>74 <div><label for="wps_visitor_today_view"><?php _e('Enable views Today display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("today_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_today_view" name="wps_visitor_today_view" /></label></div>75 76 <div><label for="wps_visitor_yesterday_view"><?php _e('Enable views Yesterday display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("yesterday_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_yesterday_view" name="wps_visitor_yesterday_view" /></label></div>77 78 79 <div><label for="wps_visitor_last7_day_view"><?php _e('Enable views Last 7 Days display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("last7_day_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_last7_day_view" name="wps_visitor_last7_day_view" /></label></div>80 81 <div><label for="wps_visitor_last30_day_view"><?php _e('Enable views Last 30 Days display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("last30_day_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_last30_day_view" name="wps_visitor_last30_day_view" /></label></div>82 83 84 <div><label for="wps_visitor_month_view"><?php _e('Enable views This Month display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("month_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_month_view" name="wps_visitor_month_view" /></label></div>85 <div><label for="wps_visitor_year_view"><?php _e('Enable views This Year display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("year_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_year_view" name="wps_visitor_year_view" /></label></div>86 87 88 89 <div><label for="wps_visitor_total_view"><?php _e('Enable Total views display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("total_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_total_view" name="wps_visitor_total_view" /></label></div>90 <div><label for="wps_visitor_online_view"><?php _e('Enable Whos Online display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("online_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_online_view" name="wps_visitor_online_view" /></label></div>91 <div><label for="wps_visitor_ip_display"><?php _e('Enable IP address display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("ip_display", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_ip_display" name="wps_visitor_ip_display" /></label></div>92 <div><label for="wps_visitor_server_time"><?php _e('Enable Server Time display?', 'wps-visitor-counter')?> <input type="checkbox" class="checkbox" <?php if (in_array("server_time", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_server_time" name="wps_visitor_server_time" /></label></div>93 <div><label for="wps_visitor_wpsvc_align"><?php _e('Plugins align?', 'wps-visitor-counter')?>94 <select class="select" id="wps_visitor_wpsvc_align" name="wps_visitor_wpsvc_align" selected="<?php echo $wps_option_data['visitor_wpsvc_align'];?>">95 <option value="left"><?php _e('wps_visitor_wpsvc_align', 'wps-visitor-counter')?></option>96 <option value="left" <?php if($wps_option_data['visitor_wpsvc_align'] == 'left'){echo "selected";}?>><?php _e('Left', 'wps-visitor-counter')?></option>97 <option value="center" <?php if($wps_option_data['visitor_wpsvc_align'] == 'center'){echo "selected";}?>><?php _e('Center', 'wps-visitor-counter')?></option>98 <option value="right" <?php if($wps_option_data['visitor_wpsvc_align'] == 'right'){echo "selected";}?>><?php _e('Right', 'wps-visitor-counter')?></option>63 <div><label for="wps_visitor_today_user"><?php esc_html_e( 'Enable Users Today display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("today_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_today_user" name="wps_visitor_today_user" /></label></div> 64 <div><label for="wps_visitor_yesterday_user"><?php esc_html_e( 'Enable Users Yesterday display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("yesterday_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_yesterday_user" name="wps_visitor_yesterday_user" /></label></div> 65 66 <div><label for="wps_visitor_last7_day_user"><?php esc_html_e( 'Enable Users Last 7 Days display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("last7_day_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_last7_day_user" name="wps_visitor_last7_day_user" /></label></div> 67 68 <div><label for="wps_visitor_last30_day_user"><?php esc_html_e( 'Enable Users Last 30 Days display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("last30_day_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_last30_day_user" name="wps_visitor_last30_day_user" /></label></div> 69 70 <div><label for="wps_visitor_month_user"><?php esc_html_e( 'Enable Users This Month display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("month_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_month_user" name="wps_visitor_month_user" /></label></div> 71 <div><label for="wps_visitor_year_user"><?php esc_html_e( 'Enable Users This Year display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("year_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_year_user" name="wps_visitor_year_user" /></label></div> 72 <div><label for="wps_visitor_total_user"><?php esc_html_e( 'Enable Total Users display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("total_user", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_total_user" name="wps_visitor_total_user" /></label></div> 73 <div><label for="wps_visitor_today_view"><?php esc_html_e( 'Enable views Today display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("today_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_today_view" name="wps_visitor_today_view" /></label></div> 74 75 <div><label for="wps_visitor_yesterday_view"><?php esc_html_e( 'Enable views Yesterday display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("yesterday_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_yesterday_view" name="wps_visitor_yesterday_view" /></label></div> 76 77 78 <div><label for="wps_visitor_last7_day_view"><?php esc_html_e( 'Enable views Last 7 Days display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("last7_day_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_last7_day_view" name="wps_visitor_last7_day_view" /></label></div> 79 80 <div><label for="wps_visitor_last30_day_view"><?php esc_html_e( 'Enable views Last 30 Days display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("last30_day_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_last30_day_view" name="wps_visitor_last30_day_view" /></label></div> 81 82 83 <div><label for="wps_visitor_month_view"><?php esc_html_e( 'Enable views This Month display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("month_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_month_view" name="wps_visitor_month_view" /></label></div> 84 <div><label for="wps_visitor_year_view"><?php esc_html_e( 'Enable views This Year display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("year_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_year_view" name="wps_visitor_year_view" /></label></div> 85 86 87 88 <div><label for="wps_visitor_total_view"><?php esc_html_e( 'Enable Total views display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("total_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_total_view" name="wps_visitor_total_view" /></label></div> 89 <div><label for="wps_visitor_online_view"><?php esc_html_e( 'Enable Whos Online display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("online_view", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_online_view" name="wps_visitor_online_view" /></label></div> 90 <div><label for="wps_visitor_ip_display"><?php esc_html_e( 'Enable IP address display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("ip_display", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_ip_display" name="wps_visitor_ip_display" /></label></div> 91 <div><label for="wps_visitor_server_time"><?php esc_html_e( 'Enable Server Time display?', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" <?php if (in_array("server_time", $wps_display_field_arr)) {echo "checked";} ?> id="wps_visitor_server_time" name="wps_visitor_server_time" /></label></div> 92 <div><label for="wps_visitor_wpsvc_align"><?php esc_html_e( 'Plugins align?', 'wps-visitor-counter' ); ?> 93 <select class="select" id="wps_visitor_wpsvc_align" name="wps_visitor_wpsvc_align"> 94 <option value="left"><?php esc_html_e( 'Left', 'wps-visitor-counter' ); ?></option> 95 <option value="left" <?php if($wps_option_data['visitor_wpsvc_align'] == 'left'){echo "selected";}?>><?php esc_html_e( 'Left', 'wps-visitor-counter' ); ?></option> 96 <option value="center" <?php if($wps_option_data['visitor_wpsvc_align'] == 'center'){echo "selected";}?>><?php esc_html_e( 'Center', 'wps-visitor-counter' ); ?></option> 97 <option value="right" <?php if($wps_option_data['visitor_wpsvc_align'] == 'right'){echo "selected";}?>><?php esc_html_e( 'Right', 'wps-visitor-counter' ); ?></option> 99 98 </select></label></div> 100 <input type="submit" name="wps_view_setting" class="button-primary" value="<?php _e('Save Changes', 'wps-visitor-counter')?>" /></form>99 <input type="submit" name="wps_view_setting" class="button-primary" value="<?php echo esc_attr__( 'Save Changes', 'wps-visitor-counter' ); ?>" /></form> 101 100 </div> 102 101 </div> 103 102 <div class="wpsvc_plugins_text"> 104 103 <div class="wpsvc_option_wrap"> 105 <h3 class="hndle"><?php _e('The way of use', 'wps-visitor-counter')?></h3>106 <p><?php _e('Use this <b>"[wps_visitor_counter]"</b> shortcode or use in your registered widget.', 'wps-visitor-counter')?></p>104 <h3 class="hndle"><?php esc_html_e( 'The way of use', 'wps-visitor-counter' ); ?></h3> 105 <p><?php esc_html_e( 'Use this "[wps_visitor_counter]" shortcode or use in your registered widget.', 'wps-visitor-counter' ); ?></p> 107 106 </div> 108 107 </div> 109 108 <div class="wpsvc_plugins_text"> 110 109 <div class="wpsvc_option_wrap"> 111 <h3 class="hndle"><?php _e('Reset Plugin Data', 'wps-visitor-counter')?></h3>112 <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">110 <h3 class="hndle"><?php esc_html_e( 'Reset Plugin Data', 'wps-visitor-counter' ); ?></h3> 111 <form method="post" action="<?php echo esc_url_raw( isset( $_SERVER["REQUEST_URI"] ) ? wp_unslash( $_SERVER["REQUEST_URI"] ) : '' ); ?>"> 113 112 <?php wp_nonce_field('wps_table_reset'); ?> 114 113 <p style="margin-top:20px;" > 115 <?php _e('Check for reset', 'wps-visitor-counter'); ?> <input type="checkbox" class="checkbox" id="reset_wpsvc" name="reset_wpsvc" />116 <input type="submit" class="button-primary" value="<?php _e('Reset Data', 'wps-visitor-counter')?>" />114 <?php esc_html_e( 'Check for reset', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" id="reset_wpsvc" name="reset_wpsvc" /> 115 <input type="submit" class="button-primary" value="<?php echo esc_attr__( 'Reset Data', 'wps-visitor-counter' ); ?>" /> 117 116 </p> 118 117 </form> … … 126 125 <div class="wpsvc_left_sidebar"><!-- start Left sidebar --> 127 126 <div class="wpsvc_plugins_text"> 128 <div class="wpsvc_option_wrap">129 <h3 class="hndle"><?php _e('Google AdSense', 'wps-visitor-counter') ?></h3>130 <a href="https://partner.pcloud.com/r/7781" title="pCloud Premium" target="_blank"><img src="https://partner.pcloud.com/media/banners/lifetime/lifetime00572890.jpg" alt="pCloud Premium"/></a>131 132 <a href="https://www.tubebuddy.com/offertail" title="TubeBuddy" target="_blank"><img src="https://www.tubebuddy.com/assets/images/AffiliateAssets/Banner-728x90.png" alt="TubeBuddy"/></a>133 134 135 </div>136 127 <div class="wpsvc_option_wrap wps_follow_button"> 137 <h3 class="hndle"><?php _e('Follow us', 'wps-visitor-counter')?></h3>138 <a href="https://www.facebook.com/TechMix365"><img src="<?php echo plugins_url ("counter/fb.png" , __FILE__ );?>" alt=""></a>139 <a href="https://twitter.com/TechMix365"><img src="<?php echo plugins_url ("counter/twitter.png" , __FILE__ );?>" alt=""></a>128 <h3 class="hndle"><?php esc_html_e( 'Follow us', 'wps-visitor-counter' ); ?></h3> 129 <a href="https://www.facebook.com/TechMix365"><img src="<?php echo esc_url( plugins_url( 'counter/fb.png', __FILE__ ) ); ?>" alt=""></a> 130 <a href="https://twitter.com/TechMix365"><img src="<?php echo esc_url( plugins_url( 'counter/twitter.png', __FILE__ ) ); ?>" alt=""></a> 140 131 </div> 141 132 </div> 142 133 <div class="wpsvc_option_wrap"> 143 134 <div class="wpsvc_plugins_text"> 144 <h3 class="hndle"><?php _e('Image Counter', 'wps-visitor-counter')?></h3>145 <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">135 <h3 class="hndle"><?php esc_html_e( 'Image Counter', 'wps-visitor-counter' ); ?></h3> 136 <form method="post" action="<?php echo esc_url_raw( isset( $_SERVER["REQUEST_URI"] ) ? wp_unslash( $_SERVER["REQUEST_URI"] ) : '' ); ?>"> 146 137 <?php wp_nonce_field('wps_my_front_end_style'); ?> 147 138 … … 162 153 ?> 163 154 164 <p><b>Choose one of the <?php echo $style_name; ?> counter styles below:</b></p>155 <p><b>Choose one of the <?php echo esc_html( $style_name ); ?> counter styles below:</b></p> 165 156 <table class="form-table"> 166 157 <?php … … 169 160 <tr> 170 161 <td> 171 <input type="radio" id="img1" name="wps_visitor_counter_style" value="<?php echo 'image/'.$name; ?>" <?php if($wps_option_data['style'] == 'image/'.$name){echo "checked";}?>/>172 <img src='<?php echo plugin_dir_url( __FILE__ );?>styles/<?php echo $style_name . '/' . $name . '/'; ?>11.jpg'>162 <input type="radio" id="img1" name="wps_visitor_counter_style" value="<?php echo esc_attr( 'image/'.$name ); ?>" <?php if($wps_option_data['style'] == 'image/'.$name){echo "checked";}?>/> 163 <img src='<?php echo esc_url( plugin_dir_url( __FILE__ ) . 'styles/' . esc_attr( $style_name ) . '/' . esc_attr( $name ) . '/11.jpg' ); ?>' alt="<?php echo esc_attr( $style_name . ' ' . $name ); ?>"> 173 164 174 165 </td> … … 209 200 } 210 201 ?> 211 <p><?php _e('Show powered by <a href="https://techmix.xyz/">WPS Visitor Counter</a>? ', 'wps-visitor-counter'); ?> <input type="checkbox" class="checkbox" id="wps_visitor_counter_attribution" name="wps_visitor_counter_attribution" <?php if($wps_option_data['show_powered_by'] == 1 ){echo "checked";} ?>/></p>202 <p><?php esc_html_e( 'Show powered by WPS Visitor Counter? ', 'wps-visitor-counter' ); ?> <input type="checkbox" class="checkbox" id="wps_visitor_counter_attribution" name="wps_visitor_counter_attribution" <?php if($wps_option_data['show_powered_by'] == 1 ){echo "checked";} ?>/></p> 212 203 <p style="margin-top:20px;" > 213 <input type="submit" name="style_setting" class="button-primary" value="<?php _e('Save Changes', 'wps-visitor-counter')?>" />204 <input type="submit" name="style_setting" class="button-primary" value="<?php echo esc_attr__( 'Save Changes', 'wps-visitor-counter' ); ?>" /> 214 205 </p> 215 206 </form> -
wps-visitor-counter/trunk/wps-visitor-counter-widgets.php
r2182903 r3444371 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) exit; 2 3 class wps_visitor_counter extends WP_Widget{ 3 4 4 function __construct(){5 $ paramitter=array(6 'description' => __('Display Visitor Counter and Statistics Traffic in shortcode and widget', 'wps-visitor-counter'), //plugin description7 'name' => 'WPS - Visitor Counter' //title of plugin5 public function __construct(){ 6 $widget_ops = array( 7 'classname' => 'wps_visitor_counter', 8 'description' => __('Display Visitor Counter and Statistics Traffic in shortcode and widget', 'wps-visitor-counter'), 8 9 ); 9 10 parent::__construct('wps_visitor_counter', '', $paramitter); 10 parent::__construct('wps_visitor_counter', __('WPS - Visitor Counter', 'wps-visitor-counter'), $widget_ops); 11 11 } 12 12 13 13 public function widget($args, $instance){ 14 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Function returns escaped HTML. 14 15 echo wps_add_visitor_counter(); 15 16 } -
wps-visitor-counter/trunk/wps-visitor-counter.php
r2558012 r3444371 1 1 <?php 2 2 /* 3 Plugin Name: WPS Visitor Counter Plugin3 Plugin Name: WPS Visitor Counter 4 4 Plugin URI: https://techmix.xyz/downloads/wps-visitor-counter-plugin-for-wordpress/ 5 5 Description: WPS Visitor Counter plugin will display your websites traffic statistics at front end. This Plugin support Widget, Shortcode and Gutenberg Block. 6 Version: 1.4.8 6 Version: 1.4.9 7 Requires at least: 5.0 8 Tested up to: 6.9 9 Requires PHP: 7.4 10 License: GPLv2 or later 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html 7 12 Text Domain: wps-visitor-counter 8 13 Domain Path: /languages … … 10 15 Author URI: https://techmix.xyz/ 11 16 */ 12 17 if ( ! defined( 'ABSPATH' ) ) exit; 13 18 if ( ! function_exists( 'wps_getRealIpAddr' ) ) { 14 19 function wps_getRealIpAddr() { 15 foreach (['HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'] as $key){ 16 if(array_key_exists($key, $_SERVER) === true){ 17 foreach (explode(',', $_SERVER[$key]) as $ip){ 18 $ip = trim($ip); // just to be safe 19 if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false){ 20 return $ip; 20 $ip_headers = [ 21 'HTTP_CF_CONNECTING_IP', // Cloudflare 22 'HTTP_CLIENT_IP', 23 'HTTP_X_FORWARDED_FOR', 24 'HTTP_X_FORWARDED', 25 'HTTP_X_CLUSTER_CLIENT_IP', 26 'HTTP_FORWARDED_FOR', 27 'HTTP_FORWARDED', 28 'REMOTE_ADDR' 29 ]; 30 31 foreach ($ip_headers as $key) { 32 if (!empty($_SERVER[$key])) { 33 $raw_value = sanitize_text_field( wp_unslash( $_SERVER[ $key ] ) ); 34 foreach (explode(',', $raw_value) as $ip) { 35 $ip = trim($ip); 36 // Validate IP and exclude private/reserved ranges 37 if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) { 38 return sanitize_text_field($ip); 21 39 } 22 40 } 23 41 } 24 42 } 43 44 // Fallback 45 return sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ?? '127.0.0.1' ) ); 25 46 } 26 47 } … … 47 68 function wps_visitor_counter_admin_menu() { 48 69 add_options_page('Plugin Stats WPS', 'WPS Visitor Counter', "manage_options", 'wps_options_general', 'wps_visitor_counter_option'); 70 } 71 72 /** 73 * Add "Settings" link on Plugins list page. 74 */ 75 function wps_visitor_counter_plugin_action_links( $links ) { 76 if ( current_user_can( 'manage_options' ) ) { 77 $settings_url = admin_url( 'options-general.php?page=wps_options_general' ); 78 array_unshift( 79 $links, 80 '<a href="' . esc_url( $settings_url ) . '">' . esc_html__( 'Settings', 'wps-visitor-counter' ) . '</a>' 81 ); 82 } 83 84 return $links; 49 85 } 50 86 … … 82 118 add_action('widgets_init', 'wps_visitor_counter_widgets_init'); 83 119 add_action('admin_menu', 'wps_visitor_counter_admin_menu'); 84 add_action('plugins_loaded', function() { 85 load_plugin_textdomain( 'wps-visitor-counter', false, basename( dirname( __FILE__ ) ) . '/languages/' ); 86 }); 120 add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'wps_visitor_counter_plugin_action_links' ); 87 121 88 122 … … 94 128 function wps_visitor_init() { 95 129 add_shortcode( 'wps_visitor_counter', 'wps_add_visitor_counter' ); 96 /*register_block_type( 'wps/wps-visitor-counter', array( 97 'editor_script' => 'wps-visitor-block', 130 131 // Register Gutenberg block 132 if ( function_exists( 'register_block_type' ) ) { 133 wp_register_script( 134 'wps-visitor-gutenberg-editor-scripts', 135 esc_url( plugin_dir_url(__FILE__) . 'wps-gutenberg-block.js' ), 136 array( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components', 'wp-i18n' ), 137 '1.4.9', 138 true 139 ); 140 141 register_block_type( 'wps/wps-visitor-counter', array( 142 'editor_script' => 'wps-visitor-gutenberg-editor-scripts', 98 143 'render_callback' => 'wps_add_visitor_counter', 99 ) );*/ 100 101 102 if ( !function_exists( 'register_block_type' ) ) { 103 104 return; 105 106 } 107 108 109 110 wp_register_script( 111 112 'wps-visitor-gutenberg-editor_scripts', 113 114 plugin_dir_url(__FILE__) . 'wps-gutenberg-block.js', 115 116 array( 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-editor' ) 117 118 ); 119 120 register_block_type( 'wps/shortcode-script', array( 121 122 'editor_script' => 'wps-visitor-gutenberg-editor_scripts', 123 124 )); 125 register_block_type( 'wps/shortcodeblock', array( 126 127 'render_callback' => 'wps_add_visitor_counter' 128 129 )); 130 131 144 'attributes' => array( 145 'className' => array( 146 'type' => 'string', 147 'default' => '', 148 ), 149 ), 150 )); 151 } 132 152 } 133 153 -
wps-visitor-counter/trunk/wps_visitor_counter_views.php
r2212754 r3444371 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) exit; 3 // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Direct queries needed for custom visitor statistics table. 2 4 function wps_add_visitor_counter() { 3 5 global $wpdb; … … 20 22 21 23 $ip = wps_getRealIpAddr(); // Getting the user's computer IP 22 $date = date("Y-m-d"); // Getting the current date 23 $date_year_month = date("Y-m"); 24 $date_year = date("Y"); 25 $yesterday_date = date('Y-m-d',strtotime("-1 days")); 26 27 28 $timeBefore = time() - 300; 24 $date = current_time('Y-m-d'); // Getting the current date in WordPress timezone (date only) 25 $server_datetime = current_time( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) ); // Display date + time 26 $date_year_month = current_time('Y-m'); 27 $date_year = current_time('Y'); 28 $yesterday_timestamp = current_time('timestamp') - 86400; // Subtract one day in seconds. 29 $yesterday_date = date_i18n('Y-m-d', $yesterday_timestamp); 30 31 32 $timeBefore = current_time('timestamp') - 300; 29 33 30 34 … … 32 36 //image print 33 37 // UPDATE PLAN 38 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Table name is a constant; direct query needed for visitor statistics. 34 39 $user_total = $wpdb->get_var( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "`" ); 35 40 if ($user_start==NULL) { … … 114 119 115 120 <?php if (in_array("today_user", $wps_display_field_arr)) { 116 $user_today = $wpdb->get_var( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` = '$date'" ); 121 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 122 $user_today = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` = %s", $date ) ); 117 123 118 124 $wps_return = $wps_return."<div id=\"wpsvcvisit\" ".$style.">".$imgvisit." ".esc_html__('Users Today', 'wps-visitor-counter')." : ".$user_today."</div>"; … … 122 128 <?php } ?> 123 129 <?php if (in_array("yesterday_user", $wps_display_field_arr)) { 124 $user_yesterday = $wpdb->get_var( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` = '$yesterday_date'" ); 130 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 131 $user_yesterday = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` = %s", $yesterday_date ) ); 125 132 126 133 … … 132 139 133 140 <?php if (in_array("last7_day_user", $wps_display_field_arr)) { 141 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 134 142 $user_last_7days = $wpdb->get_var( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` >= DATE(NOW()) - INTERVAL 7 DAY" ); 135 143 … … 141 149 <?php } ?> 142 150 <?php if (in_array("last30_day_user", $wps_display_field_arr)) { 151 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 143 152 $user_last_30days = $wpdb->get_var( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` >= DATE(NOW()) - INTERVAL 30 DAY" ); 144 153 … … 150 159 <?php } ?> 151 160 <?php if (in_array("month_user", $wps_display_field_arr)) { 152 $user_month = $wpdb->get_var( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` LIKE '$date_year_month%'" ); 161 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 162 $user_month = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` LIKE %s", $date_year_month . '%' ) ); 153 163 154 164 … … 159 169 <?php } ?> 160 170 <?php if (in_array("year_user", $wps_display_field_arr)) { 161 $user_year = $wpdb->get_var( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` LIKE '$date_year%'" ); 171 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 172 $user_year = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` LIKE %s", $date_year . '%' ) ); 162 173 163 174 … … 183 194 <?php } ?> 184 195 <?php if (in_array("today_view", $wps_display_field_arr)) { 185 $views_today= $wpdb->get_var( "SELECT SUM(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` = '$date'" ); 196 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 197 $views_today= $wpdb->get_var( $wpdb->prepare( "SELECT SUM(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` = %s", $date ) ); 186 198 187 199 … … 192 204 <?php } ?> 193 205 <?php if (in_array("yesterday_view", $wps_display_field_arr)) { 194 $views_yesterday = $wpdb->get_var( "SELECT SUM(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` = '$yesterday_date'" ); 206 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 207 $views_yesterday = $wpdb->get_var( $wpdb->prepare( "SELECT SUM(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` = %s", $yesterday_date ) ); 195 208 if ($views_yesterday=="") { 196 209 $views_yesterday==0; … … 203 216 <?php } ?> 204 217 <?php if (in_array("last7_day_view", $wps_display_field_arr)) { 218 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 205 219 $views_last7_days = $wpdb->get_var( "SELECT SUM(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` >= DATE(NOW()) - INTERVAL 7 DAY" ); 206 220 … … 212 226 <?php } ?> 213 227 <?php if (in_array("last30_day_view", $wps_display_field_arr)) { 228 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 214 229 $views_last30_days = $wpdb->get_var( "SELECT SUM(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` >= DATE(NOW()) - INTERVAL 30 DAY" ); 215 230 … … 221 236 <?php } ?> 222 237 <?php if (in_array("month_view", $wps_display_field_arr)) { 223 $views_month = $wpdb->get_var( "SELECT SUM(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` LIKE '$date_year_month%'" ); 238 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 239 $views_month = $wpdb->get_var( $wpdb->prepare( "SELECT SUM(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` LIKE %s", $date_year_month . '%' ) ); 224 240 225 241 … … 232 248 233 249 <?php if (in_array("year_view", $wps_display_field_arr)) { 234 $views_year = $wpdb->get_var( "SELECT SUM(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` LIKE '$date_year%'" ); 250 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 251 $views_year = $wpdb->get_var( $wpdb->prepare( "SELECT SUM(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `date` LIKE %s", $date_year . '%' ) ); 235 252 236 253 … … 241 258 <?php } ?> 242 259 <?php if (in_array("total_view", $wps_display_field_arr)) { 260 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 243 261 $totalviews = $wpdb->get_var( "SELECT SUM(`views`) FROM `". WPS_VC_TABLE_NAME . "`" ); 244 262 if ($views_start!=NULL) { … … 252 270 <?php } ?> 253 271 <?php if (in_array("online_view", $wps_display_field_arr)) { 254 $total_online = $wpdb->get_var( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `online` > '$timeBefore'" ); 272 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name is a constant, cannot be prepared. 273 $total_online = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(`views`) FROM `". WPS_VC_TABLE_NAME . "` WHERE `online` > %d", $timeBefore ) ); 255 274 256 275 … … 273 292 <?php if (in_array("server_time", $wps_display_field_arr)) { 274 293 275 276 $wps_return = $wps_return."<div id=\"wpsvcdate\">".$img_visit_year." ".esc_html__('Server Time', 'wps-visitor-counter')." : ".$date."</div>"; 294 $wps_return = $wps_return."<div id=\"wpsvcdate\">".$img_visit_year." ".esc_html__('Server Time', 'wps-visitor-counter')." : ".esc_html( $server_datetime )."</div>"; 277 295 278 296 … … 281 299 <?php if ($wps_option_data['show_powered_by'] == 1) { 282 300 283 284 $wps_return = $wps_return."<div id=\"wpsvcattribution\" ".$style."><small> Powered By <a href=\"https://techmix.xyz/\" rel=\"nofollow\">WPS Visitor Counter</a></small></div>";301 /* translators: %s: Link to plugin website */ 302 $wps_return = $wps_return."<div id=\"wpsvcattribution\" ".$style."><small>".sprintf(__('Powered By %s', 'wps-visitor-counter'), '<a href="https://techmix.xyz/" rel="nofollow">WPS Visitor Counter</a>')."</small></div>"; 285 303 286 304 … … 290 308 $wps_return = $wps_return."</div>"; 291 309 return $wps_return; 310 // phpcs:enable WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching 292 311 ?> 293 312 -
wps-visitor-counter/trunk/wps_wp_query.php
r2133014 r3444371 1 1 <?php 2 2 if ( ! defined( 'ABSPATH' ) ) exit; 3 4 /** 5 * Get and validate nonce from POST. 6 * 7 * @param string $action Nonce action. 8 * @return bool True if nonce exists and is valid, false otherwise. 9 */ 10 function wps_vc_verify_post_nonce( $action ) { 11 if ( ! isset( $_POST['_wpnonce'] ) ) { 12 return false; 13 } 14 15 $nonce = sanitize_text_field( wp_unslash( $_POST['_wpnonce'] ) ); 16 return (bool) wp_verify_nonce( $nonce, $action ); 17 } 18 19 // phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verification happens via wps_vc_verify_post_nonce() function. 3 20 if (isset($_POST['reset_wpsvc'])) { 4 $retrieved_nonce = $_POST['_wpnonce']; 5 if (wp_verify_nonce($retrieved_nonce, 'wps_table_reset')) { 21 if (!current_user_can('manage_options')) { 22 wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'wps-visitor-counter' ) ); 23 } 24 if ( wps_vc_verify_post_nonce( 'wps_table_reset' ) ) { 6 25 wps_visitor_counter_truncate(); 7 26 } … … 9 28 } 10 29 if (isset($_POST['style_setting'])) { 11 $retrieved_nonce = $_POST['_wpnonce']; 12 if (wp_verify_nonce($retrieved_nonce, 'wps_my_front_end_style')) { 30 if (!current_user_can('manage_options')) { 31 wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'wps-visitor-counter' ) ); 32 } 33 if ( wps_vc_verify_post_nonce( 'wps_my_front_end_style' ) ) { 13 34 $image_styel=""; 14 35 $powerd_by= 0 ; 15 36 if (isset($_POST['wps_visitor_counter_style'])) { 16 $image_styel =sanitize_text_field($_POST['wps_visitor_counter_style']);37 $image_styel = sanitize_text_field( wp_unslash( $_POST['wps_visitor_counter_style'] ) ); 17 38 } 18 39 if (isset($_POST['wps_visitor_counter_attribution'])) { … … 20 41 } 21 42 $id = 1; 22 $sql = $wpdb->prepare("UPDATE `".WPS_VC_OPTIONS_TABLE_NAME."` SET `show_powered_by` = %d, `style` = %s WHERE `id` = %d;",$powerd_by,$image_styel,$id); 23 wps_update_query($sql); 43 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name cannot be a placeholder. 44 $prepared_sql = $wpdb->prepare( "UPDATE `" . WPS_VC_OPTIONS_TABLE_NAME . "` SET `show_powered_by` = %d, `style` = %s WHERE `id` = %d;", $powerd_by, $image_styel, $id ); 45 wps_update_query( $prepared_sql ); 24 46 } 25 47 } 26 48 if (isset($_POST['wps_view_setting'])) { 27 $retrieved_nonce = $_POST['_wpnonce']; 28 if (wp_verify_nonce($retrieved_nonce, 'wps_my_front_end_setting')) { 49 if (!current_user_can('manage_options')) { 50 wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'wps-visitor-counter' ) ); 51 } 52 if ( wps_vc_verify_post_nonce( 'wps_my_front_end_setting' ) ) { 29 53 30 54 31 55 $wps_visitor_title=""; 32 56 if (isset($_POST['wps_visitor_title'])) { 33 $wps_visitor_title =sanitize_text_field($_POST['wps_visitor_title']);57 $wps_visitor_title = sanitize_text_field( wp_unslash( $_POST['wps_visitor_title'] ) ); 34 58 } 35 59 $wps_visitor_font_color= "#ffffff" ; 36 60 if (isset($_POST['wps_visitor_font_color'])) { 37 $wps_visitor_font_color =sanitize_hex_color($_POST['wps_visitor_font_color']);61 $wps_visitor_font_color = sanitize_hex_color( wp_unslash( $_POST['wps_visitor_font_color'] ) ); 38 62 } 39 63 if (isset($_POST['wps_visitor_user_start']) && $_POST['wps_visitor_user_start'] != "") { … … 126 150 $wps_visitor_wpsvc_align= "wps_visitor_wpsvc_align" ; 127 151 if (isset($_POST['wps_visitor_wpsvc_align'])) { 128 $wps_visitor_wpsvc_align = sanitize_text_field( $_POST['wps_visitor_wpsvc_align']);152 $wps_visitor_wpsvc_align = sanitize_text_field( wp_unslash( $_POST['wps_visitor_wpsvc_align'] ) ); 129 153 } 130 154 $id = 1; 131 $sql = "UPDATE `".WPS_VC_OPTIONS_TABLE_NAME."` SET `"; 132 $sql .= "visitor_title` = %s,"; 133 $sql .= "`font_color` = %s,"; 134 $sql .= "`user_start` = %d,"; 135 $sql .= "`views_start` = %d,"; 136 $sql .= "`display_field` = %s,"; 137 $sql .= "`visitor_wpsvc_align` = %s"; 138 $sql .= "WHERE `id` = %d;"; 139 $sql = $wpdb->prepare($sql,$wps_visitor_title,$wps_visitor_font_color,$wps_visitor_user_start,$wps_visitor_views_start,$wps_display_field_setting,$wps_visitor_wpsvc_align,$id); 140 wps_update_query($sql); 155 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name cannot be a placeholder. 156 $prepared_sql = $wpdb->prepare( 157 "UPDATE `" . WPS_VC_OPTIONS_TABLE_NAME . "` SET `visitor_title` = %s, `font_color` = %s, `user_start` = %d, `views_start` = %d, `display_field` = %s, `visitor_wpsvc_align` = %s WHERE `id` = %d;", // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 158 $wps_visitor_title, 159 $wps_visitor_font_color, 160 $wps_visitor_user_start, 161 $wps_visitor_views_start, 162 $wps_display_field_setting, 163 $wps_visitor_wpsvc_align, 164 $id 165 ); 166 wps_update_query( $prepared_sql ); 141 167 142 168 } 143 169 } 170 // phpcs:enable WordPress.Security.NonceVerification.Missing 144 171 145 172 … … 147 174 function wps_update_query($sql){ 148 175 global $wpdb; 149 $reault = $wpdb->query($sql); 176 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,PluginCheck.Security.DirectDB.UnescapedDBParameter -- $sql is prepared by the caller. 177 $wpdb->query( $sql ); 150 178 return true; 151 179 } 152 180 function wps_visitor_counter_truncate() { 153 181 global $wpdb; 154 if ( $wpdb->get_var('SHOW TABLES LIKE "' . WPS_VC_TABLE_NAME . '"') == WPS_VC_TABLE_NAME ) { 155 $sql = "TRUNCATE `". WPS_VC_TABLE_NAME . "`;"; 156 $wpdb->query($sql); 182 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Table name is a constant; direct query needed for table operations. 183 if ( $wpdb->get_var( 'SHOW TABLES LIKE "' . WPS_VC_TABLE_NAME . '"' ) == WPS_VC_TABLE_NAME ) { 184 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Table name is a constant; TRUNCATE requires direct query. 185 $wpdb->query( "TRUNCATE `" . WPS_VC_TABLE_NAME . "`;" ); 157 186 } 158 187 } … … 160 189 function wps_visitor_option_data($id){ 161 190 global $wpdb; 162 $sql = $wpdb->prepare("SELECT * FROM `".WPS_VC_OPTIONS_TABLE_NAME."` WHERE `id` = %d",$id); 163 $result = $wpdb->get_results($sql,ARRAY_A); 191 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name cannot be a placeholder. 192 $prepared_sql = $wpdb->prepare( "SELECT * FROM `" . WPS_VC_OPTIONS_TABLE_NAME . "` WHERE `id` = %d", $id ); 193 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- $prepared_sql is prepared above; caching not needed for options data. 194 $result = $wpdb->get_results( $prepared_sql, ARRAY_A ); 164 195 return $result[0]; 165 196 } 166 197 function wps_visitor_counter_activation_hook(){ 167 198 global $wpdb; 168 if ( $wpdb->get_var('SHOW TABLES LIKE "' . WPS_VC_TABLE_NAME . '"') != WPS_VC_TABLE_NAME ) { 199 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Table name is a constant; direct query needed for table existence check during activation. 200 if ( $wpdb->get_var( 'SHOW TABLES LIKE "' . WPS_VC_TABLE_NAME . '"' ) != WPS_VC_TABLE_NAME ) { 169 201 $sql = ""; 202 $charset_collate = $wpdb->get_charset_collate(); 170 203 $sql = "CREATE TABLE IF NOT EXISTS `". WPS_VC_TABLE_NAME . "` ("; 171 $sql .= "`ip` varchar( 20) NOT NULL default '',";204 $sql .= "`ip` varchar(45) NOT NULL default '',"; 172 205 $sql .= "`date` date NOT NULL,"; 173 $sql .= "`views` int(10) NOT NULL default '1',";206 $sql .= "`views` int(10) UNSIGNED NOT NULL default '1',"; 174 207 $sql .= "`online` varchar(255) NOT NULL,"; 175 208 $sql .= "PRIMARY KEY (`ip`,`date`)"; 176 $sql .= ") ENGINE=MyISAM DEFAULT CHARSET=latin1;"; 177 $wpdb->query($sql); 178 } 179 if ( $wpdb->get_var('SHOW TABLES LIKE "' . WPS_VC_OPTIONS_TABLE_NAME . '"') != WPS_VC_OPTIONS_TABLE_NAME ) { 209 $sql .= ") ENGINE=InnoDB $charset_collate;"; 210 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,PluginCheck.Security.DirectDB.UnescapedDBParameter -- Table creation during activation requires direct query. 211 $wpdb->query( $sql ); 212 } 213 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Table name is a constant; direct query needed for table existence check during activation. 214 if ( $wpdb->get_var( 'SHOW TABLES LIKE "' . WPS_VC_OPTIONS_TABLE_NAME . '"' ) != WPS_VC_OPTIONS_TABLE_NAME ) { 180 215 $sql = ""; 216 $charset_collate = $wpdb->get_charset_collate(); 181 217 $sql = "CREATE TABLE IF NOT EXISTS `". WPS_VC_OPTIONS_TABLE_NAME . "` ("; 182 $sql .= "`id` INT(10) NOT NULL AUTO_INCREMENT,";218 $sql .= "`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,"; 183 219 $sql .= "`display_field` VARCHAR(600) NOT NULL default ',today_user,yesterday_user,last7_day_user,last30_day_user,month_user,year_user,total_user,today_view,yesterday_view,last7_day_view,last30_day_view,month_view,year_view,total_view,online_view,ip_display,server_time',"; 184 $sql .= "`show_powered_by` INT(1)NOT NULL DEFAULT '1',";185 $sql .= "`font_color` VARCHAR( 25) NOT NULL DEFAULT '#000000',";220 $sql .= "`show_powered_by` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',"; 221 $sql .= "`font_color` VARCHAR(7) NOT NULL DEFAULT '#000000',"; 186 222 $sql .= "`style` VARCHAR(25) NOT NULL DEFAULT 'text/effect-white',"; 187 223 $sql .= "`visitor_title` VARCHAR(255) NOT NULL default 'Our Visitor',"; 188 $sql .= "`user_start` INT( 255)NOT NULL DEFAULT '1',";189 $sql .= "`views_start` INT( 255)NOT NULL DEFAULT '1',";190 $sql .= "`visitor_wpsvc_align` VARCHAR(25) NOT NULL DEFAULT ' wps_visitor_wpsvc_align',";224 $sql .= "`user_start` INT(10) UNSIGNED NOT NULL DEFAULT '1',"; 225 $sql .= "`views_start` INT(10) UNSIGNED NOT NULL DEFAULT '1',"; 226 $sql .= "`visitor_wpsvc_align` VARCHAR(25) NOT NULL DEFAULT 'center',"; 191 227 $sql .= "PRIMARY KEY (`id`)"; 192 $sql .= ") ENGINE=MyISAM DEFAULT CHARSET=latin1;"; 193 $wpdb->query($sql); 194 $sql = $wpdb->prepare("INSERT INTO `". WPS_VC_OPTIONS_TABLE_NAME . "`(`id`) VALUES (%d)",1); 195 $wpdb->query($sql); 228 $sql .= ") ENGINE=InnoDB $charset_collate;"; 229 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,PluginCheck.Security.DirectDB.UnescapedDBParameter -- Table creation during activation requires direct query. 230 $wpdb->query( $sql ); 231 232 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table name cannot be a placeholder. 233 $prepared_sql = $wpdb->prepare( "INSERT INTO `" . WPS_VC_OPTIONS_TABLE_NAME . "`(`id`) VALUES (%d)", 1 ); 234 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,PluginCheck.Security.DirectDB.UnescapedDBParameter -- $prepared_sql is prepared above; direct query needed for initial data insertion during activation. 235 $wpdb->query( $prepared_sql ); 196 236 197 237 }
Note: See TracChangeset
for help on using the changeset viewer.