Version Description
- Compatibility the ChartJs with some kind of plugins.
- Compatibility with WordPress v5.6
- Improvement error handling with REST API
- Added an option in the Optimization page to optimize & repair the tables.
- Added ability to filter
wp_statistics_get_top_pages()
by post type #343 - Fixed the issue to load Purge class.
- Minor Improvements in SQL queries.
Download this release
Release Info
Developer | mostafa.s1990 |
Plugin | WP Statistics |
Version | 13.0.5 |
Comparing to | |
See all releases |
Code changes from version 13.0.4 to 13.0.5
- assets/css/admin.min.css +1 -1
- assets/dev/javascript/meta-box.js +5 -1
- assets/dev/sass/component/table.scss +5 -4
- assets/js/admin.min.js +1 -1
- includes/admin/class-wp-statistics-admin-assets.php +1 -1
- includes/admin/class-wp-statistics-admin-notices.php +16 -8
- includes/admin/pages/class-wp-statistics-admin-page-optimization.php +67 -1
- includes/admin/templates/optimization/database.php +43 -1
- includes/api/v2/class-wp-statistics-api-hit.php +14 -26
- includes/api/v2/class-wp-statistics-api-meta-box.php +20 -11
- includes/class-wp-statistics-db.php +1 -1
- includes/{admin/class-wp-statistics-admin-purge.php → class-wp-statistics-purge.php} +0 -0
- includes/class-wp-statistics.php +1 -1
- includes/template-functions.php +9 -5
- readme.txt +11 -3
- wp-statistics.php +1 -1
assets/css/admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wps-text-danger{color:#DC3545 !important}.wps-text-success{color:#459605 !important}.wps-text-warning{color:#dc6b26 !important}.wps-text-muted{color:#797979 !important}.wps-center{text-align:center !important}.wps-d-none{display:none}.wps-d-inline-block{display:inline-block}.wps-middle-vertical{vertical-align:middle}a[href*='?page=wps_break_menu']{pointer-events:none}.wps-cursor-default{cursor:default}.wp-core-ui .btn-danger{background:rgba(186,0,0,0.74);border-color:rgba(170,0,0,0.77) rgba(153,0,0,0.74) rgba(153,0,0,0.74);box-shadow:0 1px 0 rgba(153,0,0,0.74);color:#fff;text-decoration:none;text-shadow:0 -1px 1px rgba(153,0,0,0.74),1px 0 1px rgba(153,0,0,0.74),0 1px 1px rgba(153,0,0,0.74),-1px 0 1px rgba(153,0,0,0.74)}.wp-core-ui .btn-danger:hover{background:#c20000;border-color:#990000;color:#fff}.wp-core-ui .btn-danger:active{background:rgba(170,0,0,0.75);border-color:rgba(153,0,0,0.74);box-shadow:inset 0 2px 0 rgba(153,0,0,0.75)}.wp-core-ui .btn-danger:focus{box-shadow:0 1px 0 rgba(170,0,0,0.75),0 0 2px 1px rgba(219,51,51,0.75);background:rgba(194,0,0,0.75);border-color:rgba(153,0,0,0.75);color:#fff;outline:0 !important}.wps-btn-inline{vertical-align:-2px;margin:0px 5px}.wps-m-top-20{margin-top:20px}.wps-text-wrap{display:inline-block;overflow:hidden;white-space:nowrap;width:100% !important}.wps-width-100{width:100% !important}.wps-200-px{width:200px !important}.wps-inline{display:inline}.wps_page_title{display:inline-block;vertical-align:-15px;margin-top:10px;margin-bottom:10px;margin-right:5px}.wps_title{display:inline;font-size:1.6em}.wp-statistics-container{margin:0 auto}.wps-pull-right{float:right}.wps-pull-left{float:left}@media print{#wpadminbar,#adminmenuback,#adminmenuwrap,#show-settings-link{display:none}#wpcontent,#wpfooter{margin-left:0px}}#wpadminbar #wp-admin-bar-wp-statistic-menu .ab-icon:before{content:'\f184';top:2px}.pagination-wrap{clear:both;display:block;overflow:hidden;text-align:center;margin-top:25px}.pagination-wrap .wps-page-number{color:#148e00;direction:rtl;margin-top:4px}.pagination-wrap .page-numbers li{margin-bottom:0;display:inline-block}.pagination-wrap .page-numbers li a,.pagination-wrap .pagination-wrap .page-numbers li span{display:inline-block;padding:6px 12px;margin-right:4px;border-radius:3px;border:solid 1px #c0c0c0;background:#e9e9e9;box-shadow:inset 0px 1px 0px rgba(255,255,255,0.8),0px 1px 3px rgba(0,0,0,0.1);font-size:.875em;font-weight:bold;text-decoration:none;color:#717171;text-shadow:0px 1px 0px #fff}.pagination-wrap .page-numbers>li>a:hover,.pagination-wrap .page-numbers>li>span:hover,.pagination-wrap .page-numbers>li>a:focus,.pagination-wrap .page-numbers>li>span:focus{background:#fefefe;background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#FEFEFE), to(#f0f0f0));background:-moz-linear-gradient(#FEFEFE, #f0f0f0)}.pagination-wrap .page-numbers li .current{border:none;background:#616161 !important;box-shadow:inset 0px 0px 8px rgba(0,0,0,0.5),0px 1px 0px rgba(255,255,255,0.8) !important;color:#f0f0f0;text-shadow:0px 0px 3px rgba(0,0,0,0.5);padding:7.5px 14px;vertical-align:-1.5px;margin:-8px 5px -5px 5px;border-radius:5px}i.mce-i-icon-statistic{font:400 20px/1 dashicons;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding-right:2px}.wp-statistic-mce-desc{color:#b1b1b1 !important;margin-left:82px !important}html[dir="rtl"] .wp-statistic-mce-desc{text-align:right !important;margin:0 82px 0px 0px !important}.wps-gutenberg-chart-js{height:350px}.wps_loading_box{width:100%;text-align:center;min-height:65px;padding-top:15px}.wps-more span,.wps-refresh span{transition:transform .6s ease-in-out;-webkit-transition:-webkit-transform .6s ease-in-out}.wps-more:hover span,.wps-refresh:hover span{color:#00a0d2}.wps-refresh:hover span{transform:rotate(360deg);-webkit-transform:rotate(360deg);color:#00a0d2}.button-link.wps-more,.button-link.wps-refresh{text-decoration:none !important}.wps-postbox-full{width:100%;float:left;margin-right:20px}#wps-big-postbox{width:100%;direction:ltr;margin-top:5px}.log-url{direction:ltr;float:left;font-size:10px;margin:0 0 0 2px;white-space:nowrap;width:100%;overflow:hidden;text-overflow:ellipsis}#wp_statistics_editor_meta_box,#wp-statistics-browsers-widget,#wp-statistics-countries-widget,#wp-statistics-hitsmap-widget,#wp-statistics-hits-widget,#wp-statistics-pages-widget,#wp-statistics-recent-widget,#wp-statistics-referring-widget,#wp-statistics-search-widget,#wp-statistics-summary-widget,#wp-statistics-words-widget,#wp-statistics-top-visitors-widget,#wps_hits_postbox,#wps_top_visitors_postbox,#wps_search_postbox,#wps_words_postbox,#wps_recent_postbox,#wps_map_postbox,#wps_pages_postbox,#wps_summary_postbox,#wps_browsers_postbox,#wps_referring_postbox,#wps_countries_postbox,#wps_words_postbox{overflow:hidden}#time_zone a{font-size:11px;text-decoration:none}#about-links{margin:0 0 10px}#about-links p{display:inline;font-size:12px;margin:0 2px;font-style:italic}.left-div{float:left}.right-div{float:right}#donate-text{float:left}#donate-button{float:right;margin:-2px 0 0 0}#donate-button a{height:23px;line-height:22px}.wp-statistics-sub-fullwidth{width:100%}.wp-statistics-responsive-table{overflow-x:auto}.wps-postbox-veronalabs{margin:18px 0 0 0}.wps-postbox-veronalabs img{width:116px}.wps-btn-group{text-align:center;margin:25px auto}.wps-btn-group .btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wps-btn-group .btn:focus,.wps-btn-group .btn:active:focus,.wps-btn-group .btn.active:focus,.wps-btn-group .btn.focus,.wps-btn-group .btn:active.focus,.wps-btn-group .btn.active.focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.wps-btn-group .btn:hover,.wps-btn-group .btn:focus,.wps-btn-group .btn.focus{color:#333333;text-decoration:none}.wps-btn-group .btn:active,.wps-btn-group .btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wps-btn-group .btn.disabled,.wps-btn-group .btn[disabled],.wps-btn-group fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);opacity:0.65;-webkit-box-shadow:none;box-shadow:none}.wps-btn-group a.btn.disabled,.wps-btn-group fieldset[disabled] a.btn{pointer-events:none}.wps-btn-group .btn-default{color:#333333;background-color:#ffffff;border-color:#e0e0e0}.wps-btn-group .btn-default:focus,.wps-btn-group .btn-default.focus{color:#333333;background-color:#e6e6e6;border-color:#8c8c8c}.wps-btn-group .btn-default:hover{color:#333333;background-color:#e6e6e6;border-color:#adadad}.wps-btn-group .btn-default:active,.wps-btn-group .btn-default.active,.wps-btn-group .open>.dropdown-toggle.btn-default{color:#333333;background-color:#e6e6e6;background-image:none;border-color:#adadad}.wps-btn-group .btn-default:active:hover,.wps-btn-group .btn-default.active:hover,.wps-btn-group .open>.dropdown-toggle.btn-default:hover,.wps-btn-group .btn-default:active:focus,.wps-btn-group .btn-default.active:focus,.wps-btn-group .open>.dropdown-toggle.btn-default:focus,.wps-btn-group .btn-default:active.focus,.wps-btn-group .btn-default.active.focus,.wps-btn-group .open>.dropdown-toggle.btn-default.focus{color:#333333;background-color:#d4d4d4;border-color:#8c8c8c}.wps-btn-group .btn-default.disabled:hover,.wps-btn-group .btn-default[disabled]:hover,.wps-btn-group fieldset[disabled] .btn-default:hover,.wps-btn-group .btn-default.disabled:focus,.wps-btn-group .btn-default[disabled]:focus,.wps-btn-group fieldset[disabled] .btn-default:focus,.wps-btn-group .btn-default.disabled.focus,.wps-btn-group .btn-default[disabled].focus,.wps-btn-group fieldset[disabled] .btn-default.focus{background-color:#ffffff;border-color:#cccccc}.wps-btn-group .btn-default .badge{color:#ffffff;background-color:#333333}.wps-btn-group .btn-primary{color:#ffffff;background-color:#00a0d2;border-color:#00A0D2}.wps-btn-group .btn-primary:focus,.wps-btn-group .btn-primary.focus{color:#ffffff;background-color:#286090;border-color:#122b40}.wps-btn-group .btn-primary:hover{color:#ffffff;background-color:#286090;border-color:#204d74}.wps-btn-group .btn-primary:active,.wps-btn-group .btn-primary.active,.wps-btn-group .open>.dropdown-toggle.btn-primary{color:#ffffff;background-color:#286090;background-image:none;border-color:#204d74}.wps-btn-group .btn-primary:active:hover,.wps-btn-group .btn-primary.active:hover,.wps-btn-group .open>.dropdown-toggle.btn-primary:hover,.wps-btn-group .btn-primary:active:focus,.wps-btn-group .btn-primary.active:focus,.wps-btn-group .open>.dropdown-toggle.btn-primary:focus,.wps-btn-group .btn-primary:active.focus,.wps-btn-group .btn-primary.active.focus,.wps-btn-group .open>.dropdown-toggle.btn-primary.focus{color:#ffffff;background-color:#204d74;border-color:#122b40}.wps-btn-group .btn-primary.disabled:hover,.wps-btn-group .btn-primary[disabled]:hover,.wps-btn-group fieldset[disabled] .btn-primary:hover,.wps-btn-group .btn-primary.disabled:focus,.wps-btn-group .btn-primary[disabled]:focus,.wps-btn-group fieldset[disabled] .btn-primary:focus,.wps-btn-group .btn-primary.disabled.focus,.wps-btn-group .btn-primary[disabled].focus,.wps-btn-group fieldset[disabled] .btn-primary.focus{background-color:#337ab7;border-color:#2e6da4}.wps-btn-group .btn-primary .badge{color:#337ab7;background-color:#ffffff}.wps-btn-group .btn-danger{color:#ffffff;background-color:#d9534f;border-color:#d43f3a}.wps-btn-group .btn-danger:focus,.wps-btn-group .btn-danger.focus{color:#ffffff;background-color:#c9302c;border-color:#761c19}.wps-btn-group .btn-danger:hover{color:#ffffff;background-color:#c9302c;border-color:#ac2925}.wps-btn-group .btn-danger:active,.wps-btn-group .btn-danger.active,.wps-btn-group .open>.dropdown-toggle.btn-danger{color:#ffffff;background-color:#c9302c;background-image:none;border-color:#ac2925}.wps-btn-group .btn-danger:active:hover,.wps-btn-group .btn-danger.active:hover,.wps-btn-group .open>.dropdown-toggle.btn-danger:hover,.wps-btn-group .btn-danger:active:focus,.wps-btn-group .btn-danger.active:focus,.wps-btn-group .open>.dropdown-toggle.btn-danger:focus,.wps-btn-group .btn-danger:active.focus,.wps-btn-group .btn-danger.active.focus,.wps-btn-group .open>.dropdown-toggle.btn-danger.focus{color:#ffffff;background-color:#ac2925;border-color:#761c19}.wps-btn-group .btn-danger.disabled:hover,.wps-btn-group .btn-danger[disabled]:hover,.wps-btn-group fieldset[disabled] .btn-danger:hover,.wps-btn-group .btn-danger.disabled:focus,.wps-btn-group .btn-danger[disabled]:focus,.wps-btn-group fieldset[disabled] .btn-danger:focus,.wps-btn-group .btn-danger.disabled.focus,.wps-btn-group .btn-danger[disabled].focus,.wps-btn-group fieldset[disabled] .btn-danger.focus{background-color:#d9534f;border-color:#d43f3a}.wps-btn-group .btn-danger .badge{color:#d9534f;background-color:#ffffff}.wps-btn-group .btn-link{font-weight:400;color:#337ab7;border-radius:0}.wps-btn-group .btn-link,.wps-btn-group .btn-link:active,.wps-btn-group .btn-link.active,.wps-btn-group .btn-link[disabled],.wps-btn-group fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.wps-btn-group .btn-link,.wps-btn-group .btn-link:hover,.wps-btn-group .btn-link:focus,.wps-btn-group .btn-link:active{border-color:transparent}.wps-btn-group .btn-link:hover,.wps-btn-group .btn-link:focus{color:#23527c;text-decoration:underline;background-color:transparent}.wps-btn-group .btn-link[disabled]:hover,.wps-btn-group fieldset[disabled] .btn-link:hover,.wps-btn-group .btn-link[disabled]:focus,.wps-btn-group fieldset[disabled] .btn-link:focus{color:#777777;text-decoration:none}.wps-btn-group .btn-block{display:block;width:100%}.wps-btn-group .btn-block+.btn-block{margin-top:5px}.wps-btn-group input[type="submit"].btn-block,.wps-btn-group input[type="reset"].btn-block,.wps-btn-group input[type="button"].btn-block{width:100%}.wps-btn-group .btn-group,.wps-btn-group .btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.wps-btn-group .btn-group>.btn,.wps-btn-group .btn-group-vertical>.btn{position:relative;float:left}.wps-btn-group .btn-group>.btn:hover,.wps-btn-group .btn-group-vertical>.btn:hover,.wps-btn-group .btn-group>.btn:focus,.wps-btn-group .btn-group-vertical>.btn:focus,.wps-btn-group .btn-group>.btn:active,.wps-btn-group .btn-group-vertical>.btn:active,.wps-btn-group .btn-group>.btn.active,.wps-btn-group .btn-group-vertical>.btn.active{z-index:2}.wps-btn-group .btn-group .btn+.btn,.wps-btn-group .btn-group .btn+.btn-group,.wps-btn-group .btn-group .btn-group+.btn,.wps-btn-group .btn-group .btn-group+.btn-group{margin-left:-1px}.wps-btn-group .btn-toolbar{margin-left:-5px}.wps-btn-group .btn-toolbar .btn,.wps-btn-group .btn-toolbar .btn-group,.wps-btn-group .btn-toolbar .input-group{float:left}.wps-btn-group .btn-toolbar>.btn,.wps-btn-group .btn-toolbar>.btn-group,.wps-btn-group .btn-toolbar>.input-group{margin-left:5px}.wps-btn-group .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.wps-btn-group .btn-group>.btn:first-child{margin-left:0}.wps-btn-group .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.wps-btn-group .btn-group>.btn:last-child:not(:first-child),.wps-btn-group .btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.wps-btn-group .btn-group>.btn-group{float:left}.wps-btn-group .btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.wps-btn-group .btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.wps-btn-group .btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.wps-btn-group .btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.wps-btn-group .btn-group .dropdown-toggle:active,.wps-btn-group .btn-group.open .dropdown-toggle{outline:0}.wps-btn-group .btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.wps-btn-group .btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.wps-btn-group .btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wps-btn-group .btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.wps-btn-group .btn .caret{margin-left:0}.wps-btn-group .btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.wps-btn-group .dropup .btn-lg .caret{border-width:0 5px 5px}.wps-btn-group .btn-group-vertical>.btn,.wps-btn-group .btn-group-vertical>.btn-group,.wps-btn-group .btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.wps-btn-group .btn-group-vertical>.btn-group>.btn{float:none}.wps-btn-group .btn-group-vertical>.btn+.btn,.wps-btn-group .btn-group-vertical>.btn+.btn-group,.wps-btn-group .btn-group-vertical>.btn-group+.btn,.wps-btn-group .btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.wps-btn-group .btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.wps-btn-group .btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.wps-btn-group .btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.wps-btn-group .btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.wps-btn-group .btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.wps-btn-group .btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.wps-btn-group .btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.wps-btn-group .btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.wps-btn-group .btn-group-justified>.btn,.wps-btn-group .btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.wps-btn-group .btn-group-justified>.btn-group .btn{width:100%}.wps-btn-group .btn-group-justified>.btn-group .dropdown-menu{left:auto}.wps-btn-group [data-toggle="buttons"]>.btn input[type="radio"],.wps-btn-group [data-toggle="buttons"]>.btn-group>.btn input[type="radio"],.wps-btn-group [data-toggle="buttons"]>.btn input[type="checkbox"],.wps-btn-group [data-toggle="buttons"]>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.wps-btn-group .clearfix:before,.wps-btn-group .clearfix:after,.wps-btn-group .btn-toolbar:before,.wps-btn-group .btn-toolbar:after,.wps-btn-group .btn-group-vertical>.btn-group:before,.wps-btn-group .btn-group-vertical>.btn-group:after{display:table;content:" "}.wps-btn-group .clearfix:after,.wps-btn-group .btn-toolbar:after,.wps-btn-group .btn-group-vertical>.btn-group:after{clear:both}.wps-btn-group .center-block{display:block;margin-right:auto;margin-left:auto}.wps-btn-group .pull-right{float:right !important}.wps-btn-group .pull-left{float:left !important}.wps-btn-group .hide{display:none !important}div[data-chart-date-picker]{text-align:center;margin-bottom:20px;transition:1s all}div[data-chart-date-picker] input{margin:0px 8px;border-radius:5px;box-shadow:none;padding:5px}div[data-chart-date-picker] input[type=submit]{vertical-align:2px}.wps-ph-item{position:relative;display:flex;flex-wrap:wrap;overflow:hidden;background-color:#fff;direction:ltr}.wps-ph-item,.wps-ph-item *,.wps-ph-item ::after,.wps-ph-item ::before{box-sizing:border-box}.wps-ph-item::before{content:" ";position:absolute;top:0;right:0;bottom:0;left:50%;z-index:1;width:500%;margin-left:-250%;animation:phAnimation 1s linear infinite;background:linear-gradient(to right, rgba(255,255,255,0) 46%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 54%) 50% 50%}.wps-ph-item>*{flex:1 1 auto;display:flex;flex-flow:column;padding-right:10px;padding-left:10px}.wps-ph-row{display:flex;flex-wrap:wrap;margin-bottom:7.5px}.wps-ph-row div{height:15px;margin-bottom:7.5px;background-color:#dee4ea}.wps-ph-row .big,.wps-ph-row.big div{height:20px;margin-bottom:15px}.wps-ph-row .empty{background-color:rgba(255,255,255,0)}.wps-ph-col-2{flex:0 0 16.66667%}.wps-ph-col-4{flex:0 0 33.33333%}.wps-ph-col-6{flex:0 0 50%}.wps-ph-col-8{flex:0 0 66.66667%}.wps-ph-col-10{flex:0 0 83.33333%}.wps-ph-col-12{flex:0 0 100%}.wps-ph-avatar{position:relative;width:100%;min-width:60px;background-color:#dee4ea;margin-bottom:15px;border-radius:50%;overflow:hidden}.wps-ph-avatar::before{content:" ";display:block;padding-top:100%}.wps-ph-picture{width:100%;height:120px;background-color:#dee4ea;margin-bottom:15px}@keyframes phAnimation{0%{transform:translate3d(-30%, 0, 0)}100%{transform:translate3d(30%, 0, 0)}}.wps-text-placeholder{width:90px;height:25px;margin:0px auto}.wps-badge{display:inline-block;min-width:8px;padding:3px 7px;font-size:12px;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:1px;background-color:#DC3545;border-radius:10px}#post-stats{border:none}#th-colspan{text-align:center}#th-colspan span{color:#459605 !important;font-size:30px}#last-visitor tr{text-align:center}#last-visitor tr:first-child{background:none repeat scroll 0 0 #EEEEEE;font-weight:bold;text-align:center}#last-search tr{text-align:center}#last-search tr:first-child{background:none repeat scroll 0 0 #EEEEEE;font-weight:bold;text-align:center}table.wps-table-fixed{table-layout:fixed;width:100%}.wps-report-table tr{text-align:left}.wps-report-table tr:first-child{background:none repeat scroll 0 0 #EEEEEE;font-weight:bold;text-align:center}.th-center{text-align:center !important}.td-align{text-align:left}.td-url{color:#009936 !important;direction:ltr;font-size:10px !important;text-align:left;white-space:nowrap}.log-item{border-bottom:1px solid #efeeee;border-top:1px solid #FFFFFF;min-height:46px;padding:3px 7px}.log-item:hover{background:none repeat scroll 0 0 #f7f7f7}.show-map{float:left}.log-referred{float:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:auto}.log-page-title{float:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.log-ip{direction:ltr;float:right;font-size:10px;margin-bottom:5px;white-space:pre;overflow:hidden;text-overflow:ellipsis;text-align:right}.log-tools{float:left;margin:0 2px}.log-agent{float:left}.ui-sortable{min-height:100px}.table-stats tr,.table-stats td{border-bottom:1px solid #efeeee;background-color:white;transition:1s all}.table-stats tr:last-child td{border-bottom:0px}.table-stats tr:hover:not(:first-child) td{background-color:rgba(241,241,241,0.65) !important}.table-stats tr:first-child td{border:0px none;text-align:left}.rtl .table-stats.left-align tr,.rtl .table-stats.left-align td{text-align:left !important}.rtl .table-stats tr,.rtl .table-stats td{text-align:right !important}.rtl .table-stats .log-tools{float:right}.rtl .table-stats .th-center{text-align:center !important}.table-stats{border:0px none !important}#visits-log{direction:ltr;height:290px;width:100%}#search-engine-log{direction:ltr}#platform-log{direction:ltr}#visits-stats{direction:ltr}#exclusion-stats{direction:ltr}#search-stats{direction:ltr}#page-stats{direction:ltr}.wp-statistics-settings .widefat{float:left}.wp-statistics-settings .note{color:#FF0000;font-size:11px !important;font-weight:bold}.wp-statistics-settings .postbox-container{margin-top:51px}.wp-statistics-settings ul.tabs{margin:0;padding:0;list-style:none}.wp-statistics-settings ul.tabs li{background:none;color:#222;display:inline-block;padding:10px 8px;cursor:pointer;border:1px solid #f1f1f1;margin:0}.wp-statistics-settings ul.tabs li.current{background:#ffffff;color:#222;border-right-color:#e5e5e5;border-left-color:#e5e5e5;border-bottom-color:#ffffff;border-top-color:#e5e5e5;padding-bottom:11px}.wp-statistics-settings .tab-content{display:none;background:#ffffff;padding:15px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,0.04);margin:-1px 0 0 0}.wp-statistics-settings .tab-content.current{display:inherit}.wp-statistics-settings #update_geoip{margin-left:5px;margin-top:-5px;line-height:19px;font-size:12px;height:25px}@media only screen and (max-width: 1327px){.wp-statistics-settings ul.tabs li{padding:10px 5px}}.wp-statistics-plugins .widefat>*{float:left}.wp-statistics-plugins .widefat .plugin-card{position:relative}.wp-statistics-plugins .widefat .plugin-card .desc,.wp-statistics-plugins .widefat .plugin-card .name{margin-right:0}.wp-statistics-plugins .widefat .plugin-card-bottom{float:initial}.wp-statistics-plugins .widefat .column-downloaded p{margin:2px 0 0 0}.wp-statistics-plugins .column-price{display:inline;margin:0 8px;font-size:15px;color:#589616}.wp-statistics-plugins .plugin-card .cover-ribbon{height:115px;width:115px;position:absolute;left:-8px;top:-7px;overflow:hidden}.wp-statistics-plugins .plugin-card .cover-ribbon .cover-ribbon-inside{background:#EA4335;color:#FFF;transform:rotate(-45deg);position:absolute;left:-35px;top:16px;padding:10px;min-width:127px;text-align:center;z-index:9}.wp-statistics-plugins .plugin-card .cover-ribbon .cover-ribbon-inside:before{width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:10px solid #992C23;position:absolute;left:-5px;bottom:0;content:"";top:34px;transform:rotate(-45deg)}.wp-statistics-plugins .plugin-card .cover-ribbon .cover-ribbon-inside:after{width:0;height:0;border-top:7px solid transparent;border-left:7px solid #992C23;border-bottom:7px solid transparent;position:absolute;top:33px;bottom:0;right:4px;content:"";transform:rotate(-45deg)}.wp-statistics-welcome .wp-badge{background-image:url("../images/logo-250-white.png");background-color:#1aabec}.wp-statistics-welcome .nav-tab.donate{background-color:#459605;color:#ffffff}.wp-statistics-welcome .tab-content{display:none}.wp-statistics-welcome .tab-content.current{display:block}.wp-statistics-welcome ul li{margin:0 31px}.wp-statistics-welcome ul{list-style-type:square;line-height:28px;margin:0 0 20px 0}.wp-statistics-welcome img{width:auto}.wp-statistics-welcome .center-section{padding:41px 0 60px;clear:both;text-align:center}.wp-statistics-welcome .normal-section .left{float:left;width:50%;text-align:left}.wp-statistics-welcome .normal-section .right{float:right;width:50%}.wp-statistics-welcome .normal-section{float:left;width:100%;padding:36px 0 44px;border-bottom:1px solid #dedede}.wp-statistics-welcome .normal-section h2{text-align:left}.wp-statistics-welcome .text-center{text-align:center !important}.wp-statistics-welcome .content-padding{padding:0 43px}.wp-statistics-welcome .addons-item img{width:120px;border-radius:4px}.wp-statistics-welcome .addons-item a{display:inline-block;margin:0 5px}.wp-statistics-welcome .center-section.logo img{width:150px}.wp-statistics-welcome .center-section.logo>a{display:inline-block}.wp-statistics-welcome .plugin-icon{width:128px;height:128px}.wp-statistics-welcome .plugin-card h3{margin:0 0 12px;font-size:18px;line-height:1.3}.wp-statistics-welcome .plugin-card{text-align:left}.wp-statistics-welcome .about-text img{width:90px}.wps-return-to-dashboard{margin:30px 0 0 -5px;font-size:14px;font-weight:600}.wps-return-to-dashboard a{text-decoration:none;padding:0 5px}#wps-postbox-container-1{width:30%;float:left}#wps-postbox-container-2{margin:0 0 0 1%;width:68%;float:right}@media screen and (max-width: 998px){#wps-postbox-container-1{width:35%}#wps-postbox-container-2{margin:0 0 0 1%;width:63%}}@media screen and (max-width: 758px){#wps-postbox-container-1{width:100%}#wps-postbox-container-2{margin:0 0 0 1%;width:100%}}@media screen and (max-width: 524px){#wps-postbox-container-1{width:100%}#wps-postbox-container-2{margin:0 0 0 1%;width:100%}}#wps-postbox-container-1 a,#wps-postbox-container-2 a,#wps-big-postbox a{text-decoration:none}body.toplevel_page_wps_overview_page fieldset.columns-prefs,body.toplevel_page_wps_overview_page label[for=wp-statistics-about-widget-hide]{display:none !important}#wps_overview_ads_postbox .inside{padding:0;margin:0;line-height:0}#wps_overview_ads_postbox .inside a img{width:100%;height:auto}#wps_overview_ads_postbox .inside a:focus{box-shadow:none}#wps_overview_ads_postbox .inside .close-overview-ads{position:absolute;right:0;margin:15px 20px;opacity:0;transition:1s all}#wps_overview_ads_postbox .inside .close-overview-ads span.dashicons{font-size:21px;color:#72777c;cursor:pointer}#wps_overview_ads_postbox .inside:hover .close-overview-ads{opacity:1}.wps-equal-postbox{display:flex}.wps-postbox-half{width:calc((100% / 2) - 20px);margin-right:10px}.wps-postbox-half .title-center{text-align:center;margin:25px auto;color:#828282}.wps-postbox-half .inside{padding:5px 10px !important;margin:5px 0 5px 0 !important}.wps-title-group{margin:15px 0 20px 0;border-bottom:1px solid #d2d2d2;padding-bottom:13px;width:98%}body[class*="wps_visitors_page"] #TB_closeWindowButton:focus .tb-close-icon{-webkit-box-shadow:none !important;box-shadow:none !important}body[class*="wps_visitors_page"] #visitors-filter{cursor:pointer;color:#666;transition:0.5s all;margin-top:5px}body[class*="wps_visitors_page"] #visitors-filter .dashicons{vertical-align:-5px}body[class*="wps_visitors_page"] #visitors-filter:hover{color:#d82424}body[class*="wps_visitors_page"] .select2-dropdown{z-index:9999999999 !important}body[class*="wps_visitors_page"] .select2-container{width:100% !important}body[class*="wps_visitors_page"] .tbl-page-column{width:220px}body[class*="wps_visitors_page"] .tbl-page-column span.txt-overflow{white-space:nowrap;overflow:hidden;width:210px !important;display:block}#wps-visitors-filter-form{padding:10px 5px}#wps-visitors-filter-form table.widefat{border:0 !important;box-shadow:none !important}html[dir=rtl] body[class*="wps_visitors_page"] #TB_ajaxContent{text-align:right !important}form#wp-statistics-select-pages{margin-bottom:-15px;margin-top:6px}form#wp-statistics-select-pages .select-title{vertical-align:-2px}form#wp-statistics-select-pages select[name=ID]{width:300px;margin:0 8px}form#wp-statistics-select-pages input[type=submit]{margin:0 5px;vertical-align:-2px}form#wp-statistics-select-pages .submit-form{padding:0 5px;vertical-align:-3px}.wps-about-logo{max-width:170px;margin:0 0 9px 0}.wps-summary-stats{background:none repeat scroll 0 0 rgba(0,0,0,0);border:1px none;margin:0 0 10px}.wps-summary-stats tr:first-child th{border-top:0 none}.wps-summary-stats span{color:#21759B !important;font-family:Georgia, "Times New Roman", "Bitstream Charter", Times, serif;font-size:21px}.wps-engine-logo{vertical-align:-3px}#wp-statistics-visitors-map{direction:ltr;height:300px;width:100%}.map-html-marker{max-height:170px;width:200px}.map-html-marker p{border-bottom:1px dashed #EFEFEF;font-size:10px;margin:2px 0;padding:3px 0;text-align:left}.map-html-marker p:last-child{border-bottom:0 none}.jqvmap-label{z-index:10000}.jqvmap-zoomin,.jqvmap-zoomout{background:#717171 !important}.wps-referring-widget-ip{display:block;padding:0 15px;font-size:10px;color:#a2a2a2;margin-left:6px}
|
1 |
+
.wps-text-danger{color:#DC3545 !important}.wps-text-success{color:#459605 !important}.wps-text-warning{color:#dc6b26 !important}.wps-text-muted{color:#797979 !important}.wps-center{text-align:center !important}.wps-d-none{display:none}.wps-d-inline-block{display:inline-block}.wps-middle-vertical{vertical-align:middle}a[href*='?page=wps_break_menu']{pointer-events:none}.wps-cursor-default{cursor:default}.wp-core-ui .btn-danger{background:rgba(186,0,0,0.74);border-color:rgba(170,0,0,0.77) rgba(153,0,0,0.74) rgba(153,0,0,0.74);box-shadow:0 1px 0 rgba(153,0,0,0.74);color:#fff;text-decoration:none;text-shadow:0 -1px 1px rgba(153,0,0,0.74),1px 0 1px rgba(153,0,0,0.74),0 1px 1px rgba(153,0,0,0.74),-1px 0 1px rgba(153,0,0,0.74)}.wp-core-ui .btn-danger:hover{background:#c20000;border-color:#990000;color:#fff}.wp-core-ui .btn-danger:active{background:rgba(170,0,0,0.75);border-color:rgba(153,0,0,0.74);box-shadow:inset 0 2px 0 rgba(153,0,0,0.75)}.wp-core-ui .btn-danger:focus{box-shadow:0 1px 0 rgba(170,0,0,0.75),0 0 2px 1px rgba(219,51,51,0.75);background:rgba(194,0,0,0.75);border-color:rgba(153,0,0,0.75);color:#fff;outline:0 !important}.wps-btn-inline{vertical-align:-2px;margin:0px 5px}.wps-m-top-20{margin-top:20px}.wps-text-wrap{display:inline-block;overflow:hidden;white-space:nowrap;width:100% !important}.wps-width-100{width:100% !important}.wps-200-px{width:200px !important}.wps-inline{display:inline}.wps_page_title{display:inline-block;vertical-align:-15px;margin-top:10px;margin-bottom:10px;margin-right:5px}.wps_title{display:inline;font-size:1.6em}.wp-statistics-container{margin:0 auto}.wps-pull-right{float:right}.wps-pull-left{float:left}@media print{#wpadminbar,#adminmenuback,#adminmenuwrap,#show-settings-link{display:none}#wpcontent,#wpfooter{margin-left:0px}}#wpadminbar #wp-admin-bar-wp-statistic-menu .ab-icon:before{content:'\f184';top:2px}.pagination-wrap{clear:both;display:block;overflow:hidden;text-align:center;margin-top:25px}.pagination-wrap .wps-page-number{color:#148e00;direction:rtl;margin-top:4px}.pagination-wrap .page-numbers li{margin-bottom:0;display:inline-block}.pagination-wrap .page-numbers li a,.pagination-wrap .pagination-wrap .page-numbers li span{display:inline-block;padding:6px 12px;margin-right:4px;border-radius:3px;border:solid 1px #c0c0c0;background:#e9e9e9;box-shadow:inset 0px 1px 0px rgba(255,255,255,0.8),0px 1px 3px rgba(0,0,0,0.1);font-size:.875em;font-weight:bold;text-decoration:none;color:#717171;text-shadow:0px 1px 0px #fff}.pagination-wrap .page-numbers>li>a:hover,.pagination-wrap .page-numbers>li>span:hover,.pagination-wrap .page-numbers>li>a:focus,.pagination-wrap .page-numbers>li>span:focus{background:#fefefe;background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#FEFEFE), to(#f0f0f0));background:-moz-linear-gradient(#FEFEFE, #f0f0f0)}.pagination-wrap .page-numbers li .current{border:none;background:#616161 !important;box-shadow:inset 0px 0px 8px rgba(0,0,0,0.5),0px 1px 0px rgba(255,255,255,0.8) !important;color:#f0f0f0;text-shadow:0px 0px 3px rgba(0,0,0,0.5);padding:7.5px 14px;vertical-align:-1.5px;margin:-8px 5px -5px 5px;border-radius:5px}i.mce-i-icon-statistic{font:400 20px/1 dashicons;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding-right:2px}.wp-statistic-mce-desc{color:#b1b1b1 !important;margin-left:82px !important}html[dir="rtl"] .wp-statistic-mce-desc{text-align:right !important;margin:0 82px 0px 0px !important}.wps-gutenberg-chart-js{height:350px}.wps_loading_box{width:100%;text-align:center;min-height:65px;padding-top:15px}.wps-more span,.wps-refresh span{transition:transform .6s ease-in-out;-webkit-transition:-webkit-transform .6s ease-in-out}.wps-more:hover span,.wps-refresh:hover span{color:#00a0d2}.wps-refresh:hover span{transform:rotate(360deg);-webkit-transform:rotate(360deg);color:#00a0d2}.button-link.wps-more,.button-link.wps-refresh{text-decoration:none !important}.wps-postbox-full{width:100%;float:left;margin-right:20px}#wps-big-postbox{width:100%;direction:ltr;margin-top:5px}.log-url{direction:ltr;float:left;font-size:10px;margin:0 0 0 2px;white-space:nowrap;width:100%;overflow:hidden;text-overflow:ellipsis}#wp_statistics_editor_meta_box,#wp-statistics-browsers-widget,#wp-statistics-countries-widget,#wp-statistics-hitsmap-widget,#wp-statistics-hits-widget,#wp-statistics-pages-widget,#wp-statistics-recent-widget,#wp-statistics-referring-widget,#wp-statistics-search-widget,#wp-statistics-summary-widget,#wp-statistics-words-widget,#wp-statistics-top-visitors-widget,#wps_hits_postbox,#wps_top_visitors_postbox,#wps_search_postbox,#wps_words_postbox,#wps_recent_postbox,#wps_map_postbox,#wps_pages_postbox,#wps_summary_postbox,#wps_browsers_postbox,#wps_referring_postbox,#wps_countries_postbox,#wps_words_postbox{overflow:hidden}#time_zone a{font-size:11px;text-decoration:none}#about-links{margin:0 0 10px}#about-links p{display:inline;font-size:12px;margin:0 2px;font-style:italic}.left-div{float:left}.right-div{float:right}#donate-text{float:left}#donate-button{float:right;margin:-2px 0 0 0}#donate-button a{height:23px;line-height:22px}.wp-statistics-sub-fullwidth{width:100%}.wp-statistics-responsive-table{overflow-x:auto}.wps-postbox-veronalabs{margin:18px 0 0 0}.wps-postbox-veronalabs img{width:116px}.wps-btn-group{text-align:center;margin:25px auto}.wps-btn-group .btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wps-btn-group .btn:focus,.wps-btn-group .btn:active:focus,.wps-btn-group .btn.active:focus,.wps-btn-group .btn.focus,.wps-btn-group .btn:active.focus,.wps-btn-group .btn.active.focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.wps-btn-group .btn:hover,.wps-btn-group .btn:focus,.wps-btn-group .btn.focus{color:#333333;text-decoration:none}.wps-btn-group .btn:active,.wps-btn-group .btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wps-btn-group .btn.disabled,.wps-btn-group .btn[disabled],.wps-btn-group fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);opacity:0.65;-webkit-box-shadow:none;box-shadow:none}.wps-btn-group a.btn.disabled,.wps-btn-group fieldset[disabled] a.btn{pointer-events:none}.wps-btn-group .btn-default{color:#333333;background-color:#ffffff;border-color:#e0e0e0}.wps-btn-group .btn-default:focus,.wps-btn-group .btn-default.focus{color:#333333;background-color:#e6e6e6;border-color:#8c8c8c}.wps-btn-group .btn-default:hover{color:#333333;background-color:#e6e6e6;border-color:#adadad}.wps-btn-group .btn-default:active,.wps-btn-group .btn-default.active,.wps-btn-group .open>.dropdown-toggle.btn-default{color:#333333;background-color:#e6e6e6;background-image:none;border-color:#adadad}.wps-btn-group .btn-default:active:hover,.wps-btn-group .btn-default.active:hover,.wps-btn-group .open>.dropdown-toggle.btn-default:hover,.wps-btn-group .btn-default:active:focus,.wps-btn-group .btn-default.active:focus,.wps-btn-group .open>.dropdown-toggle.btn-default:focus,.wps-btn-group .btn-default:active.focus,.wps-btn-group .btn-default.active.focus,.wps-btn-group .open>.dropdown-toggle.btn-default.focus{color:#333333;background-color:#d4d4d4;border-color:#8c8c8c}.wps-btn-group .btn-default.disabled:hover,.wps-btn-group .btn-default[disabled]:hover,.wps-btn-group fieldset[disabled] .btn-default:hover,.wps-btn-group .btn-default.disabled:focus,.wps-btn-group .btn-default[disabled]:focus,.wps-btn-group fieldset[disabled] .btn-default:focus,.wps-btn-group .btn-default.disabled.focus,.wps-btn-group .btn-default[disabled].focus,.wps-btn-group fieldset[disabled] .btn-default.focus{background-color:#ffffff;border-color:#cccccc}.wps-btn-group .btn-default .badge{color:#ffffff;background-color:#333333}.wps-btn-group .btn-primary{color:#ffffff;background-color:#00a0d2;border-color:#00A0D2}.wps-btn-group .btn-primary:focus,.wps-btn-group .btn-primary.focus{color:#ffffff;background-color:#286090;border-color:#122b40}.wps-btn-group .btn-primary:hover{color:#ffffff;background-color:#286090;border-color:#204d74}.wps-btn-group .btn-primary:active,.wps-btn-group .btn-primary.active,.wps-btn-group .open>.dropdown-toggle.btn-primary{color:#ffffff;background-color:#286090;background-image:none;border-color:#204d74}.wps-btn-group .btn-primary:active:hover,.wps-btn-group .btn-primary.active:hover,.wps-btn-group .open>.dropdown-toggle.btn-primary:hover,.wps-btn-group .btn-primary:active:focus,.wps-btn-group .btn-primary.active:focus,.wps-btn-group .open>.dropdown-toggle.btn-primary:focus,.wps-btn-group .btn-primary:active.focus,.wps-btn-group .btn-primary.active.focus,.wps-btn-group .open>.dropdown-toggle.btn-primary.focus{color:#ffffff;background-color:#204d74;border-color:#122b40}.wps-btn-group .btn-primary.disabled:hover,.wps-btn-group .btn-primary[disabled]:hover,.wps-btn-group fieldset[disabled] .btn-primary:hover,.wps-btn-group .btn-primary.disabled:focus,.wps-btn-group .btn-primary[disabled]:focus,.wps-btn-group fieldset[disabled] .btn-primary:focus,.wps-btn-group .btn-primary.disabled.focus,.wps-btn-group .btn-primary[disabled].focus,.wps-btn-group fieldset[disabled] .btn-primary.focus{background-color:#337ab7;border-color:#2e6da4}.wps-btn-group .btn-primary .badge{color:#337ab7;background-color:#ffffff}.wps-btn-group .btn-danger{color:#ffffff;background-color:#d9534f;border-color:#d43f3a}.wps-btn-group .btn-danger:focus,.wps-btn-group .btn-danger.focus{color:#ffffff;background-color:#c9302c;border-color:#761c19}.wps-btn-group .btn-danger:hover{color:#ffffff;background-color:#c9302c;border-color:#ac2925}.wps-btn-group .btn-danger:active,.wps-btn-group .btn-danger.active,.wps-btn-group .open>.dropdown-toggle.btn-danger{color:#ffffff;background-color:#c9302c;background-image:none;border-color:#ac2925}.wps-btn-group .btn-danger:active:hover,.wps-btn-group .btn-danger.active:hover,.wps-btn-group .open>.dropdown-toggle.btn-danger:hover,.wps-btn-group .btn-danger:active:focus,.wps-btn-group .btn-danger.active:focus,.wps-btn-group .open>.dropdown-toggle.btn-danger:focus,.wps-btn-group .btn-danger:active.focus,.wps-btn-group .btn-danger.active.focus,.wps-btn-group .open>.dropdown-toggle.btn-danger.focus{color:#ffffff;background-color:#ac2925;border-color:#761c19}.wps-btn-group .btn-danger.disabled:hover,.wps-btn-group .btn-danger[disabled]:hover,.wps-btn-group fieldset[disabled] .btn-danger:hover,.wps-btn-group .btn-danger.disabled:focus,.wps-btn-group .btn-danger[disabled]:focus,.wps-btn-group fieldset[disabled] .btn-danger:focus,.wps-btn-group .btn-danger.disabled.focus,.wps-btn-group .btn-danger[disabled].focus,.wps-btn-group fieldset[disabled] .btn-danger.focus{background-color:#d9534f;border-color:#d43f3a}.wps-btn-group .btn-danger .badge{color:#d9534f;background-color:#ffffff}.wps-btn-group .btn-link{font-weight:400;color:#337ab7;border-radius:0}.wps-btn-group .btn-link,.wps-btn-group .btn-link:active,.wps-btn-group .btn-link.active,.wps-btn-group .btn-link[disabled],.wps-btn-group fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.wps-btn-group .btn-link,.wps-btn-group .btn-link:hover,.wps-btn-group .btn-link:focus,.wps-btn-group .btn-link:active{border-color:transparent}.wps-btn-group .btn-link:hover,.wps-btn-group .btn-link:focus{color:#23527c;text-decoration:underline;background-color:transparent}.wps-btn-group .btn-link[disabled]:hover,.wps-btn-group fieldset[disabled] .btn-link:hover,.wps-btn-group .btn-link[disabled]:focus,.wps-btn-group fieldset[disabled] .btn-link:focus{color:#777777;text-decoration:none}.wps-btn-group .btn-block{display:block;width:100%}.wps-btn-group .btn-block+.btn-block{margin-top:5px}.wps-btn-group input[type="submit"].btn-block,.wps-btn-group input[type="reset"].btn-block,.wps-btn-group input[type="button"].btn-block{width:100%}.wps-btn-group .btn-group,.wps-btn-group .btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.wps-btn-group .btn-group>.btn,.wps-btn-group .btn-group-vertical>.btn{position:relative;float:left}.wps-btn-group .btn-group>.btn:hover,.wps-btn-group .btn-group-vertical>.btn:hover,.wps-btn-group .btn-group>.btn:focus,.wps-btn-group .btn-group-vertical>.btn:focus,.wps-btn-group .btn-group>.btn:active,.wps-btn-group .btn-group-vertical>.btn:active,.wps-btn-group .btn-group>.btn.active,.wps-btn-group .btn-group-vertical>.btn.active{z-index:2}.wps-btn-group .btn-group .btn+.btn,.wps-btn-group .btn-group .btn+.btn-group,.wps-btn-group .btn-group .btn-group+.btn,.wps-btn-group .btn-group .btn-group+.btn-group{margin-left:-1px}.wps-btn-group .btn-toolbar{margin-left:-5px}.wps-btn-group .btn-toolbar .btn,.wps-btn-group .btn-toolbar .btn-group,.wps-btn-group .btn-toolbar .input-group{float:left}.wps-btn-group .btn-toolbar>.btn,.wps-btn-group .btn-toolbar>.btn-group,.wps-btn-group .btn-toolbar>.input-group{margin-left:5px}.wps-btn-group .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.wps-btn-group .btn-group>.btn:first-child{margin-left:0}.wps-btn-group .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.wps-btn-group .btn-group>.btn:last-child:not(:first-child),.wps-btn-group .btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.wps-btn-group .btn-group>.btn-group{float:left}.wps-btn-group .btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.wps-btn-group .btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.wps-btn-group .btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.wps-btn-group .btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.wps-btn-group .btn-group .dropdown-toggle:active,.wps-btn-group .btn-group.open .dropdown-toggle{outline:0}.wps-btn-group .btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.wps-btn-group .btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.wps-btn-group .btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wps-btn-group .btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.wps-btn-group .btn .caret{margin-left:0}.wps-btn-group .btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.wps-btn-group .dropup .btn-lg .caret{border-width:0 5px 5px}.wps-btn-group .btn-group-vertical>.btn,.wps-btn-group .btn-group-vertical>.btn-group,.wps-btn-group .btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.wps-btn-group .btn-group-vertical>.btn-group>.btn{float:none}.wps-btn-group .btn-group-vertical>.btn+.btn,.wps-btn-group .btn-group-vertical>.btn+.btn-group,.wps-btn-group .btn-group-vertical>.btn-group+.btn,.wps-btn-group .btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.wps-btn-group .btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.wps-btn-group .btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.wps-btn-group .btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.wps-btn-group .btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.wps-btn-group .btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.wps-btn-group .btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.wps-btn-group .btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.wps-btn-group .btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.wps-btn-group .btn-group-justified>.btn,.wps-btn-group .btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.wps-btn-group .btn-group-justified>.btn-group .btn{width:100%}.wps-btn-group .btn-group-justified>.btn-group .dropdown-menu{left:auto}.wps-btn-group [data-toggle="buttons"]>.btn input[type="radio"],.wps-btn-group [data-toggle="buttons"]>.btn-group>.btn input[type="radio"],.wps-btn-group [data-toggle="buttons"]>.btn input[type="checkbox"],.wps-btn-group [data-toggle="buttons"]>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.wps-btn-group .clearfix:before,.wps-btn-group .clearfix:after,.wps-btn-group .btn-toolbar:before,.wps-btn-group .btn-toolbar:after,.wps-btn-group .btn-group-vertical>.btn-group:before,.wps-btn-group .btn-group-vertical>.btn-group:after{display:table;content:" "}.wps-btn-group .clearfix:after,.wps-btn-group .btn-toolbar:after,.wps-btn-group .btn-group-vertical>.btn-group:after{clear:both}.wps-btn-group .center-block{display:block;margin-right:auto;margin-left:auto}.wps-btn-group .pull-right{float:right !important}.wps-btn-group .pull-left{float:left !important}.wps-btn-group .hide{display:none !important}div[data-chart-date-picker]{text-align:center;margin-bottom:20px;transition:1s all}div[data-chart-date-picker] input{margin:0px 8px;border-radius:5px;box-shadow:none;padding:5px}div[data-chart-date-picker] input[type=submit]{vertical-align:2px}.wps-ph-item{position:relative;display:flex;flex-wrap:wrap;overflow:hidden;background-color:#fff;direction:ltr}.wps-ph-item,.wps-ph-item *,.wps-ph-item ::after,.wps-ph-item ::before{box-sizing:border-box}.wps-ph-item::before{content:" ";position:absolute;top:0;right:0;bottom:0;left:50%;z-index:1;width:500%;margin-left:-250%;animation:phAnimation 1s linear infinite;background:linear-gradient(to right, rgba(255,255,255,0) 46%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 54%) 50% 50%}.wps-ph-item>*{flex:1 1 auto;display:flex;flex-flow:column;padding-right:10px;padding-left:10px}.wps-ph-row{display:flex;flex-wrap:wrap;margin-bottom:7.5px}.wps-ph-row div{height:15px;margin-bottom:7.5px;background-color:#dee4ea}.wps-ph-row .big,.wps-ph-row.big div{height:20px;margin-bottom:15px}.wps-ph-row .empty{background-color:rgba(255,255,255,0)}.wps-ph-col-2{flex:0 0 16.66667%}.wps-ph-col-4{flex:0 0 33.33333%}.wps-ph-col-6{flex:0 0 50%}.wps-ph-col-8{flex:0 0 66.66667%}.wps-ph-col-10{flex:0 0 83.33333%}.wps-ph-col-12{flex:0 0 100%}.wps-ph-avatar{position:relative;width:100%;min-width:60px;background-color:#dee4ea;margin-bottom:15px;border-radius:50%;overflow:hidden}.wps-ph-avatar::before{content:" ";display:block;padding-top:100%}.wps-ph-picture{width:100%;height:120px;background-color:#dee4ea;margin-bottom:15px}@keyframes phAnimation{0%{transform:translate3d(-30%, 0, 0)}100%{transform:translate3d(30%, 0, 0)}}.wps-text-placeholder{width:90px;height:25px;margin:0px auto}.wps-badge{display:inline-block;min-width:8px;padding:3px 7px;font-size:12px;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:1px;background-color:#DC3545;border-radius:10px}#post-stats{border:none}#th-colspan{text-align:center}#th-colspan span{color:#459605 !important;font-size:30px}#last-visitor tr{text-align:center}#last-visitor tr:first-child{background:none repeat scroll 0 0 #EEEEEE;font-weight:bold;text-align:center}#last-search tr{text-align:center}#last-search tr:first-child{background:none repeat scroll 0 0 #EEEEEE;font-weight:bold;text-align:center}table.wps-table-fixed{table-layout:fixed;width:100%}.wps-report-table tr{text-align:left}.wps-report-table tr:first-child{background:none repeat scroll 0 0 #EEEEEE;font-weight:bold;text-align:center}.th-center{text-align:center !important}.td-align{text-align:left}.td-url{color:#009936 !important;direction:ltr;font-size:10px !important;text-align:left;white-space:nowrap}.log-item{border-bottom:1px solid #efeeee;border-top:1px solid #FFFFFF;min-height:46px;padding:3px 7px}.log-item:hover{background:none repeat scroll 0 0 #f7f7f7}.show-map{float:left}.log-referred{float:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:auto}.log-page-title{float:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.log-ip{direction:ltr;float:right;font-size:10px;margin-bottom:5px;white-space:pre;overflow:hidden;text-overflow:ellipsis;text-align:right}.log-tools{float:left;margin:0 2px}.log-agent{float:left}.table-stats tr,.table-stats td{border-bottom:1px solid #efeeee;background-color:white;transition:1s all}.table-stats tr:last-child td{border-bottom:0}.table-stats tr:hover:not(:first-child) td{background-color:rgba(241,241,241,0.65) !important}.table-stats tr:first-child td{border:0 none;text-align:left}.rtl .table-stats.left-align tr,.rtl .table-stats.left-align td{text-align:left !important}.rtl .table-stats tr,.rtl .table-stats td{text-align:right !important}.rtl .table-stats .log-tools{float:right}.rtl .table-stats .th-center{text-align:center !important}.table-stats{border:0 none !important}#visits-log{direction:ltr;height:290px;width:100%}#search-engine-log{direction:ltr}#platform-log{direction:ltr}#visits-stats{direction:ltr}#exclusion-stats{direction:ltr}#search-stats{direction:ltr}#page-stats{direction:ltr}.wp-statistics-settings .widefat{float:left}.wp-statistics-settings .note{color:#FF0000;font-size:11px !important;font-weight:bold}.wp-statistics-settings .postbox-container{margin-top:51px}.wp-statistics-settings ul.tabs{margin:0;padding:0;list-style:none}.wp-statistics-settings ul.tabs li{background:none;color:#222;display:inline-block;padding:10px 8px;cursor:pointer;border:1px solid #f1f1f1;margin:0}.wp-statistics-settings ul.tabs li.current{background:#ffffff;color:#222;border-right-color:#e5e5e5;border-left-color:#e5e5e5;border-bottom-color:#ffffff;border-top-color:#e5e5e5;padding-bottom:11px}.wp-statistics-settings .tab-content{display:none;background:#ffffff;padding:15px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,0.04);margin:-1px 0 0 0}.wp-statistics-settings .tab-content.current{display:inherit}.wp-statistics-settings #update_geoip{margin-left:5px;margin-top:-5px;line-height:19px;font-size:12px;height:25px}@media only screen and (max-width: 1327px){.wp-statistics-settings ul.tabs li{padding:10px 5px}}.wp-statistics-plugins .widefat>*{float:left}.wp-statistics-plugins .widefat .plugin-card{position:relative}.wp-statistics-plugins .widefat .plugin-card .desc,.wp-statistics-plugins .widefat .plugin-card .name{margin-right:0}.wp-statistics-plugins .widefat .plugin-card-bottom{float:initial}.wp-statistics-plugins .widefat .column-downloaded p{margin:2px 0 0 0}.wp-statistics-plugins .column-price{display:inline;margin:0 8px;font-size:15px;color:#589616}.wp-statistics-plugins .plugin-card .cover-ribbon{height:115px;width:115px;position:absolute;left:-8px;top:-7px;overflow:hidden}.wp-statistics-plugins .plugin-card .cover-ribbon .cover-ribbon-inside{background:#EA4335;color:#FFF;transform:rotate(-45deg);position:absolute;left:-35px;top:16px;padding:10px;min-width:127px;text-align:center;z-index:9}.wp-statistics-plugins .plugin-card .cover-ribbon .cover-ribbon-inside:before{width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:10px solid #992C23;position:absolute;left:-5px;bottom:0;content:"";top:34px;transform:rotate(-45deg)}.wp-statistics-plugins .plugin-card .cover-ribbon .cover-ribbon-inside:after{width:0;height:0;border-top:7px solid transparent;border-left:7px solid #992C23;border-bottom:7px solid transparent;position:absolute;top:33px;bottom:0;right:4px;content:"";transform:rotate(-45deg)}.wp-statistics-welcome .wp-badge{background-image:url("../images/logo-250-white.png");background-color:#1aabec}.wp-statistics-welcome .nav-tab.donate{background-color:#459605;color:#ffffff}.wp-statistics-welcome .tab-content{display:none}.wp-statistics-welcome .tab-content.current{display:block}.wp-statistics-welcome ul li{margin:0 31px}.wp-statistics-welcome ul{list-style-type:square;line-height:28px;margin:0 0 20px 0}.wp-statistics-welcome img{width:auto}.wp-statistics-welcome .center-section{padding:41px 0 60px;clear:both;text-align:center}.wp-statistics-welcome .normal-section .left{float:left;width:50%;text-align:left}.wp-statistics-welcome .normal-section .right{float:right;width:50%}.wp-statistics-welcome .normal-section{float:left;width:100%;padding:36px 0 44px;border-bottom:1px solid #dedede}.wp-statistics-welcome .normal-section h2{text-align:left}.wp-statistics-welcome .text-center{text-align:center !important}.wp-statistics-welcome .content-padding{padding:0 43px}.wp-statistics-welcome .addons-item img{width:120px;border-radius:4px}.wp-statistics-welcome .addons-item a{display:inline-block;margin:0 5px}.wp-statistics-welcome .center-section.logo img{width:150px}.wp-statistics-welcome .center-section.logo>a{display:inline-block}.wp-statistics-welcome .plugin-icon{width:128px;height:128px}.wp-statistics-welcome .plugin-card h3{margin:0 0 12px;font-size:18px;line-height:1.3}.wp-statistics-welcome .plugin-card{text-align:left}.wp-statistics-welcome .about-text img{width:90px}.wps-return-to-dashboard{margin:30px 0 0 -5px;font-size:14px;font-weight:600}.wps-return-to-dashboard a{text-decoration:none;padding:0 5px}#wps-postbox-container-1{width:30%;float:left}#wps-postbox-container-2{margin:0 0 0 1%;width:68%;float:right}@media screen and (max-width: 998px){#wps-postbox-container-1{width:35%}#wps-postbox-container-2{margin:0 0 0 1%;width:63%}}@media screen and (max-width: 758px){#wps-postbox-container-1{width:100%}#wps-postbox-container-2{margin:0 0 0 1%;width:100%}}@media screen and (max-width: 524px){#wps-postbox-container-1{width:100%}#wps-postbox-container-2{margin:0 0 0 1%;width:100%}}#wps-postbox-container-1 a,#wps-postbox-container-2 a,#wps-big-postbox a{text-decoration:none}body.toplevel_page_wps_overview_page fieldset.columns-prefs,body.toplevel_page_wps_overview_page label[for=wp-statistics-about-widget-hide]{display:none !important}#wps_overview_ads_postbox .inside{padding:0;margin:0;line-height:0}#wps_overview_ads_postbox .inside a img{width:100%;height:auto}#wps_overview_ads_postbox .inside a:focus{box-shadow:none}#wps_overview_ads_postbox .inside .close-overview-ads{position:absolute;right:0;margin:15px 20px;opacity:0;transition:1s all}#wps_overview_ads_postbox .inside .close-overview-ads span.dashicons{font-size:21px;color:#72777c;cursor:pointer}#wps_overview_ads_postbox .inside:hover .close-overview-ads{opacity:1}.wps-equal-postbox{display:flex}.wps-postbox-half{width:calc((100% / 2) - 20px);margin-right:10px}.wps-postbox-half .title-center{text-align:center;margin:25px auto;color:#828282}.wps-postbox-half .inside{padding:5px 10px !important;margin:5px 0 5px 0 !important}.wps-title-group{margin:15px 0 20px 0;border-bottom:1px solid #d2d2d2;padding-bottom:13px;width:98%}body[class*="wps_visitors_page"] #TB_closeWindowButton:focus .tb-close-icon{-webkit-box-shadow:none !important;box-shadow:none !important}body[class*="wps_visitors_page"] #visitors-filter{cursor:pointer;color:#666;transition:0.5s all;margin-top:5px}body[class*="wps_visitors_page"] #visitors-filter .dashicons{vertical-align:-5px}body[class*="wps_visitors_page"] #visitors-filter:hover{color:#d82424}body[class*="wps_visitors_page"] .select2-dropdown{z-index:9999999999 !important}body[class*="wps_visitors_page"] .select2-container{width:100% !important}body[class*="wps_visitors_page"] .tbl-page-column{width:220px}body[class*="wps_visitors_page"] .tbl-page-column span.txt-overflow{white-space:nowrap;overflow:hidden;width:210px !important;display:block}#wps-visitors-filter-form{padding:10px 5px}#wps-visitors-filter-form table.widefat{border:0 !important;box-shadow:none !important}html[dir=rtl] body[class*="wps_visitors_page"] #TB_ajaxContent{text-align:right !important}form#wp-statistics-select-pages{margin-bottom:-15px;margin-top:6px}form#wp-statistics-select-pages .select-title{vertical-align:-2px}form#wp-statistics-select-pages select[name=ID]{width:300px;margin:0 8px}form#wp-statistics-select-pages input[type=submit]{margin:0 5px;vertical-align:-2px}form#wp-statistics-select-pages .submit-form{padding:0 5px;vertical-align:-3px}.wps-about-logo{max-width:170px;margin:0 0 9px 0}.wps-summary-stats{background:none repeat scroll 0 0 rgba(0,0,0,0);border:1px none;margin:0 0 10px}.wps-summary-stats tr:first-child th{border-top:0 none}.wps-summary-stats span{color:#21759B !important;font-family:Georgia, "Times New Roman", "Bitstream Charter", Times, serif;font-size:21px}.wps-engine-logo{vertical-align:-3px}#wp-statistics-visitors-map{direction:ltr;height:300px;width:100%}.map-html-marker{max-height:170px;width:200px}.map-html-marker p{border-bottom:1px dashed #EFEFEF;font-size:10px;margin:2px 0;padding:3px 0;text-align:left}.map-html-marker p:last-child{border-bottom:0 none}.jqvmap-label{z-index:10000}.jqvmap-zoomin,.jqvmap-zoomout{background:#717171 !important}.wps-referring-widget-ip{display:block;padding:0 15px;font-size:10px;color:#a2a2a2;margin-left:6px}
|
assets/dev/javascript/meta-box.js
CHANGED
@@ -33,7 +33,11 @@ wps_js.no_meta_box_data = function () {
|
|
33 |
/**
|
34 |
* Show Error Connection if Meta Box is Empty
|
35 |
*/
|
36 |
-
wps_js.error_meta_box_data = function (
|
|
|
|
|
|
|
|
|
37 |
return wps_js._('rest_connect');
|
38 |
};
|
39 |
|
33 |
/**
|
34 |
* Show Error Connection if Meta Box is Empty
|
35 |
*/
|
36 |
+
wps_js.error_meta_box_data = function (xhr) {
|
37 |
+
let data = JSON.parse(xhr);
|
38 |
+
if (wps_js.isset(data, 'message')) {
|
39 |
+
return data['message'];
|
40 |
+
}
|
41 |
return wps_js._('rest_connect');
|
42 |
};
|
43 |
|
assets/dev/sass/component/table.scss
CHANGED
@@ -113,10 +113,11 @@ table.wps-table-fixed {
|
|
113 |
float: left;
|
114 |
}
|
115 |
|
116 |
-
|
117 |
.ui-sortable {
|
118 |
min-height: 100px;
|
119 |
}
|
|
|
120 |
|
121 |
.table-stats tr, .table-stats td {
|
122 |
border-bottom: 1px solid #efeeee;
|
@@ -125,7 +126,7 @@ table.wps-table-fixed {
|
|
125 |
}
|
126 |
|
127 |
.table-stats tr:last-child td {
|
128 |
-
border-bottom:
|
129 |
}
|
130 |
|
131 |
.table-stats tr:hover:not(:first-child) td {
|
@@ -133,7 +134,7 @@ table.wps-table-fixed {
|
|
133 |
}
|
134 |
|
135 |
.table-stats tr:first-child td {
|
136 |
-
border:
|
137 |
text-align: left;
|
138 |
}
|
139 |
|
@@ -155,7 +156,7 @@ table.wps-table-fixed {
|
|
155 |
}
|
156 |
|
157 |
.table-stats {
|
158 |
-
border:
|
159 |
}
|
160 |
|
161 |
#visits-log {
|
113 |
float: left;
|
114 |
}
|
115 |
|
116 |
+
/*
|
117 |
.ui-sortable {
|
118 |
min-height: 100px;
|
119 |
}
|
120 |
+
*/
|
121 |
|
122 |
.table-stats tr, .table-stats td {
|
123 |
border-bottom: 1px solid #efeeee;
|
126 |
}
|
127 |
|
128 |
.table-stats tr:last-child td {
|
129 |
+
border-bottom: 0;
|
130 |
}
|
131 |
|
132 |
.table-stats tr:hover:not(:first-child) td {
|
134 |
}
|
135 |
|
136 |
.table-stats tr:first-child td {
|
137 |
+
border: 0 none;
|
138 |
text-align: left;
|
139 |
}
|
140 |
|
156 |
}
|
157 |
|
158 |
.table-stats {
|
159 |
+
border: 0 none !important;
|
160 |
}
|
161 |
|
162 |
#visits-log {
|
assets/js/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}jQuery(document).ready(function(e){var t;t=function(c){var l={},d={};c.ajaxq=function(e,a){if(void 0===a)throw"AjaxQ: queue name is not provided";var o=c.Deferred(),t=o.promise();t.success=t.done,t.error=t.fail,t.complete=t.always;var r,s="function"==typeof a,n=s?null:c.extend(!0,{},a);return r=function(){var t=c.ajax.apply(window,[s?a():n]);return t.done(function(){o.resolve.apply(this,arguments)}),t.fail(function(){o.reject.apply(this,arguments)}),t.always(i),t},l[e]?l[e].push(r):(l[e]=[],r=r(),d[e]=r),t;function i(){var t;l[e]&&((t=l[e].shift())?(t=t(),d[e]=t):(delete l[e],delete d[e]))}},c.each(["getq","postq"],function(t,s){c[s]=function(t,e,a,o,r){return c.isFunction(a)&&(r=r||o,o=a,a=void 0),c.ajaxq(t,{type:"postq"===s?"post":"get",url:e,data:a,success:o,dataType:r})}});function e(t){return l.hasOwnProperty(t)&&0<l[t].length||d.hasOwnProperty(t)}c.ajaxq.isRunning=function(t){return t?e(t):function(){for(var t in l)if(e(t))return!0;return!1}()},c.ajaxq.getActiveRequest=function(t){if(!t)throw"AjaxQ: queue name is required";return d[t]},c.ajaxq.abort=function(t){if(!t)throw"AjaxQ: queue name is required";var e=c.ajaxq.getActiveRequest(t);delete l[t],delete d[t],e&&e.abort()},c.ajaxq.clear=function(t){if(t)l[t]&&(l[t]=[]);else for(var e in l)l.hasOwnProperty(e)&&(l[e]=[])}},"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=t(require("jquery")):t(jQuery);var a,o,r,s,n,i,c,l,d,p,u,_,h={};function g(t){jQuery(".wp-statistics-settings ul.tabs li").removeClass("current"),jQuery(".wp-statistics-settings .tab-content").removeClass("current"),jQuery("[data-tab="+t+"]").addClass("current"),jQuery("#"+t).addClass("current"),jQuery("#wp-statistics-settings-form").length&&(t=jQuery(location).attr("href")+"&tab="+t,jQuery("#wp-statistics-settings-form").attr("action",t).submit())}function m(t,e){jQuery(document).on("change",t,function(t){t.preventDefault();t=jQuery(e);this.checked?t.show("slow"):(t.hide("slow"),t.find("input[type=checkbox]").prop("checked",!1))})}h.global="undefined"!=typeof wps_global?wps_global:[],h._=function(t){return t in this.global.i18n?this.global.i18n[t]:""},h.is_active=function(t){return 1===h.global.options[t]},h.ajax_queue={key:"wp-statistics",time:400},h.ajaxQ=function(e,a,o,r){var t=4<arguments.length&&void 0!==arguments[4]?arguments[4]:"GET",s=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];!1!==e&&"metabox"!==e||(e=h.global.meta_box_api);t={url:e,type:t,dataType:"json",crossDomain:!0,cache:!1,data:a,success:function(t){e===h.global.meta_box_api&&!0===s?t.no_data?jQuery(h.meta_box_inner(a.name)).empty().html(h.no_meta_box_data()):(jQuery(h.meta_box_inner(a.name)).empty().html(h[o].view(t)),h[o].meta_box_init&&setTimeout(function(){h[o].meta_box_init(t)},150)):h[o](t)},error:function(t){e===h.global.meta_box_api&&!0===s?jQuery(h.meta_box_inner(a.name)).empty().html(h[r](t.responseText)):h[r](t.responseText)}};e===h.global.meta_box_api&&(t.beforeSend=function(t){t.setRequestHeader("X-WP-Nonce",h.global.rest_api_nonce),t.setRequestHeader("Access-Control-Allow-Origin","*")}),jQuery.ajaxq(h.ajax_queue.key,t)},h.placeholder=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return'<div class="wps-ph-item"><div class="wps-ph-col-12">'.concat(h.placeholder_content("picture"),"").concat(h.placeholder_content("line"),"</div>")+(!1!==t?t:"")+"</div>"},h.line_placeholder=function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,e='<div class="wps-ph-item">',a=0;a<t;a++)e+='<div class="wps-ph-col-12"> <div class="wps-ph-row"><div class="wps-ph-col-6 big"></div><div class="wps-ph-col-4 empty big"></div><div class="wps-ph-col-4"></div><div class="wps-ph-col-8 empty"></div><div class="wps-ph-col-6"></div><div class="wps-ph-col-6 empty"></div><div class="wps-ph-col-12"></div> </div></div>';return e+="</div>"},h.circle_placeholder=function(){return'<div class="wps-ph-item"> '.concat(h.placeholder_content("circle"),"</div>")},h.rectangle_placeholder=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return'<div class="wps-ph-item'+(0<t.length?" "+t:"")+'"><div class="wps-ph-col-12">'.concat(h.placeholder_content("picture"),"</div></div>")},h.placeholder_content=function(){var t="";switch(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"line"){case"picture":t='<div class="wps-ph-picture"></div>';break;case"line":t='<div class="wps-ph-row"><div class="wps-ph-col-6 big"></div><div class="wps-ph-col-4 empty big"></div><div class="wps-ph-col-2 big"></div><div class="wps-ph-col-4"></div><div class="wps-ph-col-8 empty"></div><div class="wps-ph-col-6"></div><div class="wps-ph-col-6 empty"></div><div class="wps-ph-col-12"></div> </div>';break;case"circle":t='<div class="wps-ph-col-2"></div><div class="wps-ph-col-8"><div class="wps-ph-avatar"></div></div>'}return t},h.exist_tag=function(t){return jQuery(t).length},h.date_picker=function(){jQuery.fn.datepicker&&"undefined"!=typeof wps_i18n_jquery_datepicker&&jQuery("input[data-wps-date-picker]").datepicker({monthNames:wps_i18n_jquery_datepicker.monthNames,monthNamesShort:wps_i18n_jquery_datepicker.monthNamesShort,dayNames:wps_i18n_jquery_datepicker.dayNames,dayNamesShort:wps_i18n_jquery_datepicker.dayNamesShort,dayNamesMin:wps_i18n_jquery_datepicker.dayNamesMin,dateFormat:wps_i18n_jquery_datepicker.dateFormat,firstDay:wps_i18n_jquery_datepicker.firstDay,isRTL:wps_i18n_jquery_datepicker.isRTL,onSelect:function(t){var e=jQuery(this).attr("data-wps-date-picker");0<t.length&&jQuery("input[id=date-"+e+"]").val(t)}})},h.select2=function(){jQuery("select[data-type-show=select2]").select2()},h.redirect=function(t){window.location.replace(t)},h.line_chart=function(t,e,a,o){t=document.getElementById(t).getContext("2d");h.is_active("rtl")&&(Chart.defaults.global.defaultFontFamily="tahoma"),new Chart(t,{type:"line",data:{labels:a,datasets:o},options:{responsive:!0,legend:{position:"bottom"},animation:{duration:1500},title:{display:!0,text:e},tooltips:{mode:"index",intersect:!1},scales:{yAxes:[{ticks:{beginAtZero:!0}}]}}})},h.pie_chart=function(t,e,a){var o=3<arguments.length&&void 0!==arguments[3]&&arguments[3],t=document.getElementById(t).getContext("2d");h.is_active("rtl")&&(Chart.defaults.global.defaultFontFamily="tahoma"),!1===o&&(o=function(t,e){var a=e.datasets[t.datasetIndex],o=a.data.reduce(function(t,e,a,o){return t+e}),a=a.data[t.index];return Math.floor(a/o*100+.5)+"% - "+e.labels[t.index]}),new Chart(t,{type:"pie",data:{labels:e,datasets:a},options:{responsive:!0,legend:{position:"bottom"},animation:{duration:1500},tooltips:{callbacks:{label:o}}},plugins:[{afterDraw:function(t){var e,a,o;!0===t.data.datasets[0].data.every(function(t){return 0==t})&&(e=t.chart.ctx,a=t.chart.width,o=t.chart.height,t.clear(),e.save(),e.textAlign="center",e.textBaseline="middle",e.font="14px normal 'tahoma'",e.fillText(h._("no_data"),a/2,o/2),e.restore())}}]})},h.chart_id=function(t){return"wp-statistics-"+t+"-meta-box-chart"},h.random_color=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=[[243,156,18,"#f39c12"],[52,152,219,"#3498db"],[192,57,43,"#c0392b"],[155,89,182,"#9b59b6"],[39,174,96,"#27ae60"],[230,126,34,"#e67e22"],[142,68,173,"#8e44ad"],[46,204,113,"#2ecc71"],[41,128,185,"#2980b9"],[22,160,133,"#16a085"],[211,84,0,"#d35400"],[44,62,80,"#2c3e50"],[241,196,15,"#f1c40f"],[231,76,60,"#e74c3c"],[26,188,156,"#1abc9c"],[46,204,113,"#2ecc71"],[52,152,219,"#3498db"],[155,89,182,"#9b59b6"],[52,73,94,"#34495e"],[22,160,133,"#16a085"],[39,174,96,"#27ae60"],[44,62,80,"#2c3e50"],[241,196,15,"#f1c40f"],[230,126,34,"#e67e22"],[231,76,60,"#e74c3c"],[236,240,241,"#9b9e9f"],[149,165,166,"#a65d20"]];return e[!1===t?Math.floor(Math.random()*e.length):t]},h.site_icon=function(t){return'<img src="https://www.google.com/s2/favicons?domain='.concat(t,'" width="16" height="16" alt="').concat(t,'" style="vertical-align: -3px;" />')},h.wordpress_postbox_ajax=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"enable",e=jQuery(".postbox .hndle, .postbox .handlediv");"enable"===t?e.on("click",window.postboxes.handle_click):e.off("click",window.postboxes.handle_click)},h.isset=function(t){for(var e=Array.prototype.slice.call(arguments,1),a=0;a<e.length;a++){if(!t||!t.hasOwnProperty(e[a]))return!1;t=t[e[a]]}return!0},h.number_format=function(t,e,a,o){if(null==t||!isFinite(t))throw new TypeError("number is not valid");var r;e||(e=1<(r=t.toString().split(".").length)?r:0),a=a||".",o=o||",";e=(t=(t=parseFloat(t).toFixed(e)).replace(".",a)).split(a);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,o),t=e.join(a)},h.set_equal_height=function(t,e){var a=jQuery(t).height(),o=jQuery(e).height(),r=e,e=a;a<o&&(r=t,e=o),jQuery(r).css("height",e+"px")},h.Create_Half_PostBox=function(t,e){return'<div class="postbox-container wps-postbox-half '.concat(t,'"><div class="metabox-holder"><div class="meta-box-sortables"> <div class="postbox" id="').concat(e,'"> <div class="inside"></div></div></div></div></div>')},h.isIP=function(t){var e="(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)";return new RegExp("^".concat(e,"\\.").concat(e,"\\.").concat(e,"\\.").concat(e,"$")).test(t)},h.getLinkParams=function(t){t=(1<arguments.length&&void 0!==arguments[1]&&arguments[1]||window.location.href).match(new RegExp("(?:[?&]"+t+"=)([^&]+)"));return t?t[1]:null},h.sum=function(t){return t.reduce(function(t,e){return t+e},0)},h.sanitize_meta_box_name=function(t){return t.replace(new RegExp("-","g"),"_")},h.get_meta_box_method=function(t){return this.sanitize_meta_box_name(t)+"_meta_box"},h.getMetaBoxKey=function(t){return"wp-statistics-"+t+"-widget"},h.no_meta_box_data=function(){return h._("no_data")},h.error_meta_box_data=function(t){return h._("rest_connect")},h.get_meta_box_info=function(t){return t in h.global.meta_boxes?h.global.meta_boxes[t]:[]},h.meta_box_lang=function(t,e){return e in h.global.meta_boxes[t].lang?h.global.meta_boxes[t].lang[e]:""},h.meta_box_inner=function(t){return"#"+h.getMetaBoxKey(t)+" div.inside"},h.meta_box_name_by_id=function(t){return t.split("statistics-").pop().split("-widget")[0]},h.meta_box_button=function(t){var e="#"+h.getMetaBoxKey(t)+" .handle-actions button:first",a=h.get_meta_box_info(t),o="z-index: 9999;position: absolute;top: 1px;",r="right";h.is_active("rtl")&&(r="left"),jQuery("#"+h.getMetaBoxKey(t)+" button[class*=wps-refresh], #"+h.getMetaBoxKey(t)+" button[class*=wps-more]").remove(),h.is_active("more_btn")&&h.isset(a,"page_url")&&jQuery('<button class="handlediv wps-more"'+(h.is_active("gutenberg")?' style="'.concat(o).concat(r,': 3%;" '):'style="line-height: 28px;"')+' type="button" onclick="location.href = \''+h.global.admin_url+"admin.php?page="+a.page_url+'\';"><span class="screen-reader-text">'+h._("more_detail")+'</span> <span class="dashicons dashicons-external"></span></button>').insertBefore(e),h.is_active("more_btn")&&h.isset(a,"page_url")?jQuery('<button class="handlediv wps-refresh"'+(h.is_active("gutenberg")?' style="'.concat(o).concat(r,': 6%;" '):'style="line-height: 28px;"')+' type="button"><span class="screen-reader-text">'+h._("reload")+'</span> <span class="dashicons dashicons-update"></span> </button>').insertAfter("#"+h.getMetaBoxKey(t)+" button[class*=wps-more]"):jQuery('<button class="handlediv wps-refresh"'+(h.is_active("gutenberg")?' style="'.concat(o).concat(r,': 3%;" '):'style="line-height: 28px;"')+' type="button"><span class="screen-reader-text">'+h._("reload")+'</span> <span class="dashicons dashicons-update"></span> </button>').insertBefore(e)},h.run_meta_box=function(t){var e,a,o=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];h.exist_tag("#"+h.getMetaBoxKey(t))&&(h.is_active("gutenberg")||!h.is_active("gutenberg")&&jQuery("#"+h.getMetaBoxKey(t)).is(":visible"))&&(e=jQuery(h.meta_box_inner(t)),(a=h.get_meta_box_method(t))in h&&("placeholder"in h[a]?e.html(h[a].placeholder()):e.html(h.placeholder()),!0===r&&h.meta_box_button(t),!(t={name:t})!==o&&(t=Object.assign(o,t)),"params"in h[a]&&(t=Object.assign(t,h[a].params())),h.ajaxQ("metabox",t,a,"error_meta_box_data")))},h.run_meta_boxes=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];!1===t&&(t=Object.keys(h.global.meta_boxes)),t.forEach(function(t){h.run_meta_box(t)})},jQuery(document).on("mouseenter mouseleave",".wps-refresh, .wps-more",function(t){"mouseenter"===t.type?h.wordpress_postbox_ajax("disable"):h.wordpress_postbox_ajax("enable")}),jQuery(document).on("click",".wps-refresh",function(t){t.preventDefault();t=jQuery(this).closest(".postbox").attr("id"),t=h.meta_box_name_by_id(t);h.run_meta_box(t)}),jQuery(document).on("click",'input[type=checkbox][id^="wp-statistics-"][id$="-widget-hide"]',function(){var t;jQuery(this).is(":checked")&&(t=jQuery(this).attr("id"),t=h.meta_box_name_by_id(t),h.run_meta_box(t))}),h.btn_group_chart=function(e){var a,t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o={7:h._("str_week"),30:h._("str_month"),365:h._("str_year")};"ago"==t.type&&(a=parseInt(t.days));var r='<div class="wps-btn-group"><div class="btn-group" role="group">';return Object.keys(o).forEach(function(t){r+='<button type="button" class="btn '+(t==a?"btn-primary":"btn-default")+'" data-chart-time="'.concat(e,'" data-time="').concat(t,'">').concat(o[t],"</button>")}),r+='<button type="button" class="btn '+("between"==t.type?"btn-primary":"btn-default")+'" data-custom-date-picker="'.concat(e,'">').concat(h._("custom"),"</button>"),r+="</div></div>",r+='<div data-chart-date-picker="'.concat(e,'"')+("ago"==t.type?' style="display:none;"':"")+'><input type="text" size="18" name="date-from" data-wps-date-picker="from" value="'.concat(t.from,'" placeholder="YYYY-MM-DD" autocomplete="off">')+h._("to")+'<input type="text" size="18" name="date-to" data-wps-date-picker="to" value="'.concat(t.to,'" placeholder="YYYY-MM-DD" autocomplete="off"><input type="submit" value="')+h._("go")+'" data-between-chart-show="'.concat(e,'" class="button-primary"><input type="hidden" name="" id="date-from" value="').concat(t.from,'"><input type="hidden" name="" id="date-to" value="').concat(t.to,'"></div>')},jQuery(document).on("click",".wps-btn-group button",function(){jQuery(".wps-btn-group button").attr("class","btn btn-default"),jQuery(this).attr("class","btn btn-primary")}),jQuery(document).on("click","button[data-custom-date-picker]",function(){jQuery("div[data-chart-date-picker= "+jQuery(this).attr("data-custom-date-picker")+"]").slideDown()}),jQuery(document).on("click","button[data-chart-time]",function(){h.run_meta_box(jQuery(this).attr("data-chart-time"),{ago:jQuery(this).attr("data-time"),"no-data":"no"})}),jQuery(document).on("click","input[data-between-chart-show]",function(){var t=jQuery(this).attr("data-between-chart-show");h.run_meta_box(t,{from:jQuery("div[data-chart-date-picker="+t+"] input[id=date-from]").val(),to:jQuery("div[data-chart-date-picker="+t+"] input[id=date-to]").val(),"no-data":"no"})}),h.browsers_meta_box={placeholder:function(){return h.circle_placeholder()},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],t="";return h.is_active("overview_page")&&(t+=h.btn_group_chart("browsers",e),setTimeout(function(){h.date_picker()},1e3)),t+='<canvas id="'+h.chart_id("browsers")+'" height="220"></canvas>'},meta_box_init:function(t){for(var e,a=0<arguments.length&&void 0!==t?t:[],o=[],r=0;r<=10;r++)e=h.random_color(r),o.push("rgba("+e[0]+","+e[1]+","+e[2]+",0.4)");t=[{label:h._("browsers"),data:a.browsers_value,backgroundColor:o}];if(h.pie_chart(h.chart_id("browsers"),a.browsers_name,t),h.exist_tag("#"+h.getMetaBoxKey("browsers-table"))){["browsers-table","browsers"].forEach(function(t){jQuery("#"+h.getMetaBoxKey(t)+" .inside").removeAttr("style")});for(var s='<div class="title-center">'.concat(a.title,'</div><table width="100%" class="widefat table-stats"><tr><td class="wps-text-danger">').concat(h._("browser"),'</td><td class="wps-text-danger">').concat(h._("visitor_count"),'</td><td class="wps-text-danger">').concat(h._("percentage"),"</td></tr>"),n=0;n<a.browsers_name.length;n++)s+=" <tr><td>".concat(a.browsers_name[n],"</td><td>").concat(0<parseInt(a.browsers_value[n])?"".concat("other"!==a.info.agent[n]?'<a href="'+a.info.visitor_page+"&agent="+a.info.agent[n]+"&from="+a.from+"&to="+a.to+'" target="_blank">':""," ").concat(h.number_format(a.browsers_value[n])," ").concat("other"!==a.info.agent[n]?"</a>":""):a.browsers_value[n],"</td><td>").concat(h.number_format(a.browsers_value[n]/a.total*100),"%</td> </tr>");s+=" <tr><td>".concat(h._("total"),"</td><td>").concat(h.number_format(a.total),"</td><td></td></tr>"),s+="</table>",jQuery("#"+h.getMetaBoxKey("browsers-table")+" .inside").html(s),h.set_equal_height(".postBox-table .inside",".postBox-chart .inside");for(var i="",c=0;c<a.browsers_name.length;c++)0<parseInt(a.browsers_value[c])&&a.info.agent[c]&&(i+='<div class="wps-title-group"><img src="'.concat(a.info.logo[c],'" alt="').concat(a.browsers_name[c],'" style="vertical-align: -3px;"> ').concat(a.browsers_name[c],'</div><div class="wp-clearfix"></div>'),i+=h.Create_Half_PostBox("postBox-chart-"+a.info.agent[c],"browser-"+a.info.agent[c]+"-chart"),i+=h.Create_Half_PostBox("postBox-table-"+a.info.agent[c],"browser-"+a.info.agent[c]+"-table"),i+='<div class="wp-clearfix"></div>');jQuery(i).insertAfter("#browsers-table");for(var l=0;l<a.browsers_name.length;l++)0<parseInt(a.browsers_value[l])&&a.info.agent[l]&&this.run_custom_browser(a.info.agent[l])}},run_custom_browser:function(t){["browser-"+t+"-chart","browser-"+t+"-table"].forEach(function(t){jQuery("#"+t+" .inside").css("height","430px")}),jQuery("#browser-"+t+"-table .inside").html(h.placeholder()),jQuery("#browser-"+t+"-chart .inside").html(h.circle_placeholder()),jQuery(".wps-ph-picture").attr("style","height: 310px;");var e={name:"browsers",browser:t};["from","to"].forEach(function(t){h.isset(h.global,"request_params",t)&&(e[t]=h.global.request_params[t])}),h.ajaxQ(h.global.meta_box_api,e,"show_custom_agent","error_custom_agent","GET",!1)}},h.show_custom_agent=function(n){var i=n.info.agent[0];jQuery("#browser-"+i+"-chart .inside").html('<canvas id="'+h.chart_id("browser-"+i)+'" height="220"></canvas>'),setTimeout(function(){for(var t,e=[],a=0;a<=10;a++)t=h.random_color(a),e.push("rgba("+t[0]+","+t[1]+","+t[2]+",0.4)");var o=[{label:h._("browsers"),data:n.browsers_value,backgroundColor:e}];h.pie_chart(h.chart_id("browser-"+i),n.browsers_name,o),["browser-"+i+"-chart","browser-"+i+"-table"].forEach(function(t){jQuery("#"+t+" .inside").removeAttr("style")});for(var r='<div class="title-center">'.concat(n.title,'</div><table width="100%" class="widefat table-stats"><tr><td class="wps-text-danger">').concat(h._("version_list"),'</td><td class="wps-text-danger">').concat(h._("visitor_count"),'</td><td class="wps-text-danger">').concat(h._("percentage"),"</td></tr>"),s=0;s<n.browsers_name.length;s++)r+=" <tr><td>".concat(n.browsers_name[s],"</td><td>").concat(0<parseInt(n.browsers_value[s])?h.number_format(n.browsers_value[s]):n.browsers_value[s],"</td><td>").concat(h.number_format(n.browsers_value[s]/n.total*100),"%</td></tr>");r+=" <tr><td>".concat(h._("total"),"</td><td>").concat(h.number_format(n.total),"</td><td></td></tr>"),r+="</table>";o="#browser-"+i+"-table .inside";jQuery(o).html(r),h.set_equal_height(o,"#browser-"+i+"-chart .inside")},500)},h.error_custom_agent=function(t){},h.countries_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td width="10%" style=\'text-align: left\'>'.concat(h._("rank"),"</td><td width=\"10%\" style='text-align: left'>").concat(h._("flag"),"</td><td width=\"40%\" style='text-align: left'>").concat(h._("country"),"</td><td width=\"40%\" style='text-align: left'>").concat(h._("visitor_count"),"</td></tr>");var a=1;return t.forEach(function(t){e+="<tr><td style='text-align: left;'>".concat(a,"</td><td style='text-align: left;'><img src=\"").concat(t.flag,'" title="').concat(t.name,'" alt="').concat(t.name,"\"/></td><td style='text-align: left;'>").concat(t.name,"</td><td style='text-align: left;'><a href=\"").concat(t.link,'" title="').concat(t.name,'" target="_blank">').concat(h.number_format(t.number),"</a></td></tr>"),a++}),e+="</tbody></table>"}},h.exclusions_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(t){var e=h.is_active("overview_page")?110:210;h.isset(h.global,"request_params","page")&&"exclusions"===h.global.request_params.page&&(e=80);t="";return t+='<canvas id="'+h.chart_id("exclusions")+'" height="'+e+'"></canvas>'},meta_box_init:function(t){var e=0<arguments.length&&void 0!==t?t:[];this.show_chart(h.chart_id("exclusions"),e),h.isset(h.global,"request_params","page")&&"exclusions"===h.global.request_params.page&&(t="span[id='number-total-chart-exclusions']",h.exist_tag(t)&&(e=h.sum(Object.values(e.total)),jQuery(t).html(h.number_format(e))))},show_chart:function(t,e){var r=1<arguments.length&&void 0!==e?e:[],s="",n=[],i=0;Object.keys(r.exclusions).forEach(function(t){var e,a,o=h.sum(Object.values(r.value[t]));0<o&&(e=r.exclusions[t],a=h.random_color(i),n.push({label:e,data:r.value[t],backgroundColor:"rgba("+a[0]+","+a[1]+","+a[2]+",0.3)",borderColor:"rgba("+a[0]+","+a[1]+","+a[2]+",1)",borderWidth:1,fill:!0}),s+="<tr><th>".concat(e,'</th> <th class="th-center"><span style="color: #9a9494 !important;">').concat(h.number_format(o),"</span></th></tr>"),i++)}),h.exist_tag("table[data-table=exclusions]")&&jQuery(s).insertAfter("table[data-table=exclusions] tr:first"),h.line_chart(t,r.title,r.date,n)}},h.hits_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],a=h.is_active("overview_page")?110:210;h.isset(h.global,"request_params","page")&&"hits"===h.global.request_params.page&&(a=80);t="";return h.is_active("overview_page")&&(t+=h.btn_group_chart("hits",e),setTimeout(function(){h.date_picker()},1e3)),t+='<canvas id="'+h.chart_id("hits")+'" height="'+a+'"></canvas>'},meta_box_init:function(t){var a=0<arguments.length&&void 0!==t?t:[];this.hits_chart(h.chart_id("hits"),a),h.isset(h.global,"request_params","page")&&"hits"===h.global.request_params.page&&["visits","visitors"].forEach(function(t){var e="span[id^='number-total-chart-"+t+"']";h.exist_tag(e)&&jQuery(e).html(a.total[t])})},hits_chart:function(t,e){var a=1<arguments.length&&void 0!==e?e:[],e=a;"hits-chart"in a&&(e=a["hits-chart"]);a=[];h.is_active("visitors")&&a.push({label:h._("visitors"),data:e.visitors,backgroundColor:"rgba(255, 99, 132, 0.2)",borderColor:"rgba(255, 99, 132, 1)",borderWidth:1,fill:!0}),h.is_active("visits")&&a.push({label:h._("visits"),data:e.visits,backgroundColor:"rgba(54, 162, 235, 0.2)",borderColor:"rgba(54, 162, 235, 1)",borderWidth:1,fill:!0}),h.line_chart(t,e.title,e.date,a)}},h.hitsmap_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(){return'<div id="wp-statistics-visitors-map"></div>'},meta_box_init:function(t){var o=0<arguments.length&&void 0!==t?t:[],r=Array();o.hasOwnProperty("country")&&Object.keys(o.country).forEach(function(e){var a="<div class='map-html-marker'><img src='".concat(o.country[e].flag,"' alt=\"").concat(o.country[e].name,"\" title='").concat(o.country[e].name,"' class='log-tools'/> ").concat(o.country[e].name," [").concat(o.total_country[e],"]<hr />");Object.keys(o.visitor[e]).forEach(function(t){a+="<p><img src='".concat(o.visitor[e][t].browser.logo,"' alt=\"").concat(o.visitor[e][t].browser.name,"\" class='log-tools' title='").concat(o.visitor[e][t].browser.name,"'/> ").concat(o.visitor[e][t].ip," ")+("Unknown"!==o.visitor[e][t].city?"- "+o.visitor[e][t].city:"")+"</p>"}),a+="</div>",r[e]=a}),jQuery("#wp-statistics-visitors-map").vectorMap({map:"world_en",backgroundColor:"#fff",borderColor:"#7e7e7e",borderOpacity:.6,color:"#e6e5e2",hoverColor:"#c3403c",colors:o.color,onLabelShow:function(t,e,a){void 0!==r[a]?e.html(r[a]):e.html(e.html()+" [0]<hr />")}})}},h.pages_chart_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(){return'<canvas id="'+h.chart_id("pages-chart")+'" height="80"></canvas>'},meta_box_init:function(t){t=0<arguments.length&&void 0!==t?t:[];this.show_chart(h.chart_id("pages-chart"),t),h.exist_tag("span[id=number-total-visits]")&&jQuery("span[id=number-total-visits]").html(t.total),h.exist_tag("span[id=number-total-chart-visits]")&&jQuery("span[id=number-total-chart-visits]").html(t.total_dates)},show_chart:function(t,e){e=1<arguments.length&&void 0!==e?e:[];h.line_chart(t,e.title,e.date,[{label:h._("visits"),data:e.stat,backgroundColor:"rgba(54, 162, 235, 0.2)",borderColor:"rgba(54, 162, 235, 1)",borderWidth:1,fill:!0}])}},h.pages_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td width=\'10%\'>'.concat(h._("id"),"</td><td width='40%'>").concat(h._("title"),"</td><td width='40%'>").concat(h._("link"),"</td><td width='10%'>").concat(h._("visits"),"</td></tr>");var a=1;return t.forEach(function(t){e+="<tr><td style='text-align: left;'>".concat(a,"</td><td style='text-align: left;'><span title='").concat(t.title,"' class='wps-cursor-default wps-text-wrap'>").concat(t.title,"</span></td><td style='text-align: left;'><a href=\"").concat(t.link,'" title="').concat(t.title,'" target="_blank">').concat(t.str_url,'</a></td><td style="text-align: left"><a href="').concat(t.hits_page,'" class="wps-text-danger">').concat(t.number,"</a></td></tr>"),a++}),e+="</tbody></table>"}},h.platforms_meta_box={placeholder:function(){return h.circle_placeholder()},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],t="";return h.is_active("overview_page")&&(t+=h.btn_group_chart("platforms",e),setTimeout(function(){h.date_picker()},1e3)),t+='<canvas id="'+h.chart_id("platforms")+'" height="220"></canvas>'},meta_box_init:function(t){for(var e,a=0<arguments.length&&void 0!==t?t:[],o=[],r=0;r<=20;r++)e=h.random_color(),o.push("rgba("+e[0]+","+e[1]+","+e[2]+",0.4)");t=[{label:h._("platform"),data:a.platform_value,backgroundColor:o}];if(h.pie_chart(h.chart_id("platforms"),a.platform_name,t),h.exist_tag("#"+h.getMetaBoxKey("platforms-table"))){["platforms-table","platforms"].forEach(function(t){jQuery("#"+h.getMetaBoxKey(t)+" .inside").removeAttr("style")});for(var s='<div class="title-center">'.concat(a.title,'</div><table width="100%" class="widefat table-stats"><tr><td class="wps-text-danger">').concat(h._("platform"),'</td><td class="wps-text-danger">').concat(h._("visitor_count"),'</td><td class="wps-text-danger">').concat(h._("percentage"),"</td></tr>"),n=0;n<a.platform_name.length;n++)s+=" <tr><td>".concat(a.platform_name[n],"</td><td>").concat(0<parseInt(a.platform_value[n])?'<a href="'+a.info.visitor_page+"&platform="+a.platform_name[n]+"&from="+a.from+"&to="+a.to+'" target="_blank"> '.concat(h.number_format(a.platform_value[n])," </a>"):h.number_format(a.platform_value[n]),"</td><td>").concat(h.number_format(a.platform_value[n]/a.total*100),"%</td> </tr>");s+=" <tr><td>".concat(h._("total"),"</td><td>").concat(h.number_format(a.total),"</td><td></td></tr>"),s+="</table>",jQuery("#"+h.getMetaBoxKey("platforms-table")+" .inside").html(s),h.set_equal_height(".postBox-table .inside",".postBox-chart .inside")}}},h.post_meta_box={params:function(){return{ID:h.global.page.ID}},view:function(t){t=0<arguments.length&&void 0!==t?t:[];return t.hasOwnProperty("content")?'<div class="wps-center" style="padding: 15px;"> '+t.content+"</div>":'<canvas id="'+h.chart_id("post")+'" height="85"></canvas>'},meta_box_init:function(t){t=0<arguments.length&&void 0!==t?t:[];t.hasOwnProperty("content")?jQuery("#"+h.getMetaBoxKey("post")+" button[onclick]").remove():this.post_hits_chart(h.chart_id("post"),t)},post_hits_chart:function(t,e){e=1<arguments.length&&void 0!==e?e:[];h.line_chart(t,e.title,e.date,[{label:e.post_title,data:e.state,backgroundColor:"rgba(255, 99, 132, 0.2)",borderColor:"rgba(255, 99, 132, 1)",borderWidth:1,fill:!0}])}},h.quickstats_meta_box={view:function(t){var e=0<arguments.length&&void 0!==t?t:[],t="";return t+='<table width="100%" class="widefat table-stats wps-summary-stats"><tbody>',t+=h.summary_meta_box.summary_statistics(e),t+="</tbody></table>",t+='<br><hr width="80%"/><br>',t+='<canvas id="'+h.chart_id("quickstats")+'" height="210"></canvas>'},meta_box_init:function(t){t=0<arguments.length&&void 0!==t?t:[];h.hits_meta_box.hits_chart(h.chart_id("quickstats"),t)}},h.recent_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";return e+='<div class="wp-statistics-responsive-table">',e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td>'.concat(h._("browser"),"</td>")+(h.is_active("geo_ip")?"<td>".concat(h._("country"),"</td>"):"")+""+(h.is_active("geo_city")?"<td>".concat(h._("city"),"</td>"):"")+"<td>".concat(h._("date"),"</td><td>").concat(h._("ip"),"</td><td>").concat(h._("referrer"),"</td></tr>"),t.forEach(function(t){e+='<tr><td style="text-align: left"><a href="'.concat(t.browser.link,'" title="').concat(t.browser.name,'"><img src="').concat(t.browser.logo,'" alt="').concat(t.browser.name,"\" class='log-tools' title='").concat(t.browser.name,"'/></a></td>")+(h.is_active("geo_ip")?'<td style="text-align: left"><img src=\''.concat(t.country.flag,"' alt='").concat(t.country.name,"' title='").concat(t.country.name,"' class='log-tools'/></td>"):"")+""+(h.is_active("geo_city")?"<td>".concat(t.city,"</td>"):"")+'<td style="text-align: left">'.concat(t.date,'</td><td style="text-align: left">')+(t.hash_ip||"<a href='".concat(t.ip.link,"'>").concat(t.ip.value,"</a>"))+'</td><td style="text-align: left">'.concat(t.referred,"</td></tr>")}),e+="</tbody></table>",e+="</div>"}},h.referring_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";return e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td width="80%">'.concat(h._("address"),'</td><td width="20%">').concat(h.meta_box_lang("referring","references"),"</td></tr>"),t.forEach(function(t){e+="<tr><td>"+h.site_icon(t.domain)+" <a href='//".concat(t.domain,"' title='").concat(t.title,'\' target="_blank">').concat(t.domain,"</a><span class='wps-cursor-default wps-referring-widget-ip'")+(2<t.country.length?' title="'.concat(t.country,'"'):"")+">".concat(t.ip,'</span></td><td class="wps-middle-vertical"><a href="').concat(t.page_link,'">').concat(t.number,"</a></td></tr>")}),e+="</tbody></table>"}},h.search_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],a=h.is_active("overview_page")?110:210;h.isset(h.global,"request_params","page")&&"searches"===h.global.request_params.page&&(a=80);t="";return h.is_active("overview_page")&&(t+=h.btn_group_chart("search",e),setTimeout(function(){h.date_picker()},1e3)),t+='<canvas id="'+h.chart_id("search")+'" height="'+a+'"></canvas>'},meta_box_init:function(t){var a=0<arguments.length&&void 0!==t?t:[],o=[],r=0;Object.keys(a["search-engine"]).forEach(function(t){var e=a["search-engine"][t].name,t=h.random_color(r);o.push({label:e,data:a.stat[e],backgroundColor:"rgba("+t[0]+","+t[1]+","+t[2]+",0.3)",borderColor:"rgba("+t[0]+","+t[1]+","+t[2]+",1)",borderWidth:1,fill:!0}),r++}),1===a.total.active&&o.push({label:h._("total"),data:a.total.stat,backgroundColor:"rgba("+a.total.color+", 0.2)",borderColor:"rgba("+a.total.color+", 1)",borderWidth:1,fill:!0}),h.line_chart(h.chart_id("search"),a.title,a.date,o)}},h.summary_meta_box={summary_statistics:function(t){var o=0<arguments.length&&void 0!==t?t:[],r="";return o.user_online&&(r="<tr><th>".concat(h._("online_users"),':</th><th colspan="2" id="th-colspan"><span><a href="').concat(o.user_online.link,'">').concat(o.user_online.value,"</a></span></th></tr>")),(h.is_active("visitors")||h.is_active("visits"))&&function(){r+='<tr><th width="60%"></th>',["visitors","visits"].forEach(function(t){r+='<th class="th-center">'+(h.is_active(t)?h._(t):"")+"</th>"}),r+="</tr>";for(var a=["today","yesterday","week","month","year","total"],t=0;t<a.length;t++)!function(e){r+="<tr><th>".concat(h._(a[e]),": </th>"),["visitors","visits"].forEach(function(t){r+='<th class="th-center">'+(h.is_active(t)?'<a href="'.concat(o[t][a[e]].link,'"><span>').concat(o[t][a[e]].value,"</span></a>"):"")+"</th>"}),r+="</tr>"}(t)}(),r},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],a="";return a+='<table width="100%" class="widefat table-stats wps-summary-stats"><tbody>',a+=this.summary_statistics(e),h.is_active("visitors")&&(a+='<tr><th colspan="3"><br><hr></th></tr>',a+='<tr><th colspan="3" style="text-align: center;">'.concat(h.meta_box_lang("summary","search_engine"),'</th></tr><tr><th width="60%"></th><th class="th-center">').concat(h._("today"),'</th><th class="th-center">').concat(h._("yesterday"),"</th></tr>"),Object.keys(e["search-engine"]).forEach(function(t){a+='<tr><th><img src="'.concat(e["search-engine"][t].logo,'" alt="').concat(e["search-engine"][t].name,'" class="wps-engine-logo"> ').concat(e["search-engine"][t].name,':</th><th class="th-center"><span>').concat(e["search-engine"][t].today,'</span></th><th class="th-center"><span>').concat(e["search-engine"][t].yesterday,"</span></th></tr>")}),a+="<tr><th>".concat(h._("daily_total"),':</th><td id="th-colspan" class="th-center"><span>').concat(e["search-engine-total"].today,'</span></td><td id="th-colspan" class="th-center"><span>').concat(e["search-engine-total"].yesterday,"</span></td></tr><tr><th>").concat(h._("total"),':</th><th colspan="2" id="th-colspan"><span>').concat(e["search-engine-total"].total,"</span></th></tr>")),a+=' <tr><th colspan="3"><br><hr></th></tr><tr><th colspan="3" style="text-align: center;">'.concat(h.meta_box_lang("summary","current_time_date"),'<span id="time_zone"><a href="').concat(e.timezone["option-link"],'"> ').concat(h.meta_box_lang("summary","adjustment"),'</a></span></th></tr><tr><th colspan="3">').concat(h._("date"),': <code dir="ltr">').concat(e.timezone.date,'</code></th></tr><tr> <th colspan="3">').concat(h._("time"),': <code dir="ltr">').concat(e.timezone.time,"</code></th></tr>"),a+="</tbody></table>"}},h.top_pages_chart_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],t="";return t+=h.btn_group_chart("top-pages-chart",e),setTimeout(function(){h.date_picker()},1e3),t+='<canvas id="'+h.chart_id("top-pages-chart")+'" height="80"></canvas>'},meta_box_init:function(t){t=0<arguments.length&&void 0!==t?t:[];this.top_pages_chart(h.chart_id("top-pages-chart"),t)},top_pages_chart:function(t,e){var a=1<arguments.length&&void 0!==e?e:[],o=[],r=0;Object.keys(a.stat).forEach(function(t){var e=h.random_color(r);o.push({label:t,data:a.stat[t],backgroundColor:"rgba("+e[0]+","+e[1]+","+e[2]+",0.3)",borderColor:"rgba("+e[0]+","+e[1]+","+e[2]+",1)",borderWidth:1,fill:!0}),r++}),h.line_chart(t,a.title,a.date,o)}},h.top_visitors_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";e+='<div class="wp-statistics-responsive-table">',e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td>'.concat(h._("rank"),"</td><td>").concat(h._("hits"),"</td>")+(h.is_active("geo_ip")?"<td>".concat(h._("flag"),"</td><td>").concat(h._("country"),"</td>"):"")+""+(h.is_active("geo_city")?"<td>".concat(h._("city"),"</td>"):"")+"<td>".concat(h._("ip"),"</td><td>").concat(h._("agent"),"</td><td>").concat(h._("platform"),"</td><td>").concat(h._("version"),"</td></tr>");var a=1;return t.forEach(function(t){e+="<tr><td>".concat(a,"</td><td>").concat(t.hits,"</td>")+(h.is_active("geo_ip")?"<td><img src='".concat(t.country.flag,"' alt='").concat(t.country.name,"' title='").concat(t.country.name,"' class='log-tools'/></td><td>").concat(t.country.name,"</td>"):"")+""+(h.is_active("geo_city")?"<td>".concat(t.city,"</td>"):"")+"<td>"+(t.hash_ip||"<a href='".concat(t.ip.link,"'>").concat(t.ip.value,"</a>"))+"</td><td>".concat(t.agent,"</td><td>").concat(t.platform,"</td><td>").concat(t.version,"</td></tr>"),a++}),e+="</tbody></table>",e+="</div>"}},h.useronline_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";return e+='<table class="widefat table-stats wps-report-table wps-table-fixed"><tr>'+(h.is_active("geo_ip")?"<td style='text-align: left;'>".concat(h._("country"),"</td>"):"")+"<td style='text-align: left;'>".concat(h._("ip"),"</td><td width=\"35%\" style='text-align: left;'>").concat(h._("page"),"</td><td style='text-align: left;'>").concat(h._("referrer"),"</td></tr>"),t.forEach(function(t){e+="<tr>"+(h.is_active("geo_ip")?'<td style="text-align: left"><img src=\''.concat(t.country.flag,"' alt='").concat(t.country.name,"' title='").concat(t.country.name,"' class='log-tools'/></td>"):"")+"<td style='text-align: left !important'>"+(t.hash_ip||t.ip.value)+"</td><td style='text-align: left !important;'><span class=\"wps-text-wrap\">"+(2<t.page.link.length?'<a href="'.concat(t.page.link,'" title="').concat(t.page.title,'" target="_blank" class="wps-text-danger">'):"")+t.page.title+(2<t.page.link.length?"</a>":"")+'</span></td><td style="text-align: left !important">'.concat(t.referred,"</td></tr>")}),e+="</table>"}},h.words_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";e+='<div class="wp-statistics-responsive-table">',e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td>'.concat(h._("word"),"</td><td>").concat(h._("browser"),"</td>")+(h.is_active("geo_ip")?"<td>".concat(h._("country"),"</td>"):"")+""+(h.is_active("geo_city")?"<td>".concat(h._("city"),"</td>"):"")+"<td>".concat(h._("date"),"</td><td>").concat(h._("ip"),"</td><td>").concat(h._("referrer"),"</td></tr>");return t.forEach(function(t){e+='<tr><td style="text-align: left"><span title=\''.concat(t.word,"' class='wps-cursor-default wps-text-wrap")+(h.is_active("overview_page")?" wps-200-px":"")+"'>".concat(t.word,'</span></td><td style="text-align: left"><a href="').concat(t.browser.link,'" title="').concat(t.browser.name,'"><img src="').concat(t.browser.logo,'" alt="').concat(t.browser.name,"\" class='log-tools' title='").concat(t.browser.name,"'/></a></td>")+(h.is_active("geo_ip")?'<td style="text-align: left"><img src=\''.concat(t.country.flag,"' alt='").concat(t.country.name,"' title='").concat(t.country.name,"' class='log-tools'/></td>"):"")+(h.is_active("geo_city")?'<td style="text-align: left">'.concat(t.city,"</td>"):"")+'<td style="text-align: left">'.concat(t.date,'</td><td style="text-align: left">')+(t.hash_ip||"<a href='".concat(t.ip.link,"'>").concat(t.ip.value,"</a>"))+'</td><td style="text-align: left">'.concat(t.referred,"</td></tr>"),0}),e+="</tbody></table>",e+="</div>"}},h.isset(h.global,"request_params","page")&&"authors"===h.global.request_params.page&&(a={ago:30,type:"author",ID:0},["from","to","ID"].forEach(function(t){h.isset(h.global,"request_params",t)&&(a[t]=h.global.request_params[t])}),jQuery("span[id^='number-total-']").html(h.rectangle_placeholder("wps-text-placeholder")),h.run_meta_box("pages-chart",a,!1)),h.isset(h.global,"request_params","page")&&"browser"===h.global.request_params.page&&(o={},["from","to"].forEach(function(t){h.isset(h.global,"request_params",t)&&(o[t]=h.global.request_params[t])}),["browsers-table","browsers"].forEach(function(t){jQuery("#"+h.getMetaBoxKey(t)+" .inside").css("height","430px")}),jQuery("#wp-statistics-browsers-table-widget .inside").html(h.placeholder()),jQuery(".wps-ph-picture").attr("style","height: 310px;"),h.run_meta_box("browsers",o,!1)),h.isset(h.global,"request_params","page")&&"categories"===h.global.request_params.page&&(r={ago:30,type:"category",ID:0},["from","to","ID"].forEach(function(t){h.isset(h.global,"request_params",t)&&(r[t]=h.global.request_params[t])}),jQuery("span[id^='number-total-']").html(h.rectangle_placeholder("wps-text-placeholder")),h.run_meta_box("pages-chart",r,!1)),h.isset(h.global,"request_params","page")&&"countries"===h.global.request_params.page&&(s={limit:0},["from","to"].forEach(function(t){h.isset(h.global,"request_params",t)&&(s[t]=h.global.request_params[t])}),h.run_meta_box("countries",s,!1)),h.isset(h.global,"request_params","page")&&"exclusions"===h.global.request_params.page&&(n=h.isset(h.global,"request_params","from")&&h.isset(h.global,"request_params","to")?{from:h.global.request_params.from,to:h.global.request_params.to}:{ago:30},jQuery("span[id^='number-total-chart-']").html(h.rectangle_placeholder("wps-text-placeholder")),h.run_meta_box("exclusions",n,!1)),h.isset(h.global,"request_params","page")&&"hits"===h.global.request_params.page&&(n=h.isset(h.global,"request_params","from")&&h.isset(h.global,"request_params","to")?{from:h.global.request_params.from,to:h.global.request_params.to}:{ago:30},jQuery("span[id^='number-total-chart-']").html(h.rectangle_placeholder("wps-text-placeholder")),h.run_meta_box("hits",n,!1)),h.isset(h.global,"request_params","page")&&"overview"===h.global.request_params.page&&h.isset(h.global,"overview","ads")&&h.is_active("overview_ads")&&(i='<div id="wps_overview_ads_postbox" class="postbox"><div class="inside"><div class="close-overview-ads"><span class="dashicons dashicons-dismiss"></span></div><a href="'.concat(h.global.overview.ads.link,'" title="').concat(h.global.overview.ads.title,'" ').concat("yes"==h.global.overview.ads._target?' target="_blank"':"",'><img src="').concat(h.global.overview.ads.image,'" id="wps_overview_ads_image" alt="').concat(h.global.overview.ads.title,'"></a></div></div>'),jQuery(i).insertAfter("#wps-postbox-container-2 #normal-sortables div.postbox:first"),jQuery(document).on("click",".close-overview-ads",function(){jQuery("#wps_overview_ads_postbox").fadeOut("normal"),jQuery.ajax({url:h.global.admin_url+"admin-ajax.php",type:"get",data:{action:"wp_statistics_close_overview_ads",ads_id:""+h.global.overview.ads.ID,wps_nonce:""+h.global.rest_api_nonce},datatype:"json"})}),jQuery("#wps-donate-notice").on("click",".notice-dismiss",function(){jQuery.ajax({url:h.global.admin_url+"admin-ajax.php",type:"get",data:{action:"wp_statistics_close_notice",notice:"donate",wps_nonce:""+h.global.rest_api_nonce},datatype:"json"})}),jQuery("#wps_overview_ads_image").on("error",function(){jQuery("#wps_overview_ads_postbox").remove()})),h.isset(h.global,"request_params","page")&&"pages"===h.global.request_params.page&&(h.isset(h.global,"request_params","ID")&&h.isset(h.global,"request_params","type")?(i=h.isset(h.global,"request_params","from")&&h.isset(h.global,"request_params","to")?{from:h.global.request_params.from,to:h.global.request_params.to}:{ago:30},i=Object.assign(i,{ID:h.global.request_params.ID,type:h.global.request_params.type}),h.run_meta_box("pages-chart",i,!1),h.exist_tag("form#wp-statistics-select-pages")&&h.select2(),jQuery(document).on("change","select[name=ID]",function(){jQuery("span.submit-form").html(h._("please_wait")),jQuery(this).closest("form").trigger("submit")})):(h.isset(h.global,"request_params","pagination-page")&&(l={paged:h.global.request_params["pagination-page"]}),h.run_meta_box("pages",l,!1),h.run_meta_box("top-pages-chart",{}))),h.isset(h.global,"request_params","page")&&"platform"===h.global.request_params.page&&(c={},["from","to"].forEach(function(t){h.isset(h.global,"request_params",t)&&(c[t]=h.global.request_params[t])}),["platforms-table","platforms"].forEach(function(t){jQuery("#"+h.getMetaBoxKey(t)+" .inside").css("height","430px")}),jQuery("#wp-statistics-platforms-table-widget .inside").html(h.placeholder()),jQuery(".wps-ph-picture").attr("style","height: 310px;"),h.run_meta_box("platforms",c,!1)),h.isset(h.global,"request_params","page")&&"searches"===h.global.request_params.page&&(l=h.isset(h.global,"request_params","from")&&h.isset(h.global,"request_params","to")?{from:h.global.request_params.from,to:h.global.request_params.to}:{ago:30},h.run_meta_box("search",l,!1)),jQuery(".wp-statistics-settings").length&&((d=function(t){if(t=new RegExp("[?&]"+t+"=([^&#]*)").exec(window.location.href))return t[1]}("tab"))&&g(d),jQuery(".wp-statistics-settings ul.tabs li").click(function(){g(jQuery(this).attr("data-tab"))})),m("input[name=wps_visitors]","tr[data-view=visitors_log_tr]"),m("input[name=wps_referrerspam]","tr.referrerspam_field"),h.isset(h.global,"request_params","page")&&"settings"===h.global.request_params.page&&(jQuery("#wp-statistics-settings-form ul.tabs li").click(function(t){t.preventDefault();t=e(this).attr("data-tab");"undefined"!=typeof localStorage&&localStorage.setItem("wp-statistics-settings-active-tab",t)}),"undefined"==typeof localStorage||!h.isset(h.global,"request_params","save_setting")||"yes"!==h.global.request_params.save_setting||0<(d=localStorage.getItem("wp-statistics-settings-active-tab")).length&&e("#wp-statistics-settings-form ul.tabs li[data-tab="+d+"]").click()),h.isset(h.global,"request_params","page")&&"tags"===h.global.request_params.page&&(p={ago:30,type:"post_tag",ID:0},["from","to","ID"].forEach(function(t){h.isset(h.global,"request_params",t)&&(p[t]=h.global.request_params[t])}),jQuery("span[id^='number-total-']").html(h.rectangle_placeholder("wps-text-placeholder")),h.run_meta_box("pages-chart",p,!1)),h.isset(h.global,"request_params","page")&&"visitors"===h.global.request_params.page&&(u=function(t,o){var r='<table class="widefat">',s={browsers:["agent","browsers"],country:["location","location"],platform:["platform","platform"],referrer:["referrer","referrer"],user:["user_id","users"]};Object.keys(s).forEach(function(e){r+="<tr><td>".concat(h._(e),"</td></tr>"),r+='<tr><td><select name="'.concat(s[e][0],'" class="select2 wps-width-100" data-type-show="select2">'),r+="<option value=''>".concat(h._("all"),"</option>");var a=h.getLinkParams(s[e][0]);Object.keys(o[s[e][1]]).forEach(function(t){r+="<option value='".concat(t,"' ").concat(null!=a&&a==t?"selected":"",">").concat(o[s[e][1]][t],"</option>")}),r+="</select></td></tr>"}),r+="<tr><td>".concat(h._("ip"),"</td></tr>"),r+='<tr><td><input name="ip" value="'.concat(null!=h.getLinkParams("ip")?h.getLinkParams("ip"):"",'" class="wps-width-100" placeholder=\'xxx.xxx.xxx.xxx\' autocomplete="off"></td></tr>'),r+="<tr><td>".concat(h._("date"),"</td></tr>");var e="width: calc(50% - 5px);display: inline-block;";r+='<tr><td><div style="'.concat(e,'">').concat(h._("from"),': <input name="date-from" data-wps-date-picker="from" value="').concat(null!=h.getLinkParams("from")?h.getLinkParams("from"):"",'" style="width: calc(100% - 5px);" placeholder="YYYY-MM-DD" autocomplete="off"></div><div style="').concat(e,'">').concat(h._("to"),': <input name="date-to" data-wps-date-picker="to" value="').concat(null!=h.getLinkParams("to")?h.getLinkParams("to"):"",'" style="width: 100%;" placeholder="YYYY-MM-DD" autocomplete="off"></div><input type="hidden" name="from" id="date-from" value="').concat(null!=h.getLinkParams("from")?h.getLinkParams("from"):"",'"><input type="hidden" name="to" id="date-to" value="').concat(null!=h.getLinkParams("to")?h.getLinkParams("to"):"",'"></td></tr>'),r+="<tr><td></td></tr>",r+='<tr><td><input type="submit" value="'.concat(h._("filter"),'" class="button-primary"> <span class="filter-loading"></span></td></tr>'),r+="</table>",jQuery(t).html(r),setTimeout(function(){h.date_picker(),h.select2()},200)},jQuery(document).on("click","div#visitors-filter",function(t){t.preventDefault(),tb_show("","#TB_inline?&width=430&height=668&inlineId=visitors-filter-popup"),setTimeout(function(){var t,e,a="#wps-visitors-filter-form";h.exist_tag(a+" input[type=submit]")||(jQuery(a).html('<div style="height: 50px;"></div>'+h.line_placeholder(5)),t=localStorage.getItem("wp-statistics-visitors-filter")?JSON.parse(localStorage.getItem("wp-statistics-visitors-filter")):{},!h.isset(t,"timestamp")||!h.isset(t,"value")||h.isset(t,"timestamp")&&h.isset(t,"value")&&(new Date).getTime().toString()>parseInt(t.timestamp)?(e={wps_nonce:h.global.rest_api_nonce,action:"wp_statistics_visitors_page_filters"},e=Object.assign(e,h.global.request_params),jQuery.ajax({url:h.global.admin_url+"admin-ajax.php",type:"GET",dataType:"json",data:e,timeout:3e4,success:function(t){localStorage.setItem("wp-statistics-visitors-filter",JSON.stringify({value:t,timestamp:(new Date).getTime()+216e5})),u(a,t)},error:function(){jQuery("span.tb-close-icon").click()}})):u(a,t.value))},500)}),_="#wp_statistics_visitors_filter_form",jQuery(document).on("submit",_,function(){var t=jQuery(_+" input[name=date-from]"),e=jQuery(_+" input[name=date-to]");if(0<t.val().length&&e.val().length<1||t.val().length<1&&1<e.val().length)return alert(h._("er_datepicker")),!1;e=jQuery(_+" input[name=ip]").val();if(0<e.length&&!1===h.isIP(e))return alert(h._("er_valid_ip")),!1;jQuery("input[data-wps-date-picker]").prop("disabled",!0);var o={input:["date-from","date-to","ip"],select:["agent","platform","location","referrer","user_id"]};Object.keys(o).forEach(function(a){o[a].forEach(function(e){var t=jQuery(_+" "+a+"[name="+e+"]");t.val().length<1&&(t.prop("disabled",!0),["from","to"].forEach(function(t){e=="date-"+t&&jQuery(_+" input[name="+t+"]").prop("disabled",!0)}))})});e=h.getLinkParams("order");return null!=e&&jQuery(this).append('<input type="hidden" name="order" value="'+e+'" /> '),jQuery("span.filter-loading").html(h._("please_wait")),!0})),h.date_picker(),("index.php"===h.global.page.file||h.is_active("overview_page")||"post-new.php"===h.global.page.file||"post.php"===h.global.page.file&&h.isset(h.global,"page","ID"))&&h.run_meta_boxes()});
|
1 |
+
"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}jQuery(document).ready(function(e){var t;t=function(c){var l={},d={};c.ajaxq=function(e,a){if(void 0===a)throw"AjaxQ: queue name is not provided";var o=c.Deferred(),t=o.promise();t.success=t.done,t.error=t.fail,t.complete=t.always;var r,s="function"==typeof a,n=s?null:c.extend(!0,{},a);return r=function(){var t=c.ajax.apply(window,[s?a():n]);return t.done(function(){o.resolve.apply(this,arguments)}),t.fail(function(){o.reject.apply(this,arguments)}),t.always(i),t},l[e]?l[e].push(r):(l[e]=[],r=r(),d[e]=r),t;function i(){var t;l[e]&&((t=l[e].shift())?(t=t(),d[e]=t):(delete l[e],delete d[e]))}},c.each(["getq","postq"],function(t,s){c[s]=function(t,e,a,o,r){return c.isFunction(a)&&(r=r||o,o=a,a=void 0),c.ajaxq(t,{type:"postq"===s?"post":"get",url:e,data:a,success:o,dataType:r})}});function e(t){return l.hasOwnProperty(t)&&0<l[t].length||d.hasOwnProperty(t)}c.ajaxq.isRunning=function(t){return t?e(t):function(){for(var t in l)if(e(t))return!0;return!1}()},c.ajaxq.getActiveRequest=function(t){if(!t)throw"AjaxQ: queue name is required";return d[t]},c.ajaxq.abort=function(t){if(!t)throw"AjaxQ: queue name is required";var e=c.ajaxq.getActiveRequest(t);delete l[t],delete d[t],e&&e.abort()},c.ajaxq.clear=function(t){if(t)l[t]&&(l[t]=[]);else for(var e in l)l.hasOwnProperty(e)&&(l[e]=[])}},"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=t(require("jquery")):t(jQuery);var a,o,r,s,n,i,c,l,d,p,u,_,h={};function g(t){jQuery(".wp-statistics-settings ul.tabs li").removeClass("current"),jQuery(".wp-statistics-settings .tab-content").removeClass("current"),jQuery("[data-tab="+t+"]").addClass("current"),jQuery("#"+t).addClass("current"),jQuery("#wp-statistics-settings-form").length&&(t=jQuery(location).attr("href")+"&tab="+t,jQuery("#wp-statistics-settings-form").attr("action",t).submit())}function m(t,e){jQuery(document).on("change",t,function(t){t.preventDefault();t=jQuery(e);this.checked?t.show("slow"):(t.hide("slow"),t.find("input[type=checkbox]").prop("checked",!1))})}h.global="undefined"!=typeof wps_global?wps_global:[],h._=function(t){return t in this.global.i18n?this.global.i18n[t]:""},h.is_active=function(t){return 1===h.global.options[t]},h.ajax_queue={key:"wp-statistics",time:400},h.ajaxQ=function(e,a,o,r){var t=4<arguments.length&&void 0!==arguments[4]?arguments[4]:"GET",s=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];!1!==e&&"metabox"!==e||(e=h.global.meta_box_api);t={url:e,type:t,dataType:"json",crossDomain:!0,cache:!1,data:a,success:function(t){e===h.global.meta_box_api&&!0===s?t.no_data?jQuery(h.meta_box_inner(a.name)).empty().html(h.no_meta_box_data()):(jQuery(h.meta_box_inner(a.name)).empty().html(h[o].view(t)),h[o].meta_box_init&&setTimeout(function(){h[o].meta_box_init(t)},150)):h[o](t)},error:function(t){e===h.global.meta_box_api&&!0===s?jQuery(h.meta_box_inner(a.name)).empty().html(h[r](t.responseText)):h[r](t.responseText)}};e===h.global.meta_box_api&&(t.beforeSend=function(t){t.setRequestHeader("X-WP-Nonce",h.global.rest_api_nonce),t.setRequestHeader("Access-Control-Allow-Origin","*")}),jQuery.ajaxq(h.ajax_queue.key,t)},h.placeholder=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return'<div class="wps-ph-item"><div class="wps-ph-col-12">'.concat(h.placeholder_content("picture"),"").concat(h.placeholder_content("line"),"</div>")+(!1!==t?t:"")+"</div>"},h.line_placeholder=function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,e='<div class="wps-ph-item">',a=0;a<t;a++)e+='<div class="wps-ph-col-12"> <div class="wps-ph-row"><div class="wps-ph-col-6 big"></div><div class="wps-ph-col-4 empty big"></div><div class="wps-ph-col-4"></div><div class="wps-ph-col-8 empty"></div><div class="wps-ph-col-6"></div><div class="wps-ph-col-6 empty"></div><div class="wps-ph-col-12"></div> </div></div>';return e+="</div>"},h.circle_placeholder=function(){return'<div class="wps-ph-item"> '.concat(h.placeholder_content("circle"),"</div>")},h.rectangle_placeholder=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return'<div class="wps-ph-item'+(0<t.length?" "+t:"")+'"><div class="wps-ph-col-12">'.concat(h.placeholder_content("picture"),"</div></div>")},h.placeholder_content=function(){var t="";switch(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"line"){case"picture":t='<div class="wps-ph-picture"></div>';break;case"line":t='<div class="wps-ph-row"><div class="wps-ph-col-6 big"></div><div class="wps-ph-col-4 empty big"></div><div class="wps-ph-col-2 big"></div><div class="wps-ph-col-4"></div><div class="wps-ph-col-8 empty"></div><div class="wps-ph-col-6"></div><div class="wps-ph-col-6 empty"></div><div class="wps-ph-col-12"></div> </div>';break;case"circle":t='<div class="wps-ph-col-2"></div><div class="wps-ph-col-8"><div class="wps-ph-avatar"></div></div>'}return t},h.exist_tag=function(t){return jQuery(t).length},h.date_picker=function(){jQuery.fn.datepicker&&"undefined"!=typeof wps_i18n_jquery_datepicker&&jQuery("input[data-wps-date-picker]").datepicker({monthNames:wps_i18n_jquery_datepicker.monthNames,monthNamesShort:wps_i18n_jquery_datepicker.monthNamesShort,dayNames:wps_i18n_jquery_datepicker.dayNames,dayNamesShort:wps_i18n_jquery_datepicker.dayNamesShort,dayNamesMin:wps_i18n_jquery_datepicker.dayNamesMin,dateFormat:wps_i18n_jquery_datepicker.dateFormat,firstDay:wps_i18n_jquery_datepicker.firstDay,isRTL:wps_i18n_jquery_datepicker.isRTL,onSelect:function(t){var e=jQuery(this).attr("data-wps-date-picker");0<t.length&&jQuery("input[id=date-"+e+"]").val(t)}})},h.select2=function(){jQuery("select[data-type-show=select2]").select2()},h.redirect=function(t){window.location.replace(t)},h.line_chart=function(t,e,a,o){t=document.getElementById(t).getContext("2d");h.is_active("rtl")&&(Chart.defaults.global.defaultFontFamily="tahoma"),new Chart(t,{type:"line",data:{labels:a,datasets:o},options:{responsive:!0,legend:{position:"bottom"},animation:{duration:1500},title:{display:!0,text:e},tooltips:{mode:"index",intersect:!1},scales:{yAxes:[{ticks:{beginAtZero:!0}}]}}})},h.pie_chart=function(t,e,a){var o=3<arguments.length&&void 0!==arguments[3]&&arguments[3],t=document.getElementById(t).getContext("2d");h.is_active("rtl")&&(Chart.defaults.global.defaultFontFamily="tahoma"),!1===o&&(o=function(t,e){var a=e.datasets[t.datasetIndex],o=a.data.reduce(function(t,e,a,o){return t+e}),a=a.data[t.index];return Math.floor(a/o*100+.5)+"% - "+e.labels[t.index]}),new Chart(t,{type:"pie",data:{labels:e,datasets:a},options:{responsive:!0,legend:{position:"bottom"},animation:{duration:1500},tooltips:{callbacks:{label:o}}},plugins:[{afterDraw:function(t){var e,a,o;!0===t.data.datasets[0].data.every(function(t){return 0==t})&&(e=t.chart.ctx,a=t.chart.width,o=t.chart.height,t.clear(),e.save(),e.textAlign="center",e.textBaseline="middle",e.font="14px normal 'tahoma'",e.fillText(h._("no_data"),a/2,o/2),e.restore())}}]})},h.chart_id=function(t){return"wp-statistics-"+t+"-meta-box-chart"},h.random_color=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=[[243,156,18,"#f39c12"],[52,152,219,"#3498db"],[192,57,43,"#c0392b"],[155,89,182,"#9b59b6"],[39,174,96,"#27ae60"],[230,126,34,"#e67e22"],[142,68,173,"#8e44ad"],[46,204,113,"#2ecc71"],[41,128,185,"#2980b9"],[22,160,133,"#16a085"],[211,84,0,"#d35400"],[44,62,80,"#2c3e50"],[241,196,15,"#f1c40f"],[231,76,60,"#e74c3c"],[26,188,156,"#1abc9c"],[46,204,113,"#2ecc71"],[52,152,219,"#3498db"],[155,89,182,"#9b59b6"],[52,73,94,"#34495e"],[22,160,133,"#16a085"],[39,174,96,"#27ae60"],[44,62,80,"#2c3e50"],[241,196,15,"#f1c40f"],[230,126,34,"#e67e22"],[231,76,60,"#e74c3c"],[236,240,241,"#9b9e9f"],[149,165,166,"#a65d20"]];return e[!1===t?Math.floor(Math.random()*e.length):t]},h.site_icon=function(t){return'<img src="https://www.google.com/s2/favicons?domain='.concat(t,'" width="16" height="16" alt="').concat(t,'" style="vertical-align: -3px;" />')},h.wordpress_postbox_ajax=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"enable",e=jQuery(".postbox .hndle, .postbox .handlediv");"enable"===t?e.on("click",window.postboxes.handle_click):e.off("click",window.postboxes.handle_click)},h.isset=function(t){for(var e=Array.prototype.slice.call(arguments,1),a=0;a<e.length;a++){if(!t||!t.hasOwnProperty(e[a]))return!1;t=t[e[a]]}return!0},h.number_format=function(t,e,a,o){if(null==t||!isFinite(t))throw new TypeError("number is not valid");var r;e||(e=1<(r=t.toString().split(".").length)?r:0),a=a||".",o=o||",";e=(t=(t=parseFloat(t).toFixed(e)).replace(".",a)).split(a);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,o),t=e.join(a)},h.set_equal_height=function(t,e){var a=jQuery(t).height(),o=jQuery(e).height(),r=e,e=a;a<o&&(r=t,e=o),jQuery(r).css("height",e+"px")},h.Create_Half_PostBox=function(t,e){return'<div class="postbox-container wps-postbox-half '.concat(t,'"><div class="metabox-holder"><div class="meta-box-sortables"> <div class="postbox" id="').concat(e,'"> <div class="inside"></div></div></div></div></div>')},h.isIP=function(t){var e="(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)";return new RegExp("^".concat(e,"\\.").concat(e,"\\.").concat(e,"\\.").concat(e,"$")).test(t)},h.getLinkParams=function(t){t=(1<arguments.length&&void 0!==arguments[1]&&arguments[1]||window.location.href).match(new RegExp("(?:[?&]"+t+"=)([^&]+)"));return t?t[1]:null},h.sum=function(t){return t.reduce(function(t,e){return t+e},0)},h.sanitize_meta_box_name=function(t){return t.replace(new RegExp("-","g"),"_")},h.get_meta_box_method=function(t){return this.sanitize_meta_box_name(t)+"_meta_box"},h.getMetaBoxKey=function(t){return"wp-statistics-"+t+"-widget"},h.no_meta_box_data=function(){return h._("no_data")},h.error_meta_box_data=function(t){t=JSON.parse(t);return h.isset(t,"message")?t.message:h._("rest_connect")},h.get_meta_box_info=function(t){return t in h.global.meta_boxes?h.global.meta_boxes[t]:[]},h.meta_box_lang=function(t,e){return e in h.global.meta_boxes[t].lang?h.global.meta_boxes[t].lang[e]:""},h.meta_box_inner=function(t){return"#"+h.getMetaBoxKey(t)+" div.inside"},h.meta_box_name_by_id=function(t){return t.split("statistics-").pop().split("-widget")[0]},h.meta_box_button=function(t){var e="#"+h.getMetaBoxKey(t)+" .handle-actions button:first",a=h.get_meta_box_info(t),o="z-index: 9999;position: absolute;top: 1px;",r="right";h.is_active("rtl")&&(r="left"),jQuery("#"+h.getMetaBoxKey(t)+" button[class*=wps-refresh], #"+h.getMetaBoxKey(t)+" button[class*=wps-more]").remove(),h.is_active("more_btn")&&h.isset(a,"page_url")&&jQuery('<button class="handlediv wps-more"'+(h.is_active("gutenberg")?' style="'.concat(o).concat(r,': 3%;" '):'style="line-height: 28px;"')+' type="button" onclick="location.href = \''+h.global.admin_url+"admin.php?page="+a.page_url+'\';"><span class="screen-reader-text">'+h._("more_detail")+'</span> <span class="dashicons dashicons-external"></span></button>').insertBefore(e),h.is_active("more_btn")&&h.isset(a,"page_url")?jQuery('<button class="handlediv wps-refresh"'+(h.is_active("gutenberg")?' style="'.concat(o).concat(r,': 6%;" '):'style="line-height: 28px;"')+' type="button"><span class="screen-reader-text">'+h._("reload")+'</span> <span class="dashicons dashicons-update"></span> </button>').insertAfter("#"+h.getMetaBoxKey(t)+" button[class*=wps-more]"):jQuery('<button class="handlediv wps-refresh"'+(h.is_active("gutenberg")?' style="'.concat(o).concat(r,': 3%;" '):'style="line-height: 28px;"')+' type="button"><span class="screen-reader-text">'+h._("reload")+'</span> <span class="dashicons dashicons-update"></span> </button>').insertBefore(e)},h.run_meta_box=function(t){var e,a,o=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];h.exist_tag("#"+h.getMetaBoxKey(t))&&(h.is_active("gutenberg")||!h.is_active("gutenberg")&&jQuery("#"+h.getMetaBoxKey(t)).is(":visible"))&&(e=jQuery(h.meta_box_inner(t)),(a=h.get_meta_box_method(t))in h&&("placeholder"in h[a]?e.html(h[a].placeholder()):e.html(h.placeholder()),!0===r&&h.meta_box_button(t),!(t={name:t})!==o&&(t=Object.assign(o,t)),"params"in h[a]&&(t=Object.assign(t,h[a].params())),h.ajaxQ("metabox",t,a,"error_meta_box_data")))},h.run_meta_boxes=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];!1===t&&(t=Object.keys(h.global.meta_boxes)),t.forEach(function(t){h.run_meta_box(t)})},jQuery(document).on("mouseenter mouseleave",".wps-refresh, .wps-more",function(t){"mouseenter"===t.type?h.wordpress_postbox_ajax("disable"):h.wordpress_postbox_ajax("enable")}),jQuery(document).on("click",".wps-refresh",function(t){t.preventDefault();t=jQuery(this).closest(".postbox").attr("id"),t=h.meta_box_name_by_id(t);h.run_meta_box(t)}),jQuery(document).on("click",'input[type=checkbox][id^="wp-statistics-"][id$="-widget-hide"]',function(){var t;jQuery(this).is(":checked")&&(t=jQuery(this).attr("id"),t=h.meta_box_name_by_id(t),h.run_meta_box(t))}),h.btn_group_chart=function(e){var a,t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o={7:h._("str_week"),30:h._("str_month"),365:h._("str_year")};"ago"==t.type&&(a=parseInt(t.days));var r='<div class="wps-btn-group"><div class="btn-group" role="group">';return Object.keys(o).forEach(function(t){r+='<button type="button" class="btn '+(t==a?"btn-primary":"btn-default")+'" data-chart-time="'.concat(e,'" data-time="').concat(t,'">').concat(o[t],"</button>")}),r+='<button type="button" class="btn '+("between"==t.type?"btn-primary":"btn-default")+'" data-custom-date-picker="'.concat(e,'">').concat(h._("custom"),"</button>"),r+="</div></div>",r+='<div data-chart-date-picker="'.concat(e,'"')+("ago"==t.type?' style="display:none;"':"")+'><input type="text" size="18" name="date-from" data-wps-date-picker="from" value="'.concat(t.from,'" placeholder="YYYY-MM-DD" autocomplete="off">')+h._("to")+'<input type="text" size="18" name="date-to" data-wps-date-picker="to" value="'.concat(t.to,'" placeholder="YYYY-MM-DD" autocomplete="off"><input type="submit" value="')+h._("go")+'" data-between-chart-show="'.concat(e,'" class="button-primary"><input type="hidden" name="" id="date-from" value="').concat(t.from,'"><input type="hidden" name="" id="date-to" value="').concat(t.to,'"></div>')},jQuery(document).on("click",".wps-btn-group button",function(){jQuery(".wps-btn-group button").attr("class","btn btn-default"),jQuery(this).attr("class","btn btn-primary")}),jQuery(document).on("click","button[data-custom-date-picker]",function(){jQuery("div[data-chart-date-picker= "+jQuery(this).attr("data-custom-date-picker")+"]").slideDown()}),jQuery(document).on("click","button[data-chart-time]",function(){h.run_meta_box(jQuery(this).attr("data-chart-time"),{ago:jQuery(this).attr("data-time"),"no-data":"no"})}),jQuery(document).on("click","input[data-between-chart-show]",function(){var t=jQuery(this).attr("data-between-chart-show");h.run_meta_box(t,{from:jQuery("div[data-chart-date-picker="+t+"] input[id=date-from]").val(),to:jQuery("div[data-chart-date-picker="+t+"] input[id=date-to]").val(),"no-data":"no"})}),h.browsers_meta_box={placeholder:function(){return h.circle_placeholder()},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],t="";return h.is_active("overview_page")&&(t+=h.btn_group_chart("browsers",e),setTimeout(function(){h.date_picker()},1e3)),t+='<canvas id="'+h.chart_id("browsers")+'" height="220"></canvas>'},meta_box_init:function(t){for(var e,a=0<arguments.length&&void 0!==t?t:[],o=[],r=0;r<=10;r++)e=h.random_color(r),o.push("rgba("+e[0]+","+e[1]+","+e[2]+",0.4)");t=[{label:h._("browsers"),data:a.browsers_value,backgroundColor:o}];if(h.pie_chart(h.chart_id("browsers"),a.browsers_name,t),h.exist_tag("#"+h.getMetaBoxKey("browsers-table"))){["browsers-table","browsers"].forEach(function(t){jQuery("#"+h.getMetaBoxKey(t)+" .inside").removeAttr("style")});for(var s='<div class="title-center">'.concat(a.title,'</div><table width="100%" class="widefat table-stats"><tr><td class="wps-text-danger">').concat(h._("browser"),'</td><td class="wps-text-danger">').concat(h._("visitor_count"),'</td><td class="wps-text-danger">').concat(h._("percentage"),"</td></tr>"),n=0;n<a.browsers_name.length;n++)s+=" <tr><td>".concat(a.browsers_name[n],"</td><td>").concat(0<parseInt(a.browsers_value[n])?"".concat("other"!==a.info.agent[n]?'<a href="'+a.info.visitor_page+"&agent="+a.info.agent[n]+"&from="+a.from+"&to="+a.to+'" target="_blank">':""," ").concat(h.number_format(a.browsers_value[n])," ").concat("other"!==a.info.agent[n]?"</a>":""):a.browsers_value[n],"</td><td>").concat(h.number_format(a.browsers_value[n]/a.total*100),"%</td> </tr>");s+=" <tr><td>".concat(h._("total"),"</td><td>").concat(h.number_format(a.total),"</td><td></td></tr>"),s+="</table>",jQuery("#"+h.getMetaBoxKey("browsers-table")+" .inside").html(s),h.set_equal_height(".postBox-table .inside",".postBox-chart .inside");for(var i="",c=0;c<a.browsers_name.length;c++)0<parseInt(a.browsers_value[c])&&a.info.agent[c]&&(i+='<div class="wps-title-group"><img src="'.concat(a.info.logo[c],'" alt="').concat(a.browsers_name[c],'" style="vertical-align: -3px;"> ').concat(a.browsers_name[c],'</div><div class="wp-clearfix"></div>'),i+=h.Create_Half_PostBox("postBox-chart-"+a.info.agent[c],"browser-"+a.info.agent[c]+"-chart"),i+=h.Create_Half_PostBox("postBox-table-"+a.info.agent[c],"browser-"+a.info.agent[c]+"-table"),i+='<div class="wp-clearfix"></div>');jQuery(i).insertAfter("#browsers-table");for(var l=0;l<a.browsers_name.length;l++)0<parseInt(a.browsers_value[l])&&a.info.agent[l]&&this.run_custom_browser(a.info.agent[l])}},run_custom_browser:function(t){["browser-"+t+"-chart","browser-"+t+"-table"].forEach(function(t){jQuery("#"+t+" .inside").css("height","430px")}),jQuery("#browser-"+t+"-table .inside").html(h.placeholder()),jQuery("#browser-"+t+"-chart .inside").html(h.circle_placeholder()),jQuery(".wps-ph-picture").attr("style","height: 310px;");var e={name:"browsers",browser:t};["from","to"].forEach(function(t){h.isset(h.global,"request_params",t)&&(e[t]=h.global.request_params[t])}),h.ajaxQ(h.global.meta_box_api,e,"show_custom_agent","error_custom_agent","GET",!1)}},h.show_custom_agent=function(n){var i=n.info.agent[0];jQuery("#browser-"+i+"-chart .inside").html('<canvas id="'+h.chart_id("browser-"+i)+'" height="220"></canvas>'),setTimeout(function(){for(var t,e=[],a=0;a<=10;a++)t=h.random_color(a),e.push("rgba("+t[0]+","+t[1]+","+t[2]+",0.4)");var o=[{label:h._("browsers"),data:n.browsers_value,backgroundColor:e}];h.pie_chart(h.chart_id("browser-"+i),n.browsers_name,o),["browser-"+i+"-chart","browser-"+i+"-table"].forEach(function(t){jQuery("#"+t+" .inside").removeAttr("style")});for(var r='<div class="title-center">'.concat(n.title,'</div><table width="100%" class="widefat table-stats"><tr><td class="wps-text-danger">').concat(h._("version_list"),'</td><td class="wps-text-danger">').concat(h._("visitor_count"),'</td><td class="wps-text-danger">').concat(h._("percentage"),"</td></tr>"),s=0;s<n.browsers_name.length;s++)r+=" <tr><td>".concat(n.browsers_name[s],"</td><td>").concat(0<parseInt(n.browsers_value[s])?h.number_format(n.browsers_value[s]):n.browsers_value[s],"</td><td>").concat(h.number_format(n.browsers_value[s]/n.total*100),"%</td></tr>");r+=" <tr><td>".concat(h._("total"),"</td><td>").concat(h.number_format(n.total),"</td><td></td></tr>"),r+="</table>";o="#browser-"+i+"-table .inside";jQuery(o).html(r),h.set_equal_height(o,"#browser-"+i+"-chart .inside")},500)},h.error_custom_agent=function(t){},h.countries_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td width="10%" style=\'text-align: left\'>'.concat(h._("rank"),"</td><td width=\"10%\" style='text-align: left'>").concat(h._("flag"),"</td><td width=\"40%\" style='text-align: left'>").concat(h._("country"),"</td><td width=\"40%\" style='text-align: left'>").concat(h._("visitor_count"),"</td></tr>");var a=1;return t.forEach(function(t){e+="<tr><td style='text-align: left;'>".concat(a,"</td><td style='text-align: left;'><img src=\"").concat(t.flag,'" title="').concat(t.name,'" alt="').concat(t.name,"\"/></td><td style='text-align: left;'>").concat(t.name,"</td><td style='text-align: left;'><a href=\"").concat(t.link,'" title="').concat(t.name,'" target="_blank">').concat(h.number_format(t.number),"</a></td></tr>"),a++}),e+="</tbody></table>"}},h.exclusions_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(t){var e=h.is_active("overview_page")?110:210;h.isset(h.global,"request_params","page")&&"exclusions"===h.global.request_params.page&&(e=80);t="";return t+='<canvas id="'+h.chart_id("exclusions")+'" height="'+e+'"></canvas>'},meta_box_init:function(t){var e=0<arguments.length&&void 0!==t?t:[];this.show_chart(h.chart_id("exclusions"),e),h.isset(h.global,"request_params","page")&&"exclusions"===h.global.request_params.page&&(t="span[id='number-total-chart-exclusions']",h.exist_tag(t)&&(e=h.sum(Object.values(e.total)),jQuery(t).html(h.number_format(e))))},show_chart:function(t,e){var r=1<arguments.length&&void 0!==e?e:[],s="",n=[],i=0;Object.keys(r.exclusions).forEach(function(t){var e,a,o=h.sum(Object.values(r.value[t]));0<o&&(e=r.exclusions[t],a=h.random_color(i),n.push({label:e,data:r.value[t],backgroundColor:"rgba("+a[0]+","+a[1]+","+a[2]+",0.3)",borderColor:"rgba("+a[0]+","+a[1]+","+a[2]+",1)",borderWidth:1,fill:!0}),s+="<tr><th>".concat(e,'</th> <th class="th-center"><span style="color: #9a9494 !important;">').concat(h.number_format(o),"</span></th></tr>"),i++)}),h.exist_tag("table[data-table=exclusions]")&&jQuery(s).insertAfter("table[data-table=exclusions] tr:first"),h.line_chart(t,r.title,r.date,n)}},h.hits_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],a=h.is_active("overview_page")?110:210;h.isset(h.global,"request_params","page")&&"hits"===h.global.request_params.page&&(a=80);t="";return h.is_active("overview_page")&&(t+=h.btn_group_chart("hits",e),setTimeout(function(){h.date_picker()},1e3)),t+='<canvas id="'+h.chart_id("hits")+'" height="'+a+'"></canvas>'},meta_box_init:function(t){var a=0<arguments.length&&void 0!==t?t:[];this.hits_chart(h.chart_id("hits"),a),h.isset(h.global,"request_params","page")&&"hits"===h.global.request_params.page&&["visits","visitors"].forEach(function(t){var e="span[id^='number-total-chart-"+t+"']";h.exist_tag(e)&&jQuery(e).html(a.total[t])})},hits_chart:function(t,e){var a=1<arguments.length&&void 0!==e?e:[],e=a;"hits-chart"in a&&(e=a["hits-chart"]);a=[];h.is_active("visitors")&&a.push({label:h._("visitors"),data:e.visitors,backgroundColor:"rgba(255, 99, 132, 0.2)",borderColor:"rgba(255, 99, 132, 1)",borderWidth:1,fill:!0}),h.is_active("visits")&&a.push({label:h._("visits"),data:e.visits,backgroundColor:"rgba(54, 162, 235, 0.2)",borderColor:"rgba(54, 162, 235, 1)",borderWidth:1,fill:!0}),h.line_chart(t,e.title,e.date,a)}},h.hitsmap_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(){return'<div id="wp-statistics-visitors-map"></div>'},meta_box_init:function(t){var o=0<arguments.length&&void 0!==t?t:[],r=Array();o.hasOwnProperty("country")&&Object.keys(o.country).forEach(function(e){var a="<div class='map-html-marker'><img src='".concat(o.country[e].flag,"' alt=\"").concat(o.country[e].name,"\" title='").concat(o.country[e].name,"' class='log-tools'/> ").concat(o.country[e].name," [").concat(o.total_country[e],"]<hr />");Object.keys(o.visitor[e]).forEach(function(t){a+="<p><img src='".concat(o.visitor[e][t].browser.logo,"' alt=\"").concat(o.visitor[e][t].browser.name,"\" class='log-tools' title='").concat(o.visitor[e][t].browser.name,"'/> ").concat(o.visitor[e][t].ip," ")+("Unknown"!==o.visitor[e][t].city?"- "+o.visitor[e][t].city:"")+"</p>"}),a+="</div>",r[e]=a}),jQuery("#wp-statistics-visitors-map").vectorMap({map:"world_en",backgroundColor:"#fff",borderColor:"#7e7e7e",borderOpacity:.6,color:"#e6e5e2",hoverColor:"#c3403c",colors:o.color,onLabelShow:function(t,e,a){void 0!==r[a]?e.html(r[a]):e.html(e.html()+" [0]<hr />")}})}},h.pages_chart_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(){return'<canvas id="'+h.chart_id("pages-chart")+'" height="80"></canvas>'},meta_box_init:function(t){t=0<arguments.length&&void 0!==t?t:[];this.show_chart(h.chart_id("pages-chart"),t),h.exist_tag("span[id=number-total-visits]")&&jQuery("span[id=number-total-visits]").html(t.total),h.exist_tag("span[id=number-total-chart-visits]")&&jQuery("span[id=number-total-chart-visits]").html(t.total_dates)},show_chart:function(t,e){e=1<arguments.length&&void 0!==e?e:[];h.line_chart(t,e.title,e.date,[{label:h._("visits"),data:e.stat,backgroundColor:"rgba(54, 162, 235, 0.2)",borderColor:"rgba(54, 162, 235, 1)",borderWidth:1,fill:!0}])}},h.pages_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td width=\'10%\'>'.concat(h._("id"),"</td><td width='40%'>").concat(h._("title"),"</td><td width='40%'>").concat(h._("link"),"</td><td width='10%'>").concat(h._("visits"),"</td></tr>");var a=1;return t.forEach(function(t){e+="<tr><td style='text-align: left;'>".concat(a,"</td><td style='text-align: left;'><span title='").concat(t.title,"' class='wps-cursor-default wps-text-wrap'>").concat(t.title,"</span></td><td style='text-align: left;'><a href=\"").concat(t.link,'" title="').concat(t.title,'" target="_blank">').concat(t.str_url,'</a></td><td style="text-align: left"><a href="').concat(t.hits_page,'" class="wps-text-danger">').concat(t.number,"</a></td></tr>"),a++}),e+="</tbody></table>"}},h.platforms_meta_box={placeholder:function(){return h.circle_placeholder()},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],t="";return h.is_active("overview_page")&&(t+=h.btn_group_chart("platforms",e),setTimeout(function(){h.date_picker()},1e3)),t+='<canvas id="'+h.chart_id("platforms")+'" height="220"></canvas>'},meta_box_init:function(t){for(var e,a=0<arguments.length&&void 0!==t?t:[],o=[],r=0;r<=20;r++)e=h.random_color(),o.push("rgba("+e[0]+","+e[1]+","+e[2]+",0.4)");t=[{label:h._("platform"),data:a.platform_value,backgroundColor:o}];if(h.pie_chart(h.chart_id("platforms"),a.platform_name,t),h.exist_tag("#"+h.getMetaBoxKey("platforms-table"))){["platforms-table","platforms"].forEach(function(t){jQuery("#"+h.getMetaBoxKey(t)+" .inside").removeAttr("style")});for(var s='<div class="title-center">'.concat(a.title,'</div><table width="100%" class="widefat table-stats"><tr><td class="wps-text-danger">').concat(h._("platform"),'</td><td class="wps-text-danger">').concat(h._("visitor_count"),'</td><td class="wps-text-danger">').concat(h._("percentage"),"</td></tr>"),n=0;n<a.platform_name.length;n++)s+=" <tr><td>".concat(a.platform_name[n],"</td><td>").concat(0<parseInt(a.platform_value[n])?'<a href="'+a.info.visitor_page+"&platform="+a.platform_name[n]+"&from="+a.from+"&to="+a.to+'" target="_blank"> '.concat(h.number_format(a.platform_value[n])," </a>"):h.number_format(a.platform_value[n]),"</td><td>").concat(h.number_format(a.platform_value[n]/a.total*100),"%</td> </tr>");s+=" <tr><td>".concat(h._("total"),"</td><td>").concat(h.number_format(a.total),"</td><td></td></tr>"),s+="</table>",jQuery("#"+h.getMetaBoxKey("platforms-table")+" .inside").html(s),h.set_equal_height(".postBox-table .inside",".postBox-chart .inside")}}},h.post_meta_box={params:function(){return{ID:h.global.page.ID}},view:function(t){t=0<arguments.length&&void 0!==t?t:[];return t.hasOwnProperty("content")?'<div class="wps-center" style="padding: 15px;"> '+t.content+"</div>":'<canvas id="'+h.chart_id("post")+'" height="85"></canvas>'},meta_box_init:function(t){t=0<arguments.length&&void 0!==t?t:[];t.hasOwnProperty("content")?jQuery("#"+h.getMetaBoxKey("post")+" button[onclick]").remove():this.post_hits_chart(h.chart_id("post"),t)},post_hits_chart:function(t,e){e=1<arguments.length&&void 0!==e?e:[];h.line_chart(t,e.title,e.date,[{label:e.post_title,data:e.state,backgroundColor:"rgba(255, 99, 132, 0.2)",borderColor:"rgba(255, 99, 132, 1)",borderWidth:1,fill:!0}])}},h.quickstats_meta_box={view:function(t){var e=0<arguments.length&&void 0!==t?t:[],t="";return t+='<table width="100%" class="widefat table-stats wps-summary-stats"><tbody>',t+=h.summary_meta_box.summary_statistics(e),t+="</tbody></table>",t+='<br><hr width="80%"/><br>',t+='<canvas id="'+h.chart_id("quickstats")+'" height="210"></canvas>'},meta_box_init:function(t){t=0<arguments.length&&void 0!==t?t:[];h.hits_meta_box.hits_chart(h.chart_id("quickstats"),t)}},h.recent_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";return e+='<div class="wp-statistics-responsive-table">',e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td>'.concat(h._("browser"),"</td>")+(h.is_active("geo_ip")?"<td>".concat(h._("country"),"</td>"):"")+""+(h.is_active("geo_city")?"<td>".concat(h._("city"),"</td>"):"")+"<td>".concat(h._("date"),"</td><td>").concat(h._("ip"),"</td><td>").concat(h._("referrer"),"</td></tr>"),t.forEach(function(t){e+='<tr><td style="text-align: left"><a href="'.concat(t.browser.link,'" title="').concat(t.browser.name,'"><img src="').concat(t.browser.logo,'" alt="').concat(t.browser.name,"\" class='log-tools' title='").concat(t.browser.name,"'/></a></td>")+(h.is_active("geo_ip")?'<td style="text-align: left"><img src=\''.concat(t.country.flag,"' alt='").concat(t.country.name,"' title='").concat(t.country.name,"' class='log-tools'/></td>"):"")+""+(h.is_active("geo_city")?"<td>".concat(t.city,"</td>"):"")+'<td style="text-align: left">'.concat(t.date,'</td><td style="text-align: left">')+(t.hash_ip||"<a href='".concat(t.ip.link,"'>").concat(t.ip.value,"</a>"))+'</td><td style="text-align: left">'.concat(t.referred,"</td></tr>")}),e+="</tbody></table>",e+="</div>"}},h.referring_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";return e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td width="80%">'.concat(h._("address"),'</td><td width="20%">').concat(h.meta_box_lang("referring","references"),"</td></tr>"),t.forEach(function(t){e+="<tr><td>"+h.site_icon(t.domain)+" <a href='//".concat(t.domain,"' title='").concat(t.title,'\' target="_blank">').concat(t.domain,"</a><span class='wps-cursor-default wps-referring-widget-ip'")+(2<t.country.length?' title="'.concat(t.country,'"'):"")+">".concat(t.ip,'</span></td><td class="wps-middle-vertical"><a href="').concat(t.page_link,'">').concat(t.number,"</a></td></tr>")}),e+="</tbody></table>"}},h.search_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],a=h.is_active("overview_page")?110:210;h.isset(h.global,"request_params","page")&&"searches"===h.global.request_params.page&&(a=80);t="";return h.is_active("overview_page")&&(t+=h.btn_group_chart("search",e),setTimeout(function(){h.date_picker()},1e3)),t+='<canvas id="'+h.chart_id("search")+'" height="'+a+'"></canvas>'},meta_box_init:function(t){var a=0<arguments.length&&void 0!==t?t:[],o=[],r=0;Object.keys(a["search-engine"]).forEach(function(t){var e=a["search-engine"][t].name,t=h.random_color(r);o.push({label:e,data:a.stat[e],backgroundColor:"rgba("+t[0]+","+t[1]+","+t[2]+",0.3)",borderColor:"rgba("+t[0]+","+t[1]+","+t[2]+",1)",borderWidth:1,fill:!0}),r++}),1===a.total.active&&o.push({label:h._("total"),data:a.total.stat,backgroundColor:"rgba("+a.total.color+", 0.2)",borderColor:"rgba("+a.total.color+", 1)",borderWidth:1,fill:!0}),h.line_chart(h.chart_id("search"),a.title,a.date,o)}},h.summary_meta_box={summary_statistics:function(t){var o=0<arguments.length&&void 0!==t?t:[],r="";return o.user_online&&(r="<tr><th>".concat(h._("online_users"),':</th><th colspan="2" id="th-colspan"><span><a href="').concat(o.user_online.link,'">').concat(o.user_online.value,"</a></span></th></tr>")),(h.is_active("visitors")||h.is_active("visits"))&&function(){r+='<tr><th width="60%"></th>',["visitors","visits"].forEach(function(t){r+='<th class="th-center">'+(h.is_active(t)?h._(t):"")+"</th>"}),r+="</tr>";for(var a=["today","yesterday","week","month","year","total"],t=0;t<a.length;t++)!function(e){r+="<tr><th>".concat(h._(a[e]),": </th>"),["visitors","visits"].forEach(function(t){r+='<th class="th-center">'+(h.is_active(t)?'<a href="'.concat(o[t][a[e]].link,'"><span>').concat(o[t][a[e]].value,"</span></a>"):"")+"</th>"}),r+="</tr>"}(t)}(),r},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],a="";return a+='<table width="100%" class="widefat table-stats wps-summary-stats"><tbody>',a+=this.summary_statistics(e),h.is_active("visitors")&&(a+='<tr><th colspan="3"><br><hr></th></tr>',a+='<tr><th colspan="3" style="text-align: center;">'.concat(h.meta_box_lang("summary","search_engine"),'</th></tr><tr><th width="60%"></th><th class="th-center">').concat(h._("today"),'</th><th class="th-center">').concat(h._("yesterday"),"</th></tr>"),Object.keys(e["search-engine"]).forEach(function(t){a+='<tr><th><img src="'.concat(e["search-engine"][t].logo,'" alt="').concat(e["search-engine"][t].name,'" class="wps-engine-logo"> ').concat(e["search-engine"][t].name,':</th><th class="th-center"><span>').concat(e["search-engine"][t].today,'</span></th><th class="th-center"><span>').concat(e["search-engine"][t].yesterday,"</span></th></tr>")}),a+="<tr><th>".concat(h._("daily_total"),':</th><td id="th-colspan" class="th-center"><span>').concat(e["search-engine-total"].today,'</span></td><td id="th-colspan" class="th-center"><span>').concat(e["search-engine-total"].yesterday,"</span></td></tr><tr><th>").concat(h._("total"),':</th><th colspan="2" id="th-colspan"><span>').concat(e["search-engine-total"].total,"</span></th></tr>")),a+=' <tr><th colspan="3"><br><hr></th></tr><tr><th colspan="3" style="text-align: center;">'.concat(h.meta_box_lang("summary","current_time_date"),'<span id="time_zone"><a href="').concat(e.timezone["option-link"],'"> ').concat(h.meta_box_lang("summary","adjustment"),'</a></span></th></tr><tr><th colspan="3">').concat(h._("date"),': <code dir="ltr">').concat(e.timezone.date,'</code></th></tr><tr> <th colspan="3">').concat(h._("time"),': <code dir="ltr">').concat(e.timezone.time,"</code></th></tr>"),a+="</tbody></table>"}},h.top_pages_chart_meta_box={placeholder:function(){return h.rectangle_placeholder()},view:function(t){var e=0<arguments.length&&void 0!==t?t:[],t="";return t+=h.btn_group_chart("top-pages-chart",e),setTimeout(function(){h.date_picker()},1e3),t+='<canvas id="'+h.chart_id("top-pages-chart")+'" height="80"></canvas>'},meta_box_init:function(t){t=0<arguments.length&&void 0!==t?t:[];this.top_pages_chart(h.chart_id("top-pages-chart"),t)},top_pages_chart:function(t,e){var a=1<arguments.length&&void 0!==e?e:[],o=[],r=0;Object.keys(a.stat).forEach(function(t){var e=h.random_color(r);o.push({label:t,data:a.stat[t],backgroundColor:"rgba("+e[0]+","+e[1]+","+e[2]+",0.3)",borderColor:"rgba("+e[0]+","+e[1]+","+e[2]+",1)",borderWidth:1,fill:!0}),r++}),h.line_chart(t,a.title,a.date,o)}},h.top_visitors_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";e+='<div class="wp-statistics-responsive-table">',e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td>'.concat(h._("rank"),"</td><td>").concat(h._("hits"),"</td>")+(h.is_active("geo_ip")?"<td>".concat(h._("flag"),"</td><td>").concat(h._("country"),"</td>"):"")+""+(h.is_active("geo_city")?"<td>".concat(h._("city"),"</td>"):"")+"<td>".concat(h._("ip"),"</td><td>").concat(h._("agent"),"</td><td>").concat(h._("platform"),"</td><td>").concat(h._("version"),"</td></tr>");var a=1;return t.forEach(function(t){e+="<tr><td>".concat(a,"</td><td>").concat(t.hits,"</td>")+(h.is_active("geo_ip")?"<td><img src='".concat(t.country.flag,"' alt='").concat(t.country.name,"' title='").concat(t.country.name,"' class='log-tools'/></td><td>").concat(t.country.name,"</td>"):"")+""+(h.is_active("geo_city")?"<td>".concat(t.city,"</td>"):"")+"<td>"+(t.hash_ip||"<a href='".concat(t.ip.link,"'>").concat(t.ip.value,"</a>"))+"</td><td>".concat(t.agent,"</td><td>").concat(t.platform,"</td><td>").concat(t.version,"</td></tr>"),a++}),e+="</tbody></table>",e+="</div>"}},h.useronline_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";return e+='<table class="widefat table-stats wps-report-table wps-table-fixed"><tr>'+(h.is_active("geo_ip")?"<td style='text-align: left;'>".concat(h._("country"),"</td>"):"")+"<td style='text-align: left;'>".concat(h._("ip"),"</td><td width=\"35%\" style='text-align: left;'>").concat(h._("page"),"</td><td style='text-align: left;'>").concat(h._("referrer"),"</td></tr>"),t.forEach(function(t){e+="<tr>"+(h.is_active("geo_ip")?'<td style="text-align: left"><img src=\''.concat(t.country.flag,"' alt='").concat(t.country.name,"' title='").concat(t.country.name,"' class='log-tools'/></td>"):"")+"<td style='text-align: left !important'>"+(t.hash_ip||t.ip.value)+"</td><td style='text-align: left !important;'><span class=\"wps-text-wrap\">"+(2<t.page.link.length?'<a href="'.concat(t.page.link,'" title="').concat(t.page.title,'" target="_blank" class="wps-text-danger">'):"")+t.page.title+(2<t.page.link.length?"</a>":"")+'</span></td><td style="text-align: left !important">'.concat(t.referred,"</td></tr>")}),e+="</table>"}},h.words_meta_box={view:function(t){var t=0<arguments.length&&void 0!==t?t:[],e="";e+='<div class="wp-statistics-responsive-table">',e+='<table width="100%" class="widefat table-stats wps-report-table"><tbody><tr><td>'.concat(h._("word"),"</td><td>").concat(h._("browser"),"</td>")+(h.is_active("geo_ip")?"<td>".concat(h._("country"),"</td>"):"")+""+(h.is_active("geo_city")?"<td>".concat(h._("city"),"</td>"):"")+"<td>".concat(h._("date"),"</td><td>").concat(h._("ip"),"</td><td>").concat(h._("referrer"),"</td></tr>");return t.forEach(function(t){e+='<tr><td style="text-align: left"><span title=\''.concat(t.word,"' class='wps-cursor-default wps-text-wrap")+(h.is_active("overview_page")?" wps-200-px":"")+"'>".concat(t.word,'</span></td><td style="text-align: left"><a href="').concat(t.browser.link,'" title="').concat(t.browser.name,'"><img src="').concat(t.browser.logo,'" alt="').concat(t.browser.name,"\" class='log-tools' title='").concat(t.browser.name,"'/></a></td>")+(h.is_active("geo_ip")?'<td style="text-align: left"><img src=\''.concat(t.country.flag,"' alt='").concat(t.country.name,"' title='").concat(t.country.name,"' class='log-tools'/></td>"):"")+(h.is_active("geo_city")?'<td style="text-align: left">'.concat(t.city,"</td>"):"")+'<td style="text-align: left">'.concat(t.date,'</td><td style="text-align: left">')+(t.hash_ip||"<a href='".concat(t.ip.link,"'>").concat(t.ip.value,"</a>"))+'</td><td style="text-align: left">'.concat(t.referred,"</td></tr>"),0}),e+="</tbody></table>",e+="</div>"}},h.isset(h.global,"request_params","page")&&"authors"===h.global.request_params.page&&(a={ago:30,type:"author",ID:0},["from","to","ID"].forEach(function(t){h.isset(h.global,"request_params",t)&&(a[t]=h.global.request_params[t])}),jQuery("span[id^='number-total-']").html(h.rectangle_placeholder("wps-text-placeholder")),h.run_meta_box("pages-chart",a,!1)),h.isset(h.global,"request_params","page")&&"browser"===h.global.request_params.page&&(o={},["from","to"].forEach(function(t){h.isset(h.global,"request_params",t)&&(o[t]=h.global.request_params[t])}),["browsers-table","browsers"].forEach(function(t){jQuery("#"+h.getMetaBoxKey(t)+" .inside").css("height","430px")}),jQuery("#wp-statistics-browsers-table-widget .inside").html(h.placeholder()),jQuery(".wps-ph-picture").attr("style","height: 310px;"),h.run_meta_box("browsers",o,!1)),h.isset(h.global,"request_params","page")&&"categories"===h.global.request_params.page&&(r={ago:30,type:"category",ID:0},["from","to","ID"].forEach(function(t){h.isset(h.global,"request_params",t)&&(r[t]=h.global.request_params[t])}),jQuery("span[id^='number-total-']").html(h.rectangle_placeholder("wps-text-placeholder")),h.run_meta_box("pages-chart",r,!1)),h.isset(h.global,"request_params","page")&&"countries"===h.global.request_params.page&&(s={limit:0},["from","to"].forEach(function(t){h.isset(h.global,"request_params",t)&&(s[t]=h.global.request_params[t])}),h.run_meta_box("countries",s,!1)),h.isset(h.global,"request_params","page")&&"exclusions"===h.global.request_params.page&&(n=h.isset(h.global,"request_params","from")&&h.isset(h.global,"request_params","to")?{from:h.global.request_params.from,to:h.global.request_params.to}:{ago:30},jQuery("span[id^='number-total-chart-']").html(h.rectangle_placeholder("wps-text-placeholder")),h.run_meta_box("exclusions",n,!1)),h.isset(h.global,"request_params","page")&&"hits"===h.global.request_params.page&&(n=h.isset(h.global,"request_params","from")&&h.isset(h.global,"request_params","to")?{from:h.global.request_params.from,to:h.global.request_params.to}:{ago:30},jQuery("span[id^='number-total-chart-']").html(h.rectangle_placeholder("wps-text-placeholder")),h.run_meta_box("hits",n,!1)),h.isset(h.global,"request_params","page")&&"overview"===h.global.request_params.page&&h.isset(h.global,"overview","ads")&&h.is_active("overview_ads")&&(i='<div id="wps_overview_ads_postbox" class="postbox"><div class="inside"><div class="close-overview-ads"><span class="dashicons dashicons-dismiss"></span></div><a href="'.concat(h.global.overview.ads.link,'" title="').concat(h.global.overview.ads.title,'" ').concat("yes"==h.global.overview.ads._target?' target="_blank"':"",'><img src="').concat(h.global.overview.ads.image,'" id="wps_overview_ads_image" alt="').concat(h.global.overview.ads.title,'"></a></div></div>'),jQuery(i).insertAfter("#wps-postbox-container-2 #normal-sortables div.postbox:first"),jQuery(document).on("click",".close-overview-ads",function(){jQuery("#wps_overview_ads_postbox").fadeOut("normal"),jQuery.ajax({url:h.global.admin_url+"admin-ajax.php",type:"get",data:{action:"wp_statistics_close_overview_ads",ads_id:""+h.global.overview.ads.ID,wps_nonce:""+h.global.rest_api_nonce},datatype:"json"})}),jQuery("#wps-donate-notice").on("click",".notice-dismiss",function(){jQuery.ajax({url:h.global.admin_url+"admin-ajax.php",type:"get",data:{action:"wp_statistics_close_notice",notice:"donate",wps_nonce:""+h.global.rest_api_nonce},datatype:"json"})}),jQuery("#wps_overview_ads_image").on("error",function(){jQuery("#wps_overview_ads_postbox").remove()})),h.isset(h.global,"request_params","page")&&"pages"===h.global.request_params.page&&(h.isset(h.global,"request_params","ID")&&h.isset(h.global,"request_params","type")?(i=h.isset(h.global,"request_params","from")&&h.isset(h.global,"request_params","to")?{from:h.global.request_params.from,to:h.global.request_params.to}:{ago:30},i=Object.assign(i,{ID:h.global.request_params.ID,type:h.global.request_params.type}),h.run_meta_box("pages-chart",i,!1),h.exist_tag("form#wp-statistics-select-pages")&&h.select2(),jQuery(document).on("change","select[name=ID]",function(){jQuery("span.submit-form").html(h._("please_wait")),jQuery(this).closest("form").trigger("submit")})):(h.isset(h.global,"request_params","pagination-page")&&(l={paged:h.global.request_params["pagination-page"]}),h.run_meta_box("pages",l,!1),h.run_meta_box("top-pages-chart",{}))),h.isset(h.global,"request_params","page")&&"platform"===h.global.request_params.page&&(c={},["from","to"].forEach(function(t){h.isset(h.global,"request_params",t)&&(c[t]=h.global.request_params[t])}),["platforms-table","platforms"].forEach(function(t){jQuery("#"+h.getMetaBoxKey(t)+" .inside").css("height","430px")}),jQuery("#wp-statistics-platforms-table-widget .inside").html(h.placeholder()),jQuery(".wps-ph-picture").attr("style","height: 310px;"),h.run_meta_box("platforms",c,!1)),h.isset(h.global,"request_params","page")&&"searches"===h.global.request_params.page&&(l=h.isset(h.global,"request_params","from")&&h.isset(h.global,"request_params","to")?{from:h.global.request_params.from,to:h.global.request_params.to}:{ago:30},h.run_meta_box("search",l,!1)),jQuery(".wp-statistics-settings").length&&((d=function(t){if(t=new RegExp("[?&]"+t+"=([^&#]*)").exec(window.location.href))return t[1]}("tab"))&&g(d),jQuery(".wp-statistics-settings ul.tabs li").click(function(){g(jQuery(this).attr("data-tab"))})),m("input[name=wps_visitors]","tr[data-view=visitors_log_tr]"),m("input[name=wps_referrerspam]","tr.referrerspam_field"),h.isset(h.global,"request_params","page")&&"settings"===h.global.request_params.page&&(jQuery("#wp-statistics-settings-form ul.tabs li").click(function(t){t.preventDefault();t=e(this).attr("data-tab");"undefined"!=typeof localStorage&&localStorage.setItem("wp-statistics-settings-active-tab",t)}),"undefined"==typeof localStorage||!h.isset(h.global,"request_params","save_setting")||"yes"!==h.global.request_params.save_setting||0<(d=localStorage.getItem("wp-statistics-settings-active-tab")).length&&e("#wp-statistics-settings-form ul.tabs li[data-tab="+d+"]").click()),h.isset(h.global,"request_params","page")&&"tags"===h.global.request_params.page&&(p={ago:30,type:"post_tag",ID:0},["from","to","ID"].forEach(function(t){h.isset(h.global,"request_params",t)&&(p[t]=h.global.request_params[t])}),jQuery("span[id^='number-total-']").html(h.rectangle_placeholder("wps-text-placeholder")),h.run_meta_box("pages-chart",p,!1)),h.isset(h.global,"request_params","page")&&"visitors"===h.global.request_params.page&&(u=function(t,o){var r='<table class="widefat">',s={browsers:["agent","browsers"],country:["location","location"],platform:["platform","platform"],referrer:["referrer","referrer"],user:["user_id","users"]};Object.keys(s).forEach(function(e){r+="<tr><td>".concat(h._(e),"</td></tr>"),r+='<tr><td><select name="'.concat(s[e][0],'" class="select2 wps-width-100" data-type-show="select2">'),r+="<option value=''>".concat(h._("all"),"</option>");var a=h.getLinkParams(s[e][0]);Object.keys(o[s[e][1]]).forEach(function(t){r+="<option value='".concat(t,"' ").concat(null!=a&&a==t?"selected":"",">").concat(o[s[e][1]][t],"</option>")}),r+="</select></td></tr>"}),r+="<tr><td>".concat(h._("ip"),"</td></tr>"),r+='<tr><td><input name="ip" value="'.concat(null!=h.getLinkParams("ip")?h.getLinkParams("ip"):"",'" class="wps-width-100" placeholder=\'xxx.xxx.xxx.xxx\' autocomplete="off"></td></tr>'),r+="<tr><td>".concat(h._("date"),"</td></tr>");var e="width: calc(50% - 5px);display: inline-block;";r+='<tr><td><div style="'.concat(e,'">').concat(h._("from"),': <input name="date-from" data-wps-date-picker="from" value="').concat(null!=h.getLinkParams("from")?h.getLinkParams("from"):"",'" style="width: calc(100% - 5px);" placeholder="YYYY-MM-DD" autocomplete="off"></div><div style="').concat(e,'">').concat(h._("to"),': <input name="date-to" data-wps-date-picker="to" value="').concat(null!=h.getLinkParams("to")?h.getLinkParams("to"):"",'" style="width: 100%;" placeholder="YYYY-MM-DD" autocomplete="off"></div><input type="hidden" name="from" id="date-from" value="').concat(null!=h.getLinkParams("from")?h.getLinkParams("from"):"",'"><input type="hidden" name="to" id="date-to" value="').concat(null!=h.getLinkParams("to")?h.getLinkParams("to"):"",'"></td></tr>'),r+="<tr><td></td></tr>",r+='<tr><td><input type="submit" value="'.concat(h._("filter"),'" class="button-primary"> <span class="filter-loading"></span></td></tr>'),r+="</table>",jQuery(t).html(r),setTimeout(function(){h.date_picker(),h.select2()},200)},jQuery(document).on("click","div#visitors-filter",function(t){t.preventDefault(),tb_show("","#TB_inline?&width=430&height=668&inlineId=visitors-filter-popup"),setTimeout(function(){var t,e,a="#wps-visitors-filter-form";h.exist_tag(a+" input[type=submit]")||(jQuery(a).html('<div style="height: 50px;"></div>'+h.line_placeholder(5)),t=localStorage.getItem("wp-statistics-visitors-filter")?JSON.parse(localStorage.getItem("wp-statistics-visitors-filter")):{},!h.isset(t,"timestamp")||!h.isset(t,"value")||h.isset(t,"timestamp")&&h.isset(t,"value")&&(new Date).getTime().toString()>parseInt(t.timestamp)?(e={wps_nonce:h.global.rest_api_nonce,action:"wp_statistics_visitors_page_filters"},e=Object.assign(e,h.global.request_params),jQuery.ajax({url:h.global.admin_url+"admin-ajax.php",type:"GET",dataType:"json",data:e,timeout:3e4,success:function(t){localStorage.setItem("wp-statistics-visitors-filter",JSON.stringify({value:t,timestamp:(new Date).getTime()+216e5})),u(a,t)},error:function(){jQuery("span.tb-close-icon").click()}})):u(a,t.value))},500)}),_="#wp_statistics_visitors_filter_form",jQuery(document).on("submit",_,function(){var t=jQuery(_+" input[name=date-from]"),e=jQuery(_+" input[name=date-to]");if(0<t.val().length&&e.val().length<1||t.val().length<1&&1<e.val().length)return alert(h._("er_datepicker")),!1;e=jQuery(_+" input[name=ip]").val();if(0<e.length&&!1===h.isIP(e))return alert(h._("er_valid_ip")),!1;jQuery("input[data-wps-date-picker]").prop("disabled",!0);var o={input:["date-from","date-to","ip"],select:["agent","platform","location","referrer","user_id"]};Object.keys(o).forEach(function(a){o[a].forEach(function(e){var t=jQuery(_+" "+a+"[name="+e+"]");t.val().length<1&&(t.prop("disabled",!0),["from","to"].forEach(function(t){e=="date-"+t&&jQuery(_+" input[name="+t+"]").prop("disabled",!0)}))})});e=h.getLinkParams("order");return null!=e&&jQuery(this).append('<input type="hidden" name="order" value="'+e+'" /> '),jQuery("span.filter-loading").html(h._("please_wait")),!0})),h.date_picker(),("index.php"===h.global.page.file||h.is_active("overview_page")||"post-new.php"===h.global.page.file||"post.php"===h.global.page.file&&h.isset(h.global,"page","ID"))&&h.run_meta_boxes()});
|
includes/admin/class-wp-statistics-admin-assets.php
CHANGED
@@ -277,7 +277,7 @@ class Admin_Assets
|
|
277 |
'er_valid_ip' => __('Please enter a valid ip.', 'wp-statistics'),
|
278 |
'please_wait' => __('Please Wait ...', 'wp-statistics'),
|
279 |
'user' => __('User', 'wp-statistics'),
|
280 |
-
'rest_connect' => __('
|
281 |
);
|
282 |
|
283 |
// Rest-API Meta Box Url
|
277 |
'er_valid_ip' => __('Please enter a valid ip.', 'wp-statistics'),
|
278 |
'please_wait' => __('Please Wait ...', 'wp-statistics'),
|
279 |
'user' => __('User', 'wp-statistics'),
|
280 |
+
'rest_connect' => __('An error occurred while connecting to WordPress REST API. It seems blocked by one of your plugins or your theme.', 'wp-statistics'),
|
281 |
);
|
282 |
|
283 |
// Rest-API Meta Box Url
|
includes/admin/class-wp-statistics-admin-notices.php
CHANGED
@@ -41,7 +41,7 @@ class Admin_Notices
|
|
41 |
$plugin = Helper::is_active_cache_plugin();
|
42 |
if (!Option::get('use_cache_plugin') and $plugin['status'] === true) {
|
43 |
$text = ($plugin['plugin'] == "core" ? __('WP_CACHE is enable in your WordPress', 'wp-statistics') : sprintf(__('You are using %s plugin in WordPress', 'wp-statistics'), $plugin['plugin']));
|
44 |
-
Helper::wp_admin_notice($text . ", " . sprintf(__('Please enable %1$sCache
|
45 |
}
|
46 |
}
|
47 |
|
@@ -52,20 +52,28 @@ class Admin_Notices
|
|
52 |
|
53 |
// Check Connect To WordPress Rest API
|
54 |
$status = true;
|
55 |
-
$
|
|
|
56 |
if (is_wp_error($request)) {
|
57 |
$status = false;
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
$
|
|
|
|
|
63 |
}
|
64 |
|
65 |
if ($status === true) {
|
66 |
set_transient('check-wp-statistics-rest', array("status" => "enable"), 3 * HOUR_IN_SECONDS);
|
67 |
} else {
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
}
|
71 |
|
41 |
$plugin = Helper::is_active_cache_plugin();
|
42 |
if (!Option::get('use_cache_plugin') and $plugin['status'] === true) {
|
43 |
$text = ($plugin['plugin'] == "core" ? __('WP_CACHE is enable in your WordPress', 'wp-statistics') : sprintf(__('You are using %s plugin in WordPress', 'wp-statistics'), $plugin['plugin']));
|
44 |
+
Helper::wp_admin_notice($text . ", " . sprintf(__('Please enable %1$sCache Settings%2$s in the WP-Statistics plugin or delete the WP_CACHE value from the wp-config.php file if you do not have any WordPress cache plugins enabled.', 'wp-statistics'), '<a href="' . Menus::admin_url('settings') . '">', '</a>'), 'warning', true);
|
45 |
}
|
46 |
}
|
47 |
|
52 |
|
53 |
// Check Connect To WordPress Rest API
|
54 |
$status = true;
|
55 |
+
$message = '';
|
56 |
+
$request = wp_remote_get(get_rest_url(null, RestAPI::$namespace . '/check'), array('timeout' => 30));
|
57 |
if (is_wp_error($request)) {
|
58 |
$status = false;
|
59 |
+
$message = $request->get_error_message();
|
60 |
+
} else {
|
61 |
+
$body = wp_remote_retrieve_body($request);
|
62 |
+
$data = json_decode($body, true);
|
63 |
+
if (isset($data['error'])) {
|
64 |
+
$status = false;
|
65 |
+
}
|
66 |
}
|
67 |
|
68 |
if ($status === true) {
|
69 |
set_transient('check-wp-statistics-rest', array("status" => "enable"), 3 * HOUR_IN_SECONDS);
|
70 |
} else {
|
71 |
+
$error_msg = __('Here is an error associated with Connecting WordPress Rest API', 'wp-statistics') . '<br />';
|
72 |
+
if (!empty($message)) {
|
73 |
+
$error_msg .= $message . '<br />';
|
74 |
+
}
|
75 |
+
$error_msg .= sprintf(__('Please Flushing rewrite rules or activate WordPress REST API for performance WP-Statistics Plugin Cache / Go %1$sSettings->Permalinks%2$s', 'wp-statistics'), '<a href="' . esc_url(admin_url('options-permalink.php')) . '">', '</a>');
|
76 |
+
Helper::wp_admin_notice($error_msg, 'warning', true);
|
77 |
}
|
78 |
}
|
79 |
|
includes/admin/pages/class-wp-statistics-admin-page-optimization.php
CHANGED
@@ -15,6 +15,9 @@ class optimization_page
|
|
15 |
if (Menus::in_page('optimization') and !User::Access('manage')) {
|
16 |
wp_die(__('You do not have sufficient permissions to access this page.'));
|
17 |
}
|
|
|
|
|
|
|
18 |
}
|
19 |
|
20 |
/**
|
@@ -28,7 +31,7 @@ class optimization_page
|
|
28 |
|
29 |
// Get List Table
|
30 |
$args['list_table'] = DB::table('all');
|
31 |
-
$args['result']
|
32 |
|
33 |
Admin_Template::get_template(array('layout/header', 'layout/title', 'optimization', 'layout/footer'), $args);
|
34 |
}
|
@@ -73,6 +76,69 @@ class optimization_page
|
|
73 |
}
|
74 |
}
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
|
78 |
new optimization_page;
|
15 |
if (Menus::in_page('optimization') and !User::Access('manage')) {
|
16 |
wp_die(__('You do not have sufficient permissions to access this page.'));
|
17 |
}
|
18 |
+
|
19 |
+
// Optimize and Repair Database MySQL
|
20 |
+
add_action('admin_notices', array($this, 'optimize_table'));
|
21 |
}
|
22 |
|
23 |
/**
|
31 |
|
32 |
// Get List Table
|
33 |
$args['list_table'] = DB::table('all');
|
34 |
+
$args['result'] = DB::getTableRows();
|
35 |
|
36 |
Admin_Template::get_template(array('layout/header', 'layout/title', 'optimization', 'layout/footer'), $args);
|
37 |
}
|
76 |
}
|
77 |
}
|
78 |
|
79 |
+
/**
|
80 |
+
* Optimize MySQL Table
|
81 |
+
*/
|
82 |
+
public function optimize_table()
|
83 |
+
{
|
84 |
+
global $wpdb;
|
85 |
+
|
86 |
+
if (Menus::in_page('optimization') and isset($_GET['optimize-table']) and !empty($_GET['optimize-table'])) {
|
87 |
+
$tbl = trim($_GET['optimize-table']);
|
88 |
+
if ($tbl == "all") {
|
89 |
+
$tables = array_filter(array_values(DB::table('all')));
|
90 |
+
} else {
|
91 |
+
$tables = array_filter(array(DB::table($tbl)));
|
92 |
+
}
|
93 |
+
|
94 |
+
if(!empty($tables)) {
|
95 |
+
$notice = '';
|
96 |
+
$okay = true;
|
97 |
+
|
98 |
+
// Use wp-admin/maint/repair.php
|
99 |
+
foreach ( $tables as $table ) {
|
100 |
+
$check = $wpdb->get_row( "CHECK TABLE $table" );
|
101 |
+
|
102 |
+
if ( 'OK' === $check->Msg_text ) {
|
103 |
+
/* translators: %s: Table name. */
|
104 |
+
$notice .= sprintf( __( 'The %s table is okay.', "wp-statistics" ), "<code>$table</code>" );
|
105 |
+
$notice .= '<br />';
|
106 |
+
} else {
|
107 |
+
$notice .= sprintf( __( 'The %1$s table is not okay. It is reporting the following error: %2$s. WordPress will attempt to repair this table…', "wp-statistics" ), "<code>$table</code>", "<code>$check->Msg_text</code>" );
|
108 |
+
$repair = $wpdb->get_row( "REPAIR TABLE $table" );
|
109 |
+
|
110 |
+
$notice .= '<br />';
|
111 |
+
if ( 'OK' === $repair->Msg_text ) {
|
112 |
+
$notice .= sprintf( __( 'Successfully repaired the %s table.', "wp-statistics" ), "<code>$table</code>" );
|
113 |
+
} else {
|
114 |
+
$notice .= sprintf( __( 'Failed to repair the %1$s table. Error: %2$s', "wp-statistics" ), "<code>$table</code>", "<code>$check->Msg_text</code>" ) . '<br />';
|
115 |
+
$problems[ $table ] = $check->Msg_text;
|
116 |
+
$okay = false;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
if ( $okay ) {
|
121 |
+
$check = $wpdb->get_row( "ANALYZE TABLE $table" );
|
122 |
+
if ( 'Table is already up to date' === $check->Msg_text ) {
|
123 |
+
$notice .= sprintf( __( 'The %s table is already optimized.', "wp-statistics" ), "<code>$table</code>" );
|
124 |
+
$notice .= '<br />';
|
125 |
+
} else {
|
126 |
+
$check = $wpdb->get_row( "OPTIMIZE TABLE $table" );
|
127 |
+
if ( 'OK' === $check->Msg_text || 'Table is already up to date' === $check->Msg_text ) {
|
128 |
+
$notice .= sprintf( __( 'Successfully optimized the %s table.', 'wp-statistics' ), "<code>$table</code>" );
|
129 |
+
$notice .= '<br />';
|
130 |
+
} else {
|
131 |
+
$notice .= sprintf( __( 'The %1$s table does not support optimize, doing recreate + analyze instead.' ), "<code>$table</code>");
|
132 |
+
$notice .= '<br />';
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
Helper::wp_admin_notice($notice, "info", $close_button = true, $id = false, $echo = true, $style_extra = 'padding:12px; line-height: 25px;');
|
139 |
+
}
|
140 |
+
}
|
141 |
+
}
|
142 |
}
|
143 |
|
144 |
new optimization_page;
|
includes/admin/templates/optimization/database.php
CHANGED
@@ -10,11 +10,53 @@
|
|
10 |
<label for="index-submit"><?php _e('Re-run Install:', 'wp-statistics'); ?></label>
|
11 |
</th>
|
12 |
<td>
|
13 |
-
<input id="install-submit" class="button button-primary" type="button"
|
|
|
|
|
14 |
<p class="description"><?php _e('If for some reason your installation of WP Statistics is missing the database tables or other core items, this will re-execute the install process.', 'wp-statistics'); ?></p>
|
15 |
</td>
|
16 |
</tr>
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
</tbody>
|
19 |
</table>
|
20 |
</div>
|
10 |
<label for="index-submit"><?php _e('Re-run Install:', 'wp-statistics'); ?></label>
|
11 |
</th>
|
12 |
<td>
|
13 |
+
<input id="install-submit" class="button button-primary" type="button"
|
14 |
+
value="<?php _e('Install Now!', 'wp-statistics'); ?>" name="install-submit"
|
15 |
+
onclick="location.href=document.URL+'&install=1&tab=database'">
|
16 |
<p class="description"><?php _e('If for some reason your installation of WP Statistics is missing the database tables or other core items, this will re-execute the install process.', 'wp-statistics'); ?></p>
|
17 |
</td>
|
18 |
</tr>
|
19 |
|
20 |
+
<tr valign="top">
|
21 |
+
<th scope="row" colspan="2">
|
22 |
+
<h3><?php _e('Repair and Optimization Database Tables', 'wp-statistics'); ?></h3></th>
|
23 |
+
</tr>
|
24 |
+
|
25 |
+
<tr valign="top">
|
26 |
+
<th scope="row">
|
27 |
+
<label for="index-submit"><?php _e('Optimize Table:', 'wp-statistics'); ?></label>
|
28 |
+
</th>
|
29 |
+
<td>
|
30 |
+
<script type="text/javascript">
|
31 |
+
jQuery(document).ready(function () {
|
32 |
+
jQuery("#wp-statistics-run-optimize-database-table").click(function () {
|
33 |
+
var tbl = jQuery('#optimize-table').val();
|
34 |
+
if (tbl == "0") {
|
35 |
+
alert('<?php _e("Please select database table", "wp-statistics"); ?>');
|
36 |
+
return;
|
37 |
+
}
|
38 |
+
window.location.href = document.URL + '&optimize-table=' + tbl + '&tab=database';
|
39 |
+
});
|
40 |
+
});
|
41 |
+
</script>
|
42 |
+
|
43 |
+
<select dir="<?php echo(is_rtl() ? 'rtl' : 'ltr'); ?>" id="optimize-table" name="optimize-table">
|
44 |
+
<option value="0"><?php _e('Please select', 'wp-statistics'); ?></option>
|
45 |
+
<?php
|
46 |
+
foreach (WP_STATISTICS\DB::table('all') as $tbl_key => $tbl_name) {
|
47 |
+
echo '<option value="' . $tbl_key . '">' . $tbl_name . '</option>';
|
48 |
+
}
|
49 |
+
?>
|
50 |
+
<option value="all"><?php echo __('All', 'wp-statistics'); ?></option>
|
51 |
+
</select>
|
52 |
+
<p class="description"><?php _e('Please select the table you would like to optimize and repair', 'wp-statistics'); ?></p>
|
53 |
+
|
54 |
+
<input id="wp-statistics-run-optimize-database-table" class="button button-primary" type="button"
|
55 |
+
value="<?php _e('Run Now!', 'wp-statistics'); ?>"
|
56 |
+
name="wp-statistics-run-optimize-database-table" style="margin-top:5px;">
|
57 |
+
</td>
|
58 |
+
</tr>
|
59 |
+
|
60 |
</tbody>
|
61 |
</table>
|
62 |
</div>
|
includes/api/v2/class-wp-statistics-api-hit.php
CHANGED
@@ -62,37 +62,29 @@ class Hit extends \WP_STATISTICS\RestAPI
|
|
62 |
$params[$p] = array('required' => true);
|
63 |
}
|
64 |
|
|
|
|
|
|
|
65 |
// Record WP-Statistics when Cache is enable
|
66 |
register_rest_route(self::$namespace, '/' . self::$endpoint, array(
|
67 |
array(
|
68 |
-
'methods'
|
69 |
-
'callback'
|
70 |
-
'
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
array('_wpnonce' => array(
|
75 |
-
'required' => true,
|
76 |
-
'validate_callback' => function ($value) {
|
77 |
-
return wp_verify_nonce($value, 'wp_rest');
|
78 |
-
}
|
79 |
-
)), $params)
|
80 |
)
|
81 |
));
|
82 |
|
83 |
// Check WP-Statistics Rest API Not disabled
|
84 |
-
register_rest_route(self::$namespace, '/
|
85 |
array(
|
86 |
-
'methods'
|
87 |
'callback' => array($this, 'check_enable_callback'),
|
88 |
'permission_callback' => function () {
|
89 |
return true;
|
90 |
-
}
|
91 |
-
'args' => array(
|
92 |
-
'connect' => array(
|
93 |
-
'required' => true
|
94 |
-
),
|
95 |
-
)
|
96 |
)
|
97 |
));
|
98 |
}
|
@@ -111,7 +103,7 @@ class Hit extends \WP_STATISTICS\RestAPI
|
|
111 |
Hits::record();
|
112 |
|
113 |
// Return
|
114 |
-
return
|
115 |
}
|
116 |
|
117 |
/**
|
@@ -122,11 +114,7 @@ class Hit extends \WP_STATISTICS\RestAPI
|
|
122 |
*/
|
123 |
public function check_enable_callback(\WP_REST_Request $request)
|
124 |
{
|
125 |
-
|
126 |
-
return self::response('enable');
|
127 |
-
}
|
128 |
-
|
129 |
-
return self::response('Missing connect parameter.', 400);
|
130 |
}
|
131 |
}
|
132 |
|
62 |
$params[$p] = array('required' => true);
|
63 |
}
|
64 |
|
65 |
+
// Add X-WP-Nonce
|
66 |
+
$params['_wpnonce'] = array('required' => true);
|
67 |
+
|
68 |
// Record WP-Statistics when Cache is enable
|
69 |
register_rest_route(self::$namespace, '/' . self::$endpoint, array(
|
70 |
array(
|
71 |
+
'methods' => \WP_REST_Server::READABLE,
|
72 |
+
'callback' => array($this, 'hit_callback'),
|
73 |
+
'args' => $params,
|
74 |
+
'permission_callback' => function (\WP_REST_Request $request) {
|
75 |
+
return true;
|
76 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
)
|
78 |
));
|
79 |
|
80 |
// Check WP-Statistics Rest API Not disabled
|
81 |
+
register_rest_route(self::$namespace, '/check', array(
|
82 |
array(
|
83 |
+
'methods' => \WP_REST_Server::READABLE,
|
84 |
'callback' => array($this, 'check_enable_callback'),
|
85 |
'permission_callback' => function () {
|
86 |
return true;
|
87 |
+
}
|
|
|
|
|
|
|
|
|
|
|
88 |
)
|
89 |
));
|
90 |
}
|
103 |
Hits::record();
|
104 |
|
105 |
// Return
|
106 |
+
return new \WP_REST_Response(array('status' => true, 'message' => __('Visitor Hit was recorded successfully.', 'wp-statistics')), 200);
|
107 |
}
|
108 |
|
109 |
/**
|
114 |
*/
|
115 |
public function check_enable_callback(\WP_REST_Request $request)
|
116 |
{
|
117 |
+
return new \WP_REST_Response(array('status' => true, 'message' => __('WP-Statistics has no problem establishing a connection to the WordPress REST API.', 'wp-statistics')), 200);
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
}
|
120 |
|
includes/api/v2/class-wp-statistics-api-meta-box.php
CHANGED
@@ -31,18 +31,15 @@ class Meta_Box extends \WP_STATISTICS\RestAPI
|
|
31 |
// Get Admin Meta Box
|
32 |
register_rest_route(self::$namespace, '/metabox', array(
|
33 |
array(
|
34 |
-
'methods'
|
35 |
-
'callback'
|
36 |
-
'args'
|
37 |
'name' => array(
|
38 |
-
'required'
|
39 |
-
'validate_callback' => function ($value, $request, $key) {
|
40 |
-
return (in_array($value, array_keys(\WP_STATISTICS\Meta_Box::getList())) and \WP_STATISTICS\Meta_Box::IsExistMetaBoxClass($value));
|
41 |
-
}
|
42 |
)
|
43 |
),
|
44 |
-
'permission_callback' => function () {
|
45 |
-
return
|
46 |
}
|
47 |
)
|
48 |
));
|
@@ -57,8 +54,20 @@ class Meta_Box extends \WP_STATISTICS\RestAPI
|
|
57 |
*/
|
58 |
public function meta_box_callback(\WP_REST_Request $request)
|
59 |
{
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
|
64 |
}
|
31 |
// Get Admin Meta Box
|
32 |
register_rest_route(self::$namespace, '/metabox', array(
|
33 |
array(
|
34 |
+
'methods' => \WP_REST_Server::READABLE,
|
35 |
+
'callback' => array($this, 'meta_box_callback'),
|
36 |
+
'args' => array(
|
37 |
'name' => array(
|
38 |
+
'required' => true
|
|
|
|
|
|
|
39 |
)
|
40 |
),
|
41 |
+
'permission_callback' => function (\WP_REST_Request $request) {
|
42 |
+
return true;
|
43 |
}
|
44 |
)
|
45 |
));
|
54 |
*/
|
55 |
public function meta_box_callback(\WP_REST_Request $request)
|
56 |
{
|
57 |
+
// Check User Auth
|
58 |
+
$user = wp_get_current_user();
|
59 |
+
if ($user->ID == 0) {
|
60 |
+
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);
|
61 |
+
}
|
62 |
+
|
63 |
+
// Check Exist MetaBox Name
|
64 |
+
if (in_array($request->get_param('name'), array_keys(\WP_STATISTICS\Meta_Box::getList())) and \WP_STATISTICS\Meta_Box::IsExistMetaBoxClass($request->get_param('name'))) {
|
65 |
+
$class = \WP_STATISTICS\Meta_Box::getMetaBoxClass($request->get_param('name'));
|
66 |
+
return $class::get($request->get_params());
|
67 |
+
}
|
68 |
+
|
69 |
+
// Not Define MetaBox
|
70 |
+
return new \WP_REST_Response(array('code' => 'not_found_meta_box', 'message' => __('The name of MetaBox is invalid on request.', 'wp-statistics')), 400);
|
71 |
}
|
72 |
|
73 |
}
|
includes/class-wp-statistics-db.php
CHANGED
@@ -121,7 +121,7 @@ class DB
|
|
121 |
global $wpdb;
|
122 |
|
123 |
if ($table_name) {
|
124 |
-
$result = $wpdb->query('
|
125 |
|
126 |
if ($result) {
|
127 |
return sprintf(__('%s table data deleted successfully.', 'wp-statistics'), '<code>' . $table_name . '</code>');
|
121 |
global $wpdb;
|
122 |
|
123 |
if ($table_name) {
|
124 |
+
$result = $wpdb->query('TRUNCATE TABLE ' . $table_name);
|
125 |
|
126 |
if ($result) {
|
127 |
return sprintf(__('%s table data deleted successfully.', 'wp-statistics'), '<code>' . $table_name . '</code>');
|
includes/{admin/class-wp-statistics-admin-purge.php → class-wp-statistics-purge.php}
RENAMED
File without changes
|
includes/class-wp-statistics.php
CHANGED
@@ -140,6 +140,7 @@ final class WP_Statistics
|
|
140 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-meta-box.php';
|
141 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-admin-bar.php';
|
142 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-rest-api.php';
|
|
|
143 |
|
144 |
// Hits Class
|
145 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-country.php';
|
@@ -165,7 +166,6 @@ final class WP_Statistics
|
|
165 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-dashboard.php';
|
166 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-export.php';
|
167 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-network.php';
|
168 |
-
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-purge.php';
|
169 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-assets.php';
|
170 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-notices.php';
|
171 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-post.php';
|
140 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-meta-box.php';
|
141 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-admin-bar.php';
|
142 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-rest-api.php';
|
143 |
+
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-purge.php';
|
144 |
|
145 |
// Hits Class
|
146 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-country.php';
|
166 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-dashboard.php';
|
167 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-export.php';
|
168 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-network.php';
|
|
|
169 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-assets.php';
|
170 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-notices.php';
|
171 |
require_once WP_STATISTICS_DIR . 'includes/admin/class-wp-statistics-admin-post.php';
|
includes/template-functions.php
CHANGED
@@ -501,9 +501,10 @@ function wp_statistics_pages($time, $page_uri = '', $id = -1, $rangestartdate =
|
|
501 |
* @param null $rangestartdate
|
502 |
* @param null $rangeenddate
|
503 |
* @param null $limit
|
|
|
504 |
* @return array
|
505 |
*/
|
506 |
-
function wp_statistics_get_top_pages($rangestartdate = null, $rangeenddate = null, $limit = null)
|
507 |
{
|
508 |
global $wpdb;
|
509 |
|
@@ -519,12 +520,14 @@ function wp_statistics_get_top_pages($rangestartdate = null, $rangeenddate = nul
|
|
519 |
|
520 |
// Now get the total page visit count for each unique URI.
|
521 |
foreach ($result as $out) {
|
|
|
|
|
|
|
|
|
|
|
522 |
// Increment the total number of results.
|
523 |
$total++;
|
524 |
|
525 |
-
//Prepare item
|
526 |
-
list($url, $page_id, $page_type) = $out;
|
527 |
-
|
528 |
//Get Page Title
|
529 |
$page_info = Pages::get_page_info($page_id, $page_type);
|
530 |
$title = mb_substr($page_info['title'], 0, 200, "utf-8");
|
@@ -563,6 +566,7 @@ function wp_statistics_get_top_pages($rangestartdate = null, $rangeenddate = nul
|
|
563 |
} else {
|
564 |
$uris[] = array($out[0], wp_statistics_pages('total', $out[0]), $page_id, $title, $page_url);
|
565 |
}
|
|
|
566 |
}
|
567 |
|
568 |
// If we have more than one result, let's sort them using usort.
|
@@ -900,4 +904,4 @@ function wp_statistics_referrer($time = null)
|
|
900 |
function wp_statistics_searchword($search_engine = 'all', $time = 'total')
|
901 |
{
|
902 |
return wp_statistics_get_search_engine_query($search_engine, $time, $search_by = 'word');
|
903 |
-
}
|
501 |
* @param null $rangestartdate
|
502 |
* @param null $rangeenddate
|
503 |
* @param null $limit
|
504 |
+
* @param null $post_type
|
505 |
* @return array
|
506 |
*/
|
507 |
+
function wp_statistics_get_top_pages($rangestartdate = null, $rangeenddate = null, $limit = null, $post_type = null)
|
508 |
{
|
509 |
global $wpdb;
|
510 |
|
520 |
|
521 |
// Now get the total page visit count for each unique URI.
|
522 |
foreach ($result as $out) {
|
523 |
+
//Prepare item
|
524 |
+
list($url, $page_id, $page_type) = $out;
|
525 |
+
|
526 |
+
// Check if item is of specific post type (string or part of an array) or if post type is set to null
|
527 |
+
if(is_null($post_type) || get_post_type($page_id) == $post_type || (is_array($post_type) && in_array(get_post_type($page_id), $post_type))) {
|
528 |
// Increment the total number of results.
|
529 |
$total++;
|
530 |
|
|
|
|
|
|
|
531 |
//Get Page Title
|
532 |
$page_info = Pages::get_page_info($page_id, $page_type);
|
533 |
$title = mb_substr($page_info['title'], 0, 200, "utf-8");
|
566 |
} else {
|
567 |
$uris[] = array($out[0], wp_statistics_pages('total', $out[0]), $page_id, $title, $page_url);
|
568 |
}
|
569 |
+
}
|
570 |
}
|
571 |
|
572 |
// If we have more than one result, let's sort them using usort.
|
904 |
function wp_statistics_searchword($search_engine = 'all', $time = 'total')
|
905 |
{
|
906 |
return wp_statistics_get_search_engine_query($search_engine, $time, $search_by = 'word');
|
907 |
+
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: mostafa.s1990, mehrshaddarzi, kashani, veronalabs, GregRoss, dedid
|
|
3 |
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: 3.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 13.0.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -124,8 +124,16 @@ Before updating, make sure you disabled all your add-ons, then after that, try t
|
|
124 |
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.
|
125 |
|
126 |
== Changelog ==
|
127 |
-
= 13.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
|
|
129 |
- Compatibility with PHP v7.2 and adjustment requires PHP version in the Composer to 5.6
|
130 |
- Fixed the issue to get the `Referred::get()` method during the initial plugin.
|
131 |
- Fixed issue to create tables queries in MariaDB v10.3
|
3 |
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: 3.0
|
6 |
+
Tested up to: 5.6
|
7 |
+
Stable tag: 13.0.5
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
124 |
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.
|
125 |
|
126 |
== Changelog ==
|
127 |
+
= 13.0.5 =
|
128 |
+
- Compatibility the ChartJs with some kind of plugins.
|
129 |
+
- Compatibility with WordPress v5.6
|
130 |
+
- Improvement error handling with REST API
|
131 |
+
- Added an option in the Optimization page to optimize & repair the tables.
|
132 |
+
- Added ability to filter `wp_statistics_get_top_pages()` by post type [#343](https://github.com/wp-statistics/wp-statistics/pull/343)
|
133 |
+
- Fixed the issue to load Purge class.
|
134 |
+
- Minor Improvements in SQL queries.
|
135 |
|
136 |
+
= 13.0.4 =
|
137 |
- Compatibility with PHP v7.2 and adjustment requires PHP version in the Composer to 5.6
|
138 |
- Fixed the issue to get the `Referred::get()` method during the initial plugin.
|
139 |
- Fixed issue to create tables queries in MariaDB v10.3
|
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.0.
|
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.0.5
|
7 |
* Author: VeronaLabs
|
8 |
* Author URI: https://veronalabs.com/
|
9 |
* Text Domain: wp-statistics
|