From 9b912db87b02effcd85f861ee8e467955b70d584 Mon Sep 17 00:00:00 2001 From: Tyler Kemme Date: Tue, 9 May 2017 19:41:55 -0500 Subject: [PATCH] removed guzzle, attempted some optimization --- assets/css/sass/analytics.scss | 32 + assets/css/sass/cmb2.scss | 16 - assets/css/sass/selectmenu.scss | 38 - assets/css/sass/styles.scss | 3 +- assets/css/sass/tabs.scss | 82 -- assets/css/sass/wpcd.scss | 9 +- assets/css/wp-cloudflare-dashboard.css | 132 +--- assets/css/wp-cloudflare-dashboard.css.map | 5 +- assets/css/wp-cloudflare-dashboard.min.css | 4 +- assets/js/wp-cloudflare-dashboard.js | 32 +- assets/js/wp-cloudflare-dashboard.min.js | 5 +- assets/scripts/wp-cloudflare-dashboard.min.js | 2 +- .../wp-cloudflare-dashboard.min.min.js | 2 +- composer.json | 1 - composer.lock | 237 +----- includes/class-analytics.php | 208 +++++ includes/class-assets.php | 40 +- includes/class-charts.php | 266 +++++++ includes/class-cloudclient.php | 521 ++++--------- includes/class-options.php | 140 +--- languages/wp-cloudflare-dashboard.pot | 738 +----------------- vendor/composer/autoload_classmap.php | 2 + vendor/composer/autoload_files.php | 12 - vendor/composer/autoload_psr4.php | 4 - vendor/composer/autoload_real.php | 18 - vendor/composer/autoload_static.php | 42 +- vendor/composer/installed.json | 243 +----- vendor/guzzlehttp/guzzle | 1 - vendor/guzzlehttp/promises | 1 - vendor/guzzlehttp/psr7 | 1 - vendor/psr/http-message | 1 - wp-cloudflare-dashboard.php | 74 +- 32 files changed, 806 insertions(+), 2106 deletions(-) create mode 100644 assets/css/sass/analytics.scss delete mode 100644 assets/css/sass/selectmenu.scss delete mode 100644 assets/css/sass/tabs.scss create mode 100644 includes/class-analytics.php create mode 100644 includes/class-charts.php delete mode 100644 vendor/composer/autoload_files.php delete mode 160000 vendor/guzzlehttp/guzzle delete mode 160000 vendor/guzzlehttp/promises delete mode 160000 vendor/guzzlehttp/psr7 delete mode 160000 vendor/psr/http-message diff --git a/assets/css/sass/analytics.scss b/assets/css/sass/analytics.scss new file mode 100644 index 0000000..ddea5db --- /dev/null +++ b/assets/css/sass/analytics.scss @@ -0,0 +1,32 @@ +/** + * WP Cloudflare Dashboard Analytics Styles + * + * Styles for the analytics page + * + * https://tylerkemme.com + * + * Copyright (c) 2017 Tyler Kemme + * Licensed under the GPLv2+ license. +*/ +.wpcd-analytics{ + background: #fff; + padding: 20px 15px; + border: none; + margin: 10px -4px; + + .wpcd-analytics-data{ + max-width: 97.5%; + padding: 20px 0; + + svg{ + overflow: visible !important; + } + } +} + +#analytics-tabs { + background: #fff; + box-shadow: 0 1px 1px rgba(0,0,0,.04); + padding: 15px 15px 0; + border: 1px solid #e5e5e5; +} diff --git a/assets/css/sass/cmb2.scss b/assets/css/sass/cmb2.scss index e222e36..96db057 100644 --- a/assets/css/sass/cmb2.scss +++ b/assets/css/sass/cmb2.scss @@ -8,22 +8,6 @@ * Copyright (c) 2017 Tyler Kemme * Licensed under the GPLv2+ license. */ -.cmb2-analytics{ - background: #fff; - padding: 20px 15px; - border: none; - margin: 10px -4px; - - .cmb2-analytics-data{ - max-width: 97.5%; - padding: 20px 0; - - svg{ - overflow: visible !important; - } - } -} - .cmb2-options-page{ .cmb-form{ .cmb-row { diff --git a/assets/css/sass/selectmenu.scss b/assets/css/sass/selectmenu.scss deleted file mode 100644 index 1166f19..0000000 --- a/assets/css/sass/selectmenu.scss +++ /dev/null @@ -1,38 +0,0 @@ -/** - * WP Cloudflare Dashboard - * https://tylerkemme.com - * - * Copyright (c) 2017 Tyler Kemme - * Licensed under the GPLv2+ license. -*/ -.ui-selectmenu-menu { - .ui-menu.customicons { - - .ui-menu-item-wrapper { - padding: 0.5em 0 0.5em 3em; - } - - .ui-menu-item { - .ui-icon { - height: 24px; - width: 24px; - top: 0.1em; - } - - .ui-icon.status-green { - background-image: url("../images/status-green.png") !important; - background-size: contain; - } - - .ui-icon.status-yellow { - background-image: url("../images/status-yellow.png") !important; - background-size: contain; - } - - .ui-icon.status-red { - background-image: url("../images/status-red.png") !important; - background-size: contain; - } - } - } -} diff --git a/assets/css/sass/styles.scss b/assets/css/sass/styles.scss index cbf6ade..f3994da 100644 --- a/assets/css/sass/styles.scss +++ b/assets/css/sass/styles.scss @@ -5,7 +5,6 @@ * Copyright (c) 2017 Tyler Kemme * Licensed under the GPLv2+ license. */ +@import "analytics"; @import "cmb2"; -@import "tabs"; -@import "selectmenu"; @import "wpcd"; diff --git a/assets/css/sass/tabs.scss b/assets/css/sass/tabs.scss deleted file mode 100644 index e879283..0000000 --- a/assets/css/sass/tabs.scss +++ /dev/null @@ -1,82 +0,0 @@ -/** - * WP Cloudflare Dashboard tabs - * - * Styles for Jquery UI tabs - * - * https://tylerkemme.com - * - * Copyright (c) 2017 Tyler Kemme - * Licensed under the GPLv2+ license. -*/ -.ui-tabs .ui-tabs-nav { - overflow: visible; - padding: 0 0 0!important; - margin: -15px -29px 0 -15px!important; - border-radius: 0; - border: none; - background: #f1f1f1; - outline: none; - box-shadow: none; - - li.ui-state-active { - margin-bottom: 0; - position: relative; - z-index: 3; - top: 1px; - box-shadow: none !important; - outline: none !important; - border: 1px solid #aaa; - border-bottom-color: white; - } - - li { - display: inline-block; - padding: 8px 0 !important; - width: calc( 20% - 5px ); - text-align: center; - border: 1px solid #d5d5d5; - margin: 0; - - &:active, .ui-state-active { - margin-bottom: 0; - position: relative; - z-index: 3; - top: 1px; - box-shadow: none !important; - outline: none !important; - border: 1px solid #aaa; - border-bottom-color: white; - } - - &:focus{ - outline-style: none; - } - - a.ui-tabs-anchor { - font-size: 22px; - font-weight: 300; - text-decoration: none; - font-family: 'Helvetica Neue'; - width: 81.5%; - &:focus{ - outline: none; - box-shadow: none; - } - span{ - &:focus{ - outline: none; - } - } - } - } -} - -.ui-tabs-panel { - z-index: 0; - display: block; - padding: 1em 1.4em !important; - background: white; - margin: 0px -15px; - position: relative; - border: 1px solid #aaa !important; -} diff --git a/assets/css/sass/wpcd.scss b/assets/css/sass/wpcd.scss index 2b6eb2b..3e5bf6b 100644 --- a/assets/css/sass/wpcd.scss +++ b/assets/css/sass/wpcd.scss @@ -8,12 +8,6 @@ * Copyright (c) 2017 Tyler Kemme * Licensed under the GPLv2+ license. */ -#analytics-tabs { - background: #fff; - box-shadow: 0 1px 1px rgba(0,0,0,.04); - padding: 15px 15px 0; - border: 1px solid #e5e5e5; -} fieldset { border: 0; @@ -73,8 +67,7 @@ label { } } -#timeSelect-button, -#zoneSelect-button { +#filter-button { min-width: 250px; margin: 10px 0px; diff --git a/assets/css/wp-cloudflare-dashboard.css b/assets/css/wp-cloudflare-dashboard.css index 42e8f05..cf3199b 100644 --- a/assets/css/wp-cloudflare-dashboard.css +++ b/assets/css/wp-cloudflare-dashboard.css @@ -6,26 +6,42 @@ * Licensed under the GPLv2+ license. */ /** - * WP Cloudflare Dashboard CMB2 Styles + * WP Cloudflare Dashboard Analytics Styles * - * Styles for the metabox/custom fields library CMB2 + * Styles for the analytics page * * https://tylerkemme.com * * Copyright (c) 2017 Tyler Kemme * Licensed under the GPLv2+ license. */ -.cmb2-analytics { +.wpcd-analytics { background: #fff; padding: 20px 15px; border: none; margin: 10px -4px; } - .cmb2-analytics .cmb2-analytics-data { + .wpcd-analytics .wpcd-analytics-data { max-width: 97.5%; padding: 20px 0; } - .cmb2-analytics .cmb2-analytics-data svg { + .wpcd-analytics .wpcd-analytics-data svg { overflow: visible !important; } +#analytics-tabs { + background: #fff; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); + padding: 15px 15px 0; + border: 1px solid #e5e5e5; } + +/** + * WP Cloudflare Dashboard CMB2 Styles + * + * Styles for the metabox/custom fields library CMB2 + * + * https://tylerkemme.com + * + * Copyright (c) 2017 Tyler Kemme + * Licensed under the GPLv2+ license. +*/ .cmb2-options-page .cmb-form .cmb-row { padding: 7px 25px !important; margin-bottom: 10px; @@ -52,100 +68,6 @@ .cmb2-options-page > h2 { padding: 10px 0px !important; } -/** - * WP Cloudflare Dashboard tabs - * - * Styles for Jquery UI tabs - * - * https://tylerkemme.com - * - * Copyright (c) 2017 Tyler Kemme - * Licensed under the GPLv2+ license. -*/ -.ui-tabs .ui-tabs-nav { - overflow: visible; - padding: 0 0 0 !important; - margin: -15px -29px 0 -15px !important; - border-radius: 0; - border: none; - background: #f1f1f1; - outline: none; - box-shadow: none; } - .ui-tabs .ui-tabs-nav li.ui-state-active { - margin-bottom: 0; - position: relative; - z-index: 3; - top: 1px; - box-shadow: none !important; - outline: none !important; - border: 1px solid #aaa; - border-bottom-color: white; } - .ui-tabs .ui-tabs-nav li { - display: inline-block; - padding: 8px 0 !important; - width: calc( 20% - 5px); - text-align: center; - border: 1px solid #d5d5d5; - margin: 0; } - .ui-tabs .ui-tabs-nav li:active, .ui-tabs .ui-tabs-nav li .ui-state-active { - margin-bottom: 0; - position: relative; - z-index: 3; - top: 1px; - box-shadow: none !important; - outline: none !important; - border: 1px solid #aaa; - border-bottom-color: white; } - .ui-tabs .ui-tabs-nav li:focus { - outline-style: none; } - .ui-tabs .ui-tabs-nav li a.ui-tabs-anchor { - font-size: 22px; - font-weight: 300; - text-decoration: none; - font-family: 'Helvetica Neue'; - width: 81.5%; } - .ui-tabs .ui-tabs-nav li a.ui-tabs-anchor:focus { - outline: none; - box-shadow: none; } - .ui-tabs .ui-tabs-nav li a.ui-tabs-anchor span:focus { - outline: none; } - -.ui-tabs-panel { - z-index: 0; - display: block; - padding: 1em 1.4em !important; - background: white; - margin: 0px -15px; - position: relative; - border: 1px solid #aaa !important; } - -/** - * WP Cloudflare Dashboard - * https://tylerkemme.com - * - * Copyright (c) 2017 Tyler Kemme - * Licensed under the GPLv2+ license. -*/ -.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item-wrapper { - padding: 0.5em 0 0.5em 3em; } - -.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item .ui-icon { - height: 24px; - width: 24px; - top: 0.1em; } - -.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item .ui-icon.status-green { - background-image: url("../images/status-green.png") !important; - background-size: contain; } - -.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item .ui-icon.status-yellow { - background-image: url("../images/status-yellow.png") !important; - background-size: contain; } - -.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item .ui-icon.status-red { - background-image: url("../images/status-red.png") !important; - background-size: contain; } - /** * WP Cloudflare Dashboard Styles * @@ -156,12 +78,6 @@ * Copyright (c) 2017 Tyler Kemme * Licensed under the GPLv2+ license. */ -#analytics-tabs { - background: #fff; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); - padding: 15px 15px 0; - border: 1px solid #e5e5e5; } - fieldset { border: 0; } @@ -208,12 +124,10 @@ label { #timeSelect-menu li .ui-icon { display: none; } -#timeSelect-button, -#zoneSelect-button { +#filter-button { min-width: 250px; margin: 10px 0px; } - #timeSelect-button:focus, - #zoneSelect-button:focus { + #filter-button:focus { outline: none; } /*# sourceMappingURL=wp-cloudflare-dashboard.css.map */ \ No newline at end of file diff --git a/assets/css/wp-cloudflare-dashboard.css.map b/assets/css/wp-cloudflare-dashboard.css.map index 9711ace..c5e287b 100644 --- a/assets/css/wp-cloudflare-dashboard.css.map +++ b/assets/css/wp-cloudflare-dashboard.css.map @@ -3,11 +3,10 @@ "file": "wp-cloudflare-dashboard.css", "sources": [ "sass/styles.scss", + "sass/analytics.scss", "sass/cmb2.scss", - "sass/tabs.scss", - "sass/selectmenu.scss", "sass/wpcd.scss" ], "names": [], - "mappings": "AAAA;;;;;;GAMG;ACNH;;;;;;;;;EASE;AACF,AAAA,eAAe,CAAA;EACd,UAAU,EAAE,IAAI;EACb,OAAO,EAAE,SAAS;EAClB,MAAM,EAAG,IAAI;EACb,MAAM,EAAE,SAAS,GAUpB;EAdD,AAMC,eANc,CAMd,oBAAoB,CAAA;IACnB,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,MAAM,GAKf;IAbF,AAUE,eAVa,CAMd,oBAAoB,CAInB,GAAG,CAAA;MACF,QAAQ,EAAE,kBAAkB,GAC5B;;AAIH,AAE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YAAY;EACpB,GAAG,EAAE,IAAI,GACT;;AAED,AAAiB,gBAAD,CAAC,EAAE,CAAC;EAChB,YAAY,EAAE,GAAG,GAKpB;EAND,AAGC,gBAHe,CAAC,EAAE,CAGlB,QAAQ,CAAC;IACL,OAAO,EAAE,IAAI,GAChB;;AAGF,AAAA,cAAc,CAAC;EACX,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,QAAQ,GAKnB;EAPD,AAIC,cAJa,AAIb,MAAO,CAAA;IACN,OAAO,EAAE,IAAI,GACb" } \ No newline at end of file diff --git a/assets/css/wp-cloudflare-dashboard.min.css b/assets/css/wp-cloudflare-dashboard.min.css index 2fc776a..883eb2c 100644 --- a/assets/css/wp-cloudflare-dashboard.min.css +++ b/assets/css/wp-cloudflare-dashboard.min.css @@ -1,9 +1,9 @@ /** - * WP Cloudflare Dashboard - v0.3.3 - 2017-03-02 + * WP Cloudflare Dashboard - v0.3.3 - 2017-05-09 * https://tylerkemme.com * * Copyright (c) 2017; * Licensed GPLv2+ */ -.cmb2-analytics{background:#fff;padding:20px 15px;border:none;margin:10px -4px}.cmb2-analytics .cmb2-analytics-data{max-width:97.5%;padding:20px 0}.cmb2-analytics .cmb2-analytics-data svg{overflow:visible!important}.cmb2-options-page .cmb-form .cmb-row{padding:7px 25px!important;margin-bottom:10px;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5}.cmb2-options-page .cmb-form .cmb-row .cmb-td{float:none!important;display:inline-block;width:64%}.cmb2-options-page .cmb-form .cmb-row .cmb-th{display:inline-block;width:33%!important}.cmb2-options-page .cmb-form .cmb-row .cmb-th label{font-size:15px;font-weight:700}.cmb2-options-page .cmb-form .cmb-row.cmb2-id-cloudflare-email-address{margin-bottom:15px!important}.cmb2-options-page .cmb-form .button-primary{margin-top:20px}.cmb2-options-page>h2{padding:10px 0!important}.ui-tabs .ui-tabs-nav{overflow:visible;padding:0 0 0!important;margin:-15px -29px 0 -15px!important;border-radius:0;border:none;background:#f1f1f1;outline:0;box-shadow:none}.ui-tabs .ui-tabs-nav li.ui-state-active{margin-bottom:0;position:relative;z-index:3;top:1px;box-shadow:none!important;outline:0!important;border:1px solid #aaa;border-bottom-color:#fff}.ui-tabs .ui-tabs-nav li{display:inline-block;padding:8px 0!important;width:calc(20% - 5px);text-align:center;border:1px solid #d5d5d5;margin:0}.ui-tabs .ui-tabs-nav li .ui-state-active,.ui-tabs .ui-tabs-nav li:active{margin-bottom:0;position:relative;z-index:3;top:1px;box-shadow:none!important;outline:0!important;border:1px solid #aaa;border-bottom-color:#fff}.ui-tabs .ui-tabs-nav li:focus{outline-style:none}.ui-tabs .ui-tabs-nav li a.ui-tabs-anchor{font-size:22px;font-weight:300;text-decoration:none;font-family:'Helvetica Neue';width:81.5%}.ui-tabs .ui-tabs-nav li a.ui-tabs-anchor:focus{outline:0;box-shadow:none}.ui-tabs .ui-tabs-nav li a.ui-tabs-anchor span:focus{outline:0}.ui-tabs-panel{z-index:0;display:block;padding:1em 1.4em!important;background:#fff;margin:0 -15px;position:relative;border:1px solid #aaa!important}.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item-wrapper{padding:.5em 0 .5em 3em}.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item .ui-icon{height:24px;width:24px;top:.1em}.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item .ui-icon.status-green{background-image:url(../images/status-green.png)!important;background-size:contain}.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item .ui-icon.status-yellow{background-image:url(../images/status-yellow.png)!important;background-size:contain}.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item .ui-icon.status-red{background-image:url(../images/status-red.png)!important;background-size:contain}#analytics-tabs{background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:15px 15px 0;border:1px solid #e5e5e5}fieldset{border:0}#filter-select-form{margin-bottom:10px;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:15px 15px;border:1px solid #e5e5e5}#filter-select-form fieldset{border:0;display:inline-block;width:49%}#green-success-connection{color:#00ce00;background:#dfd;padding:7px 20px;border:1px solid #00ce00;position:relative;margin:0 0 0 15px;top:-1px}h2{margin:30px 0 0 0}input:focus{outline:0!important}label{display:block}#red-error-connection{color:#ec0000;background:#fdd;padding:7px 10px;border:1px solid #ec0000;position:relative;margin:0 0 0 14px;top:-1px}#timeSelect-menu li{padding-left:1em}#timeSelect-menu li .ui-icon{display:none}#timeSelect-button,#zoneSelect-button{min-width:250px;margin:10px 0}#timeSelect-button:focus,#zoneSelect-button:focus{outline:0} \ No newline at end of file +.wpcd-analytics{background:#fff;padding:20px 15px;border:none;margin:10px -4px}.wpcd-analytics .wpcd-analytics-data{max-width:97.5%;padding:20px 0}.wpcd-analytics .wpcd-analytics-data svg{overflow:visible!important}#analytics-tabs{background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:15px 15px 0;border:1px solid #e5e5e5}.cmb2-options-page .cmb-form .cmb-row{padding:7px 25px!important;margin-bottom:10px;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5}.cmb2-options-page .cmb-form .cmb-row .cmb-td{float:none!important;display:inline-block;width:64%}.cmb2-options-page .cmb-form .cmb-row .cmb-th{display:inline-block;width:33%!important}.cmb2-options-page .cmb-form .cmb-row .cmb-th label{font-size:15px;font-weight:700}.cmb2-options-page .cmb-form .cmb-row.cmb2-id-cloudflare-email-address{margin-bottom:15px!important}.cmb2-options-page .cmb-form .button-primary{margin-top:20px}.cmb2-options-page>h2{padding:10px 0!important}fieldset{border:0}#filter-select-form{margin-bottom:10px;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:15px 15px;border:1px solid #e5e5e5}#filter-select-form fieldset{border:0;display:inline-block;width:49%}#green-success-connection{color:#00ce00;background:#dfd;padding:7px 20px;border:1px solid #00ce00;position:relative;margin:0 0 0 15px;top:-1px}h2{margin:30px 0 0 0}input:focus{outline:0!important}label{display:block}#red-error-connection{color:#ec0000;background:#fdd;padding:7px 10px;border:1px solid #ec0000;position:relative;margin:0 0 0 14px;top:-1px}#timeSelect-menu li{padding-left:1em}#timeSelect-menu li .ui-icon{display:none}#filter-button{min-width:250px;margin:10px 0}#filter-button:focus{outline:0} \ No newline at end of file diff --git a/assets/js/wp-cloudflare-dashboard.js b/assets/js/wp-cloudflare-dashboard.js index 99abaa8..297c213 100644 --- a/assets/js/wp-cloudflare-dashboard.js +++ b/assets/js/wp-cloudflare-dashboard.js @@ -24,7 +24,6 @@ window.WPCloudflareDashboard = window.WPCloudflareDashboard || {}; // Test Cloudflare Credentials $( 'input[name="test-cloudflare-creds"]' ).bind( 'click', function( event ) { - var data = { 'action': 'test_cloudflare_creds' }; @@ -40,6 +39,7 @@ window.WPCloudflareDashboard = window.WPCloudflareDashboard || {}; } jQuery.post( '/wp-admin/admin-ajax.php', data, function( response ) { + if ( '200' === response ) { $( ' Connection successful' ).insertAfter( $( 'input[name="test-cloudflare-creds"]' ) ); } else { @@ -49,34 +49,12 @@ window.WPCloudflareDashboard = window.WPCloudflareDashboard || {}; }); - // Initiate jquery tabs on analytics page - $( '#analytics-tabs' ).tabs(); - - // Initiate selectmenu on analytics page - $( function() { - $.widget( 'custom.iconselectmenu', $.ui.selectmenu, { - _renderItem: function( ul, item ) { - var li = $( '
  • ' ), - wrapper = $( '
    ', { text: item.label }); - - if ( item.disabled ) { - li.addClass( 'ui-state-disabled' ); - } - - $( '', { - style: item.element.attr( 'data-style' ), - 'class': 'ui-icon ' + item.element.attr( 'data-class' ) - }) - .appendTo( wrapper ); + if ( 0 < $( '.wpcd-analytics-page' ).length ) { - return li.append( wrapper ).appendTo( ul ); - } - }); - - $( '#zoneSelect' ).iconselectmenu().iconselectmenu( 'menuWidget' ); - $( '#timeSelect' ).iconselectmenu().iconselectmenu( 'menuWidget' ); - }); + // Initiate jquery tabs on analytics page + $( '#analytics-tabs' ).tabs(); + } }; $( plugin.init ); diff --git a/assets/js/wp-cloudflare-dashboard.min.js b/assets/js/wp-cloudflare-dashboard.min.js index ca0c0f7..48dcfb2 100644 --- a/assets/js/wp-cloudflare-dashboard.min.js +++ b/assets/js/wp-cloudflare-dashboard.min.js @@ -1,2 +1,3 @@ -/** WP Cloudflare Dashboard - v0.3.3 - 2017-03-02 | https://tylerkemme.com | Copyright (c) 2017; | Licensed GPLv2+ **/ -window.WPCloudflareDashboard=window.WPCloudflareDashboard||{},function(a,b,c,d){var e={};d.init=function(){d.cache(),d.bindEvents()},d.cache=function(){e.window=c(a),e.body=c(b.body)},d.bindEvents=function(){c('input[name="test-cloudflare-creds"]').bind("click",function(a){var b={action:"test_cloudflare_creds"};a.preventDefault(),c("#green-success-connection").length&&c("#green-success-connection").remove(),c("#red-error-connection").length&&c("#red-error-connection").remove(),jQuery.post("/wp-admin/admin-ajax.php",b,function(a){"200"===a?c(' Connection successful').insertAfter(c('input[name="test-cloudflare-creds"]')):c(' Connection unsuccessful.').insertAfter(c('input[name="test-cloudflare-creds"]'))})}),c("#analytics-tabs").tabs(),c(function(){c.widget("custom.iconselectmenu",c.ui.selectmenu,{_renderItem:function(a,b){var d=c("
  • "),e=c("
    ",{text:b.label});return b.disabled&&d.addClass("ui-state-disabled"),c("",{style:b.element.attr("data-style"),class:"ui-icon "+b.element.attr("data-class")}).appendTo(e),d.append(e).appendTo(a)}}),c("#zoneSelect").iconselectmenu().iconselectmenu("menuWidget"),c("#timeSelect").iconselectmenu().iconselectmenu("menuWidget")})},c(d.init)}(window,document,jQuery,window.WPCloudflareDashboard); \ No newline at end of file +/** WP Cloudflare Dashboard - v0.3.3 - 2017-05-09 | https://tylerkemme.com | Copyright (c) 2017; | Licensed GPLv2+ **/ + +window.WPCloudflareDashboard=window.WPCloudflareDashboard||{},function(a,b,c,d){var e={};d.init=function(){d.cache(),d.bindEvents()},d.cache=function(){e.window=c(a),e.body=c(b.body)},d.bindEvents=function(){c('input[name="test-cloudflare-creds"]').bind("click",function(a){var b={action:"test_cloudflare_creds"};a.preventDefault(),c("#green-success-connection").length&&c("#green-success-connection").remove(),c("#red-error-connection").length&&c("#red-error-connection").remove(),jQuery.post("/wp-admin/admin-ajax.php",b,function(a){"200"===a?c(' Connection successful').insertAfter(c('input[name="test-cloudflare-creds"]')):c(' Connection unsuccessful.').insertAfter(c('input[name="test-cloudflare-creds"]'))})}),0 Connection successful').insertAfter($('input[name="test-cloudflare-creds"]')):$(' Connection unsuccessful.').insertAfter($('input[name="test-cloudflare-creds"]'))})}),$("#analytics-tabs").tabs(),$(function(){$.widget("custom.iconselectmenu",$.ui.selectmenu,{_renderItem:function(ul,item){var li=$("
  • "),wrapper=$("
    ",{text:item.label});return item.disabled&&li.addClass("ui-state-disabled"),$("",{style:item.element.attr("data-style"),class:"ui-icon "+item.element.attr("data-class")}).appendTo(wrapper),li.append(wrapper).appendTo(ul)}}),$("#zoneSelect").iconselectmenu().iconselectmenu("menuWidget"),$("#timeSelect").iconselectmenu().iconselectmenu("menuWidget")})},$(plugin.init)}(window,document,jQuery,window.WPCloudflareDashboard); \ No newline at end of file +window.WPCloudflareDashboard=window.WPCloudflareDashboard||{},function(window,document,$,plugin){var $c={};plugin.init=function(){plugin.cache(),plugin.bindEvents()},plugin.cache=function(){$c.window=$(window),$c.body=$(document.body)},plugin.bindEvents=function(){$('input[name="test-cloudflare-creds"]').bind("click",function(event){var data={action:"test_cloudflare_creds"};event.preventDefault(),$("#green-success-connection").length&&$("#green-success-connection").remove(),$("#red-error-connection").length&&$("#red-error-connection").remove(),jQuery.post("/wp-admin/admin-ajax.php",data,function(response){"200"===response?$(' Connection successful').insertAfter($('input[name="test-cloudflare-creds"]')):$(' Connection unsuccessful.').insertAfter($('input[name="test-cloudflare-creds"]'))})}),0<$(".wpcd-analytics-page").length&&$("#analytics-tabs").tabs()},$(plugin.init)}(window,document,jQuery,window.WPCloudflareDashboard); \ No newline at end of file diff --git a/assets/scripts/wp-cloudflare-dashboard.min.min.js b/assets/scripts/wp-cloudflare-dashboard.min.min.js index 70c0660..a4f8db8 100644 --- a/assets/scripts/wp-cloudflare-dashboard.min.min.js +++ b/assets/scripts/wp-cloudflare-dashboard.min.min.js @@ -1 +1 @@ -window.WPCloudflareDashboard=window.WPCloudflareDashboard||{},function(a,b,c,d){var e={};d.init=function(){d.cache(),d.bindEvents()},d.cache=function(){e.window=c(a),e.body=c(b.body)},d.bindEvents=function(){c('input[name="test-cloudflare-creds"]').bind("click",function(a){var b={action:"test_cloudflare_creds"};a.preventDefault(),c("#green-success-connection").length&&c("#green-success-connection").remove(),c("#red-error-connection").length&&c("#red-error-connection").remove(),jQuery.post("/wp-admin/admin-ajax.php",b,function(a){"200"===a?c(' Connection successful').insertAfter(c('input[name="test-cloudflare-creds"]')):c(' Connection unsuccessful.').insertAfter(c('input[name="test-cloudflare-creds"]'))})}),c("#analytics-tabs").tabs(),c(function(){c.widget("custom.iconselectmenu",c.ui.selectmenu,{_renderItem:function(a,b){var d=c("
  • "),e=c("
    ",{text:b.label});return b.disabled&&d.addClass("ui-state-disabled"),c("",{style:b.element.attr("data-style"),class:"ui-icon "+b.element.attr("data-class")}).appendTo(e),d.append(e).appendTo(a)}}),c("#zoneSelect").iconselectmenu().iconselectmenu("menuWidget"),c("#timeSelect").iconselectmenu().iconselectmenu("menuWidget")})},c(d.init)}(window,document,jQuery,window.WPCloudflareDashboard); \ No newline at end of file +window.WPCloudflareDashboard=window.WPCloudflareDashboard||{},function(a,b,c,d){var e={};d.init=function(){d.cache(),d.bindEvents()},d.cache=function(){e.window=c(a),e.body=c(b.body)},d.bindEvents=function(){c('input[name="test-cloudflare-creds"]').bind("click",function(a){var b={action:"test_cloudflare_creds"};a.preventDefault(),c("#green-success-connection").length&&c("#green-success-connection").remove(),c("#red-error-connection").length&&c("#red-error-connection").remove(),jQuery.post("/wp-admin/admin-ajax.php",b,function(a){"200"===a?c(' Connection successful').insertAfter(c('input[name="test-cloudflare-creds"]')):c(' Connection unsuccessful.').insertAfter(c('input[name="test-cloudflare-creds"]'))})}),0=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.0", - "psr/log": "^1.0" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2017-02-28 22:51:22" - }, - { - "name": "guzzlehttp/promises", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "time": "2016-12-20 10:07:11" - }, - { - "name": "guzzlehttp/psr7", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/0d6c7ca039329247e4f0f8f8f6506810e8248855", - "reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2017-02-27 10:51:17" - }, - { - "name": "psr/http-message", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06 14:39:51" - }, { "name": "webdevstudios/cmb2", "version": "v2.2.4", "source": { "type": "git", - "url": "https://github.com/WebDevStudios/CMB2.git", + "url": "https://github.com/CMB2/CMB2.git", "reference": "badecc7f908781ac14b879c74526f9d055f4a41e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WebDevStudios/CMB2/zipball/badecc7f908781ac14b879c74526f9d055f4a41e", + "url": "https://api.github.com/repos/CMB2/CMB2/zipball/badecc7f908781ac14b879c74526f9d055f4a41e", "reference": "badecc7f908781ac14b879c74526f9d055f4a41e", "shasum": "" }, diff --git a/includes/class-analytics.php b/includes/class-analytics.php new file mode 100644 index 0000000..98da089 --- /dev/null +++ b/includes/class-analytics.php @@ -0,0 +1,208 @@ +plugin = $plugin; + $this->hooks(); + } + + /** + * Initiate our hooks + * + * @since 0.1.0 + * @return void + */ + public function hooks() { + add_action( 'admin_init', array( $this, 'admin_init' ) ); + } + + /** + * Register our setting to WP + * + * @since 0.1.0 + * @return void + */ + public function admin_init() { + register_setting( $this->key, $this->key ); + } + + + /** + * Analytics page markup + * @since 0.1.0 + * @return void + */ + public function analytics_page_display() { + + $cloudclient = $this->plugin->cloudclient; + $charts = $this->plugin->charts; + $zones = $cloudclient->wpcd_get_zones(); + + if( empty( wpcd_get_option( 'cloudflare_email_address' ) ) || empty( wpcd_get_option( 'cloudflare_api_key' ) ) ): ?> +
    +

    +
    +

    Please set your Cloudflare API Key and Email Address here.

    +
    + +
    +

    +
    +

    There was a problem with your Cloudflare credentials. Please verify them here.

    +
    + +
    +

    +
    +
    +
    +
    + + +
    +
    + + +
    + +
    +
    + + wpcd_get_requests( + isset( $_POST['zoneSelect'] ) ? $_POST['zoneSelect'] : $zones[0]['id'], + isset( $_POST['timeSelect'] ) ? $_POST['timeSelect'] : '1440' + ); + $charts->display_requests( $requests ); + ?> + wpcd_get_bandwidth( + isset( $_POST['zoneSelect'] ) ? $_POST['zoneSelect'] : $zones[0]['id'], + isset( $_POST['timeSelect'] ) ? $_POST['timeSelect'] : '1440' + ); + $charts->display_bandwidth( $requests ); + ?> + + wpcd_get_visitors( + isset( $_POST['zoneSelect'] ) ? $_POST['zoneSelect'] : $zones[0]['id'], + isset( $_POST['timeSelect'] ) ? $_POST['timeSelect'] : '1440' + ); + $charts->display_visitors( $visitors ); + ?> + wpcd_get_threats( + isset( $_POST['zoneSelect'] ) ? $_POST['zoneSelect'] : $zones[0]['id'], + isset( $_POST['timeSelect'] ) ? $_POST['timeSelect'] : '1440' + ); + $charts->display_threats( $threats ); + ?> + wpcd_get_ssl( + isset( $_POST['zoneSelect'] ) ? $_POST['zoneSelect'] : $zones[0]['id'], + isset( $_POST['timeSelect'] ) ? $_POST['timeSelect'] : '1440' + ); + $charts->display_ssl( $ssl ); + ?> +
    +
    +
    + {$field}; + } + throw new Exception( 'Invalid property: ' . $field ); + } +} diff --git a/includes/class-assets.php b/includes/class-assets.php index da65792..e3dd255 100644 --- a/includes/class-assets.php +++ b/includes/class-assets.php @@ -40,11 +40,12 @@ public function __construct( $plugin ) { */ public function hooks() { + // Load admin scripts + add_action( 'admin_enqueue_scripts', array( $this, 'wpcd_admin_scripts' ) ); + // Load admin styles add_action( 'admin_enqueue_scripts', array( $this, 'wpcd_admin_styles' ) ); - // Load admin scripts - add_action( 'admin_enqueue_scripts', array( $this, 'wpcd_admin_scripts' ) ); } /** @@ -57,27 +58,29 @@ public function hooks() { public function wpcd_admin_styles( $hook ) { // Only load on cloudflare dashboard page - if( $hook == 'cloudflare-dashboard_page_wp-cloudflare-dashboard-options' || - $hook == 'toplevel_page_wp_cloudflare_dashboard_analytics' ) { + if( $hook === 'cloudflare-dashboard_page_wp_cloudflare_dashboard_options' ){ + + // Enqueue plugin CSS + wp_enqueue_style( 'wpcd_admin_css', plugins_url( 'assets/css/wp-cloudflare-dashboard.min.css', dirname(__FILE__) ) ); + } + if( $hook === 'toplevel_page_wp_cloudflare_dashboard_analytics' ) { global $wp_scripts; // Enqueue C3 styles wp_enqueue_style( 'c3_css', plugins_url( 'assets/bower/c3/c3.min.css', dirname(__FILE__) ) ); - // tell WordPress to load the Smoothness theme from Google CDN - $ui = $wp_scripts->query('jquery-ui-core'); - $protocol = is_ssl() ? 'https' : 'http'; - $url = "$protocol://ajax.googleapis.com/ajax/libs/jqueryui/{$ui->ver}/themes/smoothness/jquery-ui.min.css"; - wp_enqueue_style('jquery-ui-smoothness', $url, false, null); + // tell WordPress to load the JQuery UI theme + wp_enqueue_style('wpcd-admin-ui-css', + 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/ui-lightness/jquery-ui.css', + false, + $this->plugin->version, + false); // Enqueue plugin CSS wp_enqueue_style( 'wpcd_admin_css', plugins_url( 'assets/css/wp-cloudflare-dashboard.min.css', dirname(__FILE__) ) ); } - else{ - return; - } } /** @@ -88,19 +91,16 @@ public function wpcd_admin_styles( $hook ) { * @return void */ public function wpcd_admin_scripts( $hook ) { - // Only load on cloudflare dashboard page - if( $hook == 'cloudflare-dashboard_page_wp-cloudflare-dashboard-options' || - $hook == 'toplevel_page_wp_cloudflare_dashboard_analytics' ) { + if( $hook === 'cloudflare-dashboard_page_wp_cloudflare_dashboard_options' ){ + wp_enqueue_script( 'wpcd_admin_js', plugins_url( 'assets/scripts/wp-cloudflare-dashboard.min.js', dirname(__FILE__) ) ); + } + if( $hook === 'toplevel_page_wp_cloudflare_dashboard_analytics' ) { wp_enqueue_script( 'jquery-ui-core' ); // enqueue jQuery UI Core wp_enqueue_script( 'jquery-ui-tabs' ); // enqueue jQuery UI Tabs - wp_enqueue_script( 'jquery-ui-selectmenu' ); // enqueue jQuery UI Selectmenu - wp_enqueue_script( 'c3_js', plugins_url( 'assets/bower/c3/c3.min.js', dirname(__FILE__) ) ); wp_enqueue_script( 'd3_js', plugins_url( 'assets/bower/d3/d3.min.js', dirname(__FILE__) ) ); + wp_enqueue_script( 'c3_js', plugins_url( 'assets/bower/c3/c3.min.js', dirname(__FILE__) ) ); wp_enqueue_script( 'wpcd_admin_js', plugins_url( 'assets/scripts/wp-cloudflare-dashboard.min.js', dirname(__FILE__) ) ); } - else{ - return; - } } } diff --git a/includes/class-charts.php b/includes/class-charts.php new file mode 100644 index 0000000..f8b014f --- /dev/null +++ b/includes/class-charts.php @@ -0,0 +1,266 @@ +plugin = $plugin; + } + + /** + * Display Analytics for Requests + * + * @since 0.1.0 + * @param $requests an array of retrieved requests for a specific zone + * @return void + */ + public static function display_requests( $requests ) { + ?> +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + request('GET', 'https://api.cloudflare.com/client/v4/zones', [ - 'headers' => [ - 'X-Auth-Key' => $this->cloudflare_api_key, - 'X-Auth-Email' => $this->cloudflare_email_address - ] - ]); - - echo $res->getStatusCode(); - wp_die(); - - } catch ( Exception $e ) { - - echo $e; - wp_die(); - } - + if( empty( $this->cloudflare_api_key ) || empty( $this->cloudflare_email_address ) ){ + return; + } + + $response = wp_remote_get( 'https://api.cloudflare.com/client/v4/zones', array( + 'headers' => array( + 'X-Auth-Key' => $this->cloudflare_api_key, + 'X-Auth-Email' => $this->cloudflare_email_address + ) + )); + + if( is_wp_error($response) ){ + echo $response->get_error_message(); + } + else if( wp_remote_retrieve_response_code($response) === 200 ){ + echo 200; + } + else{ + echo wp_remote_retrieve_response_code() . ': ' . wp_remote_retrieve_response_message(); + } + wp_die(); } /** @@ -102,55 +105,58 @@ public function test_cloudflare_creds() { */ public function wpcd_get_zones() { - $client = new GuzzleHttp\Client(); - - try{ - - $res = $client->request('GET', 'https://api.cloudflare.com/client/v4/zones', [ - 'headers' => [ - 'X-Auth-Key' => $this->cloudflare_api_key, - 'X-Auth-Email' => $this->cloudflare_email_address - ] - ]); - - // Zone data from cloudflare - $zoneJson = json_decode($res->getBody())->result; - - // Array of zones to return - $zones = array(); - - foreach( $zoneJson as $zoneJ ){ - - $status = ''; - switch( $zoneJ->status ){ - case 'active': - case 'read-only': - $status = 'status-green'; - break; - - case 'pending': - case 'initializing': - $status = 'status-yellow'; - break; - - default: - $status = 'status-red'; - break; - } - - array_push( $zones, array( - 'id' => $zoneJ->id, - 'name' => $zoneJ->name, - 'status' => $status - )); - } - - return $zones; - - } catch ( Exception $e ) { + if( empty( $this->cloudflare_api_key ) || empty( $this->cloudflare_email_address ) ){ + return; + } + + $response = wp_remote_get( 'https://api.cloudflare.com/client/v4/zones', array( + 'headers' => array( + 'X-Auth-Key' => $this->cloudflare_api_key, + 'X-Auth-Email' => $this->cloudflare_email_address + ) + )); + if( is_wp_error( $response ) ){ + return $response->get_error_message(); + } + else if( json_decode( $response['body'] )->success === false ){ + return json_decode( $response['body'] )->errors[0]->message; - return $e; } + else{ + // Zone data from cloudflare + $zoneJson = json_decode( $response['body'] )->result; + + // Array of zones to return + $zones = array(); + + foreach( $zoneJson as $zoneJ ){ + + $status = ''; + switch( $zoneJ->status ){ + case 'active': + case 'read-only': + $status = 'status-green'; + break; + + case 'pending': + case 'initializing': + $status = 'status-yellow'; + break; + + default: + $status = 'status-red'; + break; + } + + array_push( $zones, array( + 'id' => $zoneJ->id, + 'name' => $zoneJ->name, + 'status' => $status + )); + } + + return $zones; + } } @@ -160,23 +166,28 @@ public function wpcd_get_zones() { * @since 0.1.0 * @param $zoneId id of cloudflare zone * @param $period period of time to retrieve data - * @return $zones array of zones for current user ['x', 'Cached','Uncached'] + * @return $zones/WP_Error array of zones for current user ['x', 'Cached','Uncached'] */ public function wpcd_get_requests( $zoneId, $period ) { - $client = new GuzzleHttp\Client(); - - try{ - $url = 'https://api.cloudflare.com/client/v4/zones/' . $zoneId . '/analytics/dashboard?since=-' . $period; - $res = $client->request('GET', $url, [ - 'headers' => [ - 'X-Auth-Key' => $this->cloudflare_api_key, - 'X-Auth-Email' => $this->cloudflare_email_address - ] - ]); - + if( empty( $this->cloudflare_api_key ) || empty( $this->cloudflare_email_address ) ){ + return; + } + + $url = 'https://api.cloudflare.com/client/v4/zones/' . $zoneId . '/analytics/dashboard?since=-' . $period; + $response = wp_remote_get( $url, array( + 'headers' => array( + 'X-Auth-Key' => $this->cloudflare_api_key, + 'X-Auth-Email' => $this->cloudflare_email_address + ) + )); + + if( is_wp_error( $response ) ){ + return $response->get_error_message(); + } + else{ // Zone data from cloudflare - $timeJson = json_decode($res->getBody())->result->timeseries; + $timeJson = json_decode( $response['body'] )->result->timeseries; // Array of cached requests $crequests = array(); @@ -202,83 +213,38 @@ public function wpcd_get_requests( $zoneId, $period ) { 'ucrequests' => $ucrequests ); - } catch ( Exception $e ) { - return $e; } } - /** - * Display Analytics for Requests - * - * @since 0.1.0 - * @param $requests an array of retrieved requests for a specific zone - * @return void - */ - public static function display_requests( $requests ) { - - ?> -
    -
    -
    - - request('GET', $url, [ - 'headers' => [ - 'X-Auth-Key' => $this->cloudflare_api_key, - 'X-Auth-Email' => $this->cloudflare_email_address - ] - ]); - + if( empty( $this->cloudflare_api_key ) || empty( $this->cloudflare_email_address ) ){ + return; + } + + $url = 'https://api.cloudflare.com/client/v4/zones/' . $zoneId . '/analytics/dashboard?since=-' . $period; + $response = wp_remote_get( $url, array( + 'headers' => array( + 'X-Auth-Key' => $this->cloudflare_api_key, + 'X-Auth-Email' => $this->cloudflare_email_address + ) + )); + + if( is_wp_error( $response ) ){ + return $response->get_error_message(); + } + else{ // Zone data from cloudflare - $timeJson = json_decode($res->getBody())->result->timeseries; + $timeJson = json_decode( $response['body'] )->result->timeseries; // Array of cached requests $crequests = array(); @@ -304,59 +270,10 @@ public function wpcd_get_bandwidth( $zoneId, $period ) { 'ucrequests' => $ucrequests ); - } catch ( Exception $e ) { - return $e; } } - /** - * Display Analytics for Bandwidth - * - * @since 0.1.0 - * @return void - */ - public static function display_bandwidth( $requests ) { - - ?> -
    -
    -
    - - request('GET', $url, [ - 'headers' => [ - 'X-Auth-Key' => $this->cloudflare_api_key, - 'X-Auth-Email' => $this->cloudflare_email_address - ] - ]); - + if( empty( $this->cloudflare_api_key ) || empty( $this->cloudflare_email_address ) ){ + return; + } + + $url = 'https://api.cloudflare.com/client/v4/zones/' . $zoneId . '/analytics/dashboard?since=-' . $period; + $response = wp_remote_get( $url, array( + 'headers' => array( + 'X-Auth-Key' => $this->cloudflare_api_key, + 'X-Auth-Email' => $this->cloudflare_email_address + ) + )); + + if( is_wp_error( $response ) ){ + return $response->get_error_message(); + } + else{ // Zone data from cloudflare - $timeJson = json_decode($res->getBody())->result->timeseries; + $timeJson = json_decode( $response['body'] )->result->timeseries; // Array of cached requests $uniques = array(); @@ -399,52 +321,7 @@ public function wpcd_get_visitors( $zoneId, $period ) { 'uniques' => $uniques ); - } catch ( Exception $e ) { - return $e; } - - } - - /** - * Display Analytics for Unique Visitors - * - * @since 0.1.0 - * @return void - */ - public static function display_visitors( $visitors ) { - ?> -
    -
    -
    - - request('GET', $url, [ - 'headers' => [ - 'X-Auth-Key' => $this->cloudflare_api_key, - 'X-Auth-Email' => $this->cloudflare_email_address - ] - ]); - + if( empty( $this->cloudflare_api_key ) || empty( $this->cloudflare_email_address ) ){ + return; + } + + $url = 'https://api.cloudflare.com/client/v4/zones/' . $zoneId . '/analytics/dashboard?since=-' . $period; + $response = wp_remote_get( $url, array( + 'headers' => array( + 'X-Auth-Key' => $this->cloudflare_api_key, + 'X-Auth-Email' => $this->cloudflare_email_address + ) + )); + + if( is_wp_error( $response ) ){ + return $response->get_error_message(); + } + else{ // Zone data from cloudflare - $timeJson = json_decode($res->getBody())->result->timeseries; + $timeJson = json_decode( $response['body'] )->result->timeseries; // Array of cached requests $threats = array(); @@ -489,54 +371,10 @@ public function wpcd_get_threats( $zoneId, $period ) { 'threats' => $threats ); - } catch ( Exception $e ) { - return $e; } } - /** - * Display Analytics for Threats - * - * @since 0.1.0 - * @return void - */ - public static function display_threats( $threats ) { - ?> -
    -
    -
    - - cloudflare_api_key ) || empty( $this->cloudflare_email_address ) ){ + return; + } - try{ - $url = 'https://api.cloudflare.com/client/v4/zones/' . $zoneId . '/analytics/dashboard?since=-' . $period; - $res = $client->request('GET', $url, [ - 'headers' => [ - 'X-Auth-Key' => $this->cloudflare_api_key, - 'X-Auth-Email' => $this->cloudflare_email_address - ] - ]); + $url = 'https://api.cloudflare.com/client/v4/zones/' . $zoneId . '/analytics/dashboard?since=-' . $period; + $response = wp_remote_get( $url, array( + 'headers' => array( + 'X-Auth-Key' => $this->cloudflare_api_key, + 'X-Auth-Email' => $this->cloudflare_email_address + ) + )); + if( is_wp_error( $response ) ){ + return $response->get_error_message(); + } + else{ // Zone data from cloudflare - $timeJson = json_decode($res->getBody())->result->timeseries; + $timeJson = json_decode( $response['body'] )->result->timeseries; // Array of encrypted requests $encrypted = array(); @@ -585,55 +428,7 @@ public function wpcd_get_ssl( $zoneId, $period ) { 'unencrypted' => $unencrypted ); - } catch ( Exception $e ) { - return $e; } - } - /** - * Display Analytics for SSL - * - * @since 0.1.0 - * @return void - */ - public static function display_ssl( $requests ) { - ?> -
    -
    -
    - - analytics_page = add_menu_page( - $this->title, - $this->title, + __( 'Cloudflare Dashboard Analytics', 'wp-cloudflare-dashboard' ), + __( 'Cloudflare Dashboard', 'wp-cloudflare-dashboard' ), 'manage_options', - $this->key, - array( $this, 'analytics_page_display' ), + 'wp_cloudflare_dashboard_analytics', + array( $this->plugin->analytics, 'analytics_page_display' ), 'dashicons-cloud' ); - $this->options_page = add_submenu_page( - $this->key, + 'wp_cloudflare_dashboard_analytics', __( 'Cloudflare Dashboard Settings', 'wp-cloudflare-dashboard' ), __( 'Settings', 'wp-cloudflare-dashboard' ), 'manage_options', - 'wp-cloudflare-dashboard-options', + $this->key, array( $this, 'options_page_display' ) ); @@ -143,125 +134,12 @@ public function options_page_display() { ?>

    -

    To get your API Key, login to your Cloudflare Account and use your Global API Key.


    +

    To get your API Key, login to your Cloudflare Account and use your Global API Key.


    options_metabox_id, $this->key ); ?>
    -
    -

    -
    -
    -
    -
    - - plugin->cloudclient->wpcd_get_zones(); ?> - -
    -
    - - plugin->cloudclient->wpcd_get_zones(); ?> - -
    - -
    -
    - -
    - plugin->cloudclient->wpcd_get_requests( - isset( $_POST['zoneSelect'] ) ? $_POST['zoneSelect'] : $zones[0]['id'], - isset( $_POST['timeSelect'] ) ? $_POST['timeSelect'] : '1440' - ); - WPCD_Cloudclient::display_requests( $requests ); - ?> -
    -
    - plugin->cloudclient->wpcd_get_bandwidth( - isset( $_POST['zoneSelect'] ) ? $_POST['zoneSelect'] : $zones[0]['id'], - isset( $_POST['timeSelect'] ) ? $_POST['timeSelect'] : '1440' - ); - WPCD_Cloudclient::display_bandwidth( $requests ); - ?> -
    -
    - plugin->cloudclient->wpcd_get_visitors( - isset( $_POST['zoneSelect'] ) ? $_POST['zoneSelect'] : $zones[0]['id'], - isset( $_POST['timeSelect'] ) ? $_POST['timeSelect'] : '1440' - ); - WPCD_Cloudclient::display_visitors( $visitors ); - ?> -
    -
    - plugin->cloudclient->wpcd_get_threats( - isset( $_POST['zoneSelect'] ) ? $_POST['zoneSelect'] : $zones[0]['id'], - isset( $_POST['timeSelect'] ) ? $_POST['timeSelect'] : '1440' - ); - WPCD_Cloudclient::display_threats( $threats ); - ?> -
    -
    - plugin->cloudclient->wpcd_get_ssl( - isset( $_POST['zoneSelect'] ) ? $_POST['zoneSelect'] : $zones[0]['id'], - isset( $_POST['timeSelect'] ) ? $_POST['timeSelect'] : '1440' - ); - WPCD_Cloudclient::display_ssl( $requests ); - ?> -
    -
    -
    -
    - 'cloudflare_api_key', 'type' => 'text', 'default' => __( '', 'wpcd' ), - 'after' => '

    Make sure you save your credentials before testing

    ' + 'after' => '

    Make sure you save your credentials before testing

    ' ) ); } diff --git a/languages/wp-cloudflare-dashboard.pot b/languages/wp-cloudflare-dashboard.pot index 2291c9e..b898f74 100644 --- a/languages/wp-cloudflare-dashboard.pot +++ b/languages/wp-cloudflare-dashboard.pot @@ -1,730 +1,36 @@ -# Copyright (C) 2017 Tyler Kemme -# This file is distributed under the MIT. +# Copyright (C) 2017 wp-cloudflare-dashboard +# This file is distributed under the same license as the wp-cloudflare-dashboard package. msgid "" msgstr "" -"Project-Id-Version: WP Cloudflare Dashboard 0.3.2\n" -"Report-Msgid-Bugs-To: " -"https://wordpress.org/support/plugin/wp-cloudflare-dashboard\n" -"POT-Creation-Date: 2017-03-02 10:22:42+00:00\n" +"Project-Id-Version: wp-cloudflare-dashboard\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"X-Generator: grunt-wp-i18n1.0.0\n" +"Last-Translator: Tyler Kemme \n" +"Report-Msgid-Bugs-To: https://tylerkemme.com\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPathExcluded-0: *.js\n" +"X-Poedit-SourceCharset: UTF-8\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: includes/class-options.php:81 -msgid "Cloudflare Dashboard" -msgstr "" - -#: includes/class-options.php:124 -msgid "Cloudflare Dashboard Settings" -msgstr "" - -#: includes/class-options.php:125 -msgid "Settings" -msgstr "" - -#: includes/class-options.php:289 -msgid "Cloudflare Email Address" -msgstr "" - -#: includes/class-options.php:290 -msgid "Email address associated with your Cloudflare account." -msgstr "" - -#: includes/class-options.php:298 -msgid "Cloudflare API Key" -msgstr "" - -#: includes/class-options.php:299 -msgid "Global API Key associated with your Cloudflare account." -msgstr "" - -#: includes/class-options.php:321 -msgid "Settings updated." -msgstr "" - -#: vendor/cmb2/example-functions.php:117 -msgid "Test Metabox" -msgstr "" - -#: vendor/cmb2/example-functions.php:130 vendor/cmb2/example-functions.php:452 -msgid "Test Text" -msgstr "" - -#: vendor/cmb2/example-functions.php:131 vendor/cmb2/example-functions.php:144 -#: vendor/cmb2/example-functions.php:157 vendor/cmb2/example-functions.php:164 -#: vendor/cmb2/example-functions.php:177 vendor/cmb2/example-functions.php:185 -#: vendor/cmb2/example-functions.php:194 vendor/cmb2/example-functions.php:202 -#: vendor/cmb2/example-functions.php:217 vendor/cmb2/example-functions.php:225 -#: vendor/cmb2/example-functions.php:233 vendor/cmb2/example-functions.php:250 -#: vendor/cmb2/example-functions.php:259 vendor/cmb2/example-functions.php:272 -#: vendor/cmb2/example-functions.php:279 vendor/cmb2/example-functions.php:286 -#: vendor/cmb2/example-functions.php:300 vendor/cmb2/example-functions.php:313 -#: vendor/cmb2/example-functions.php:326 vendor/cmb2/example-functions.php:338 -#: vendor/cmb2/example-functions.php:347 vendor/cmb2/example-functions.php:355 -#: vendor/cmb2/example-functions.php:364 vendor/cmb2/example-functions.php:371 -#: vendor/cmb2/example-functions.php:385 vendor/cmb2/example-functions.php:453 -#: vendor/cmb2/example-functions.php:544 vendor/cmb2/example-functions.php:552 -#: vendor/cmb2/example-functions.php:559 vendor/cmb2/example-functions.php:566 -#: vendor/cmb2/example-functions.php:573 vendor/cmb2/example-functions.php:580 -#: vendor/cmb2/example-functions.php:587 vendor/cmb2/example-functions.php:614 -#: vendor/cmb2/example-functions.php:622 vendor/cmb2/example-functions.php:629 -#: vendor/cmb2/example-functions.php:666 -msgid "field description (optional)" -msgstr "" - -#: vendor/cmb2/example-functions.php:143 -msgid "Test Text Small" -msgstr "" - -#: vendor/cmb2/example-functions.php:156 -msgid "Test Text Medium" -msgstr "" - -#: vendor/cmb2/example-functions.php:163 -msgid "Read-only Disabled Field" -msgstr "" - -#: vendor/cmb2/example-functions.php:167 -msgid "Hey there, I'm a read-only field" -msgstr "" - -#: vendor/cmb2/example-functions.php:176 -msgid "Custom Rendered Field" -msgstr "" - -#: vendor/cmb2/example-functions.php:184 -msgid "Website URL" -msgstr "" - -#: vendor/cmb2/example-functions.php:193 -msgid "Test Text Email" -msgstr "" - -#: vendor/cmb2/example-functions.php:201 -msgid "Test Time" -msgstr "" - -#: vendor/cmb2/example-functions.php:209 vendor/cmb2/example-functions.php:210 -msgid "Time zone" -msgstr "" - -#: vendor/cmb2/example-functions.php:216 -msgid "Test Date Picker" -msgstr "" - -#: vendor/cmb2/example-functions.php:224 -msgid "Test Date Picker (UNIX timestamp)" -msgstr "" - -#: vendor/cmb2/example-functions.php:232 -msgid "Test Date/Time Picker Combo (UNIX timestamp)" -msgstr "" - -#: vendor/cmb2/example-functions.php:249 -msgid "Test Money" -msgstr "" - -#: vendor/cmb2/example-functions.php:258 -msgid "Test Color Picker" -msgstr "" - -#: vendor/cmb2/example-functions.php:271 -msgid "Test Text Area" -msgstr "" - -#: vendor/cmb2/example-functions.php:278 -msgid "Test Text Area Small" -msgstr "" - -#: vendor/cmb2/example-functions.php:285 -msgid "Test Text Area for Code" -msgstr "" - -#: vendor/cmb2/example-functions.php:292 -msgid "Test Title Weeeee" -msgstr "" - -#: vendor/cmb2/example-functions.php:293 -msgid "This is a title description" -msgstr "" - -#: vendor/cmb2/example-functions.php:299 -msgid "Test Select" -msgstr "" - -#: vendor/cmb2/example-functions.php:305 vendor/cmb2/example-functions.php:318 -#: vendor/cmb2/example-functions.php:330 -msgid "Option One" -msgstr "" - -#: vendor/cmb2/example-functions.php:306 vendor/cmb2/example-functions.php:319 -#: vendor/cmb2/example-functions.php:331 -msgid "Option Two" -msgstr "" - -#: vendor/cmb2/example-functions.php:307 vendor/cmb2/example-functions.php:320 -#: vendor/cmb2/example-functions.php:332 -msgid "Option Three" -msgstr "" - -#: vendor/cmb2/example-functions.php:312 -msgid "Test Radio inline" -msgstr "" - -#: vendor/cmb2/example-functions.php:325 -msgid "Test Radio" -msgstr "" - -#: vendor/cmb2/example-functions.php:337 -msgid "Test Taxonomy Radio" -msgstr "" - -#: vendor/cmb2/example-functions.php:346 -msgid "Test Taxonomy Select" -msgstr "" - -#: vendor/cmb2/example-functions.php:354 -msgid "Test Taxonomy Multi Checkbox" -msgstr "" - -#: vendor/cmb2/example-functions.php:363 -msgid "Test Checkbox" -msgstr "" - -#: vendor/cmb2/example-functions.php:370 -msgid "Test Multi Checkbox" -msgstr "" - -#: vendor/cmb2/example-functions.php:376 -msgid "Check One" -msgstr "" - -#: vendor/cmb2/example-functions.php:377 -msgid "Check Two" -msgstr "" - -#: vendor/cmb2/example-functions.php:378 -msgid "Check Three" -msgstr "" - -#: vendor/cmb2/example-functions.php:384 -msgid "Test wysiwyg" -msgstr "" - -#: vendor/cmb2/example-functions.php:392 -msgid "Test Image" -msgstr "" - -#: vendor/cmb2/example-functions.php:393 -msgid "Upload an image or enter a URL." -msgstr "" - -#: vendor/cmb2/example-functions.php:399 -msgid "Multiple Files" -msgstr "" - -#: vendor/cmb2/example-functions.php:400 -msgid "Upload or add multiple images/attachments." -msgstr "" - -#: vendor/cmb2/example-functions.php:407 -msgid "oEmbed" -msgstr "" - -#: vendor/cmb2/example-functions.php:410 -#. translators: %s: link to codex.wordpress.org/Embeds -msgid "Enter a youtube, twitter, or instagram URL. Supports services listed at %s." -msgstr "" - -#: vendor/cmb2/example-functions.php:443 -msgid "About Page Metabox" -msgstr "" - -#: vendor/cmb2/example-functions.php:472 -msgid "Repeating Field Group" -msgstr "" - -#: vendor/cmb2/example-functions.php:480 -msgid "Generates reusable form entries" -msgstr "" - -#: vendor/cmb2/example-functions.php:482 -msgid "Entry {#}" -msgstr "" - -#: vendor/cmb2/example-functions.php:483 -msgid "Add Another Entry" -msgstr "" - -#: vendor/cmb2/example-functions.php:484 -msgid "Remove Entry" -msgstr "" - -#: vendor/cmb2/example-functions.php:497 -msgid "Entry Title" -msgstr "" - -#: vendor/cmb2/example-functions.php:504 -msgid "Description" -msgstr "" - -#: vendor/cmb2/example-functions.php:505 -msgid "Write a short description for this entry" -msgstr "" - -#: vendor/cmb2/example-functions.php:511 -msgid "Entry Image" -msgstr "" - -#: vendor/cmb2/example-functions.php:517 -msgid "Image Caption" -msgstr "" - -#: vendor/cmb2/example-functions.php:536 -msgid "User Profile Metabox" -msgstr "" - -#: vendor/cmb2/example-functions.php:543 vendor/cmb2/example-functions.php:613 -msgid "Extra Info" -msgstr "" - -#: vendor/cmb2/example-functions.php:551 -msgid "Avatar" -msgstr "" - -#: vendor/cmb2/example-functions.php:558 -msgid "Facebook URL" -msgstr "" - -#: vendor/cmb2/example-functions.php:565 -msgid "Twitter URL" -msgstr "" - -#: vendor/cmb2/example-functions.php:572 -msgid "Google+ URL" -msgstr "" - -#: vendor/cmb2/example-functions.php:579 -msgid "Linkedin URL" -msgstr "" - -#: vendor/cmb2/example-functions.php:586 -msgid "User Field" -msgstr "" - -#: vendor/cmb2/example-functions.php:606 -msgid "Category Metabox" -msgstr "" - -#: vendor/cmb2/example-functions.php:621 -msgid "Term Image" -msgstr "" - -#: vendor/cmb2/example-functions.php:628 -msgid "Arbitrary Term Field" -msgstr "" - -#: vendor/cmb2/example-functions.php:650 -msgid "Theme Options Metabox" -msgstr "" - -#: vendor/cmb2/example-functions.php:665 -msgid "Site Background Color" -msgstr "" - -#: vendor/cmb2/example-functions.php:701 -msgid "REST Test Box" -msgstr "" - -#: vendor/cmb2/example-functions.php:710 -msgid "REST Test Text" -msgstr "" - -#: vendor/cmb2/example-functions.php:711 -msgid "Will show in the REST API for this box and for pages." -msgstr "" - -#: vendor/cmb2/example-functions.php:717 -msgid "REST Editable Test Text" -msgstr "" - -#: vendor/cmb2/example-functions.php:718 -msgid "Will show in REST API \"editable\" contexts only (`POST` requests)." -msgstr "" - -#: vendor/cmb2/includes/CMB2.php:127 -msgid "Metabox configuration is required to have an ID parameter." +#: wp-cloudflare-dashboard.php:292 +msgid "WP Cloudflare Dashboard is missing requirements and has been deactivated. Please make sure all requirements are available." msgstr "" -#: vendor/cmb2/includes/CMB2.php:470 -msgid "Click to toggle" -msgstr "" - -#: vendor/cmb2/includes/CMB2_Ajax.php:71 -msgid "Please Try Again" -msgstr "" - -#: vendor/cmb2/includes/CMB2_Ajax.php:173 -msgid "Remove Embed" -msgstr "" - -#: vendor/cmb2/includes/CMB2_Ajax.php:181 -#: vendor/cmb2/includes/helper-functions.php:99 -#. translators: 1: results for. 2: link to codex.wordpress.org/Embeds -msgid "No oEmbed Results Found for %1$s. View more info at %2$s." -msgstr "" - -#: vendor/cmb2/includes/CMB2_Base.php:389 -msgid "" -"The \"%s\" field parameter has been deprecated in favor of the \"%s\" " -"parameter." -msgstr "" - -#: vendor/cmb2/includes/CMB2_Base.php:393 -msgid "" -"Using the \"%s\" field parameter as a callback has been deprecated in favor " -"of the \"%s\" parameter." -msgstr "" - -#: vendor/cmb2/includes/CMB2_Base.php:423 -msgid "" -"%1$s was called with a parameter that is deprecated since " -"version %2$s! %3$s" -msgstr "" - -#: vendor/cmb2/includes/CMB2_Base.php:426 -msgid "" -"%1$s was called with a parameter that is deprecated since " -"version %2$s with no alternative available." -msgstr "" - -#: vendor/cmb2/includes/CMB2_Base.php:459 -#: vendor/cmb2/includes/types/CMB2_Type_Base.php:138 -msgid "Invalid %1$s property: %2$s" -msgstr "" - -#: vendor/cmb2/includes/CMB2_Base.php:473 -#: vendor/cmb2/includes/types/CMB2_Type_Base.php:123 -msgid "Invalid %1$s method: %2$s" -msgstr "" - -#: vendor/cmb2/includes/CMB2_Field.php:1118 -msgid "Add Group" -msgstr "" - -#: vendor/cmb2/includes/CMB2_Field.php:1119 -msgid "Remove Group" -msgstr "" - -#: vendor/cmb2/includes/CMB2_Field.php:1141 -#: vendor/cmb2/includes/CMB2_Field.php:1145 -msgid "None" -msgstr "" - -#: vendor/cmb2/includes/CMB2_Field.php:1206 -msgid "Sorry, this field does not have a cmb_id specified." -msgstr "" - -#: vendor/cmb2/includes/CMB2_Field_Display.php:409 -#: vendor/cmb2/includes/CMB2_JS.php:158 -#: vendor/cmb2/includes/types/CMB2_Type_File_Base.php:75 -msgid "File:" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:99 vendor/cmb2/includes/CMB2_JS.php:138 -msgid "Clear" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:100 -msgid "Default" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:101 -msgid "Select Color" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:102 -msgid "Current Color" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:129 -msgid "Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:130 -msgid "Su, Mo, Tu, We, Th, Fr, Sa" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:131 -msgid "Sun, Mon, Tue, Wed, Thu, Fri, Sat" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:132 -msgid "" -"January, February, March, April, May, June, July, August, September, " -"October, November, December" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:133 -msgid "Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:134 -msgid "Next" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:135 -msgid "Prev" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:136 -msgid "Today" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:137 vendor/cmb2/includes/CMB2_JS.php:147 -msgid "Done" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:141 -msgid "Choose Time" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:142 -msgid "Time" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:143 -msgid "Hour" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:144 -msgid "Minute" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:145 -msgid "Second" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:146 -msgid "Now" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:154 -msgid "Use this file" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:155 -msgid "Use these files" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:156 -#: vendor/cmb2/includes/types/CMB2_Type_File_Base.php:61 -msgid "Remove Image" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:157 vendor/cmb2/includes/CMB2_Types.php:392 -#: vendor/cmb2/includes/types/CMB2_Type_File_Base.php:80 -msgid "Remove" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:159 -#: vendor/cmb2/includes/types/CMB2_Type_File_Base.php:78 -msgid "Download" -msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:160 -msgid "Select / Deselect All" -msgstr "" - -#: vendor/cmb2/includes/CMB2_Types.php:220 -msgid "Custom CMB2 field type classes must extend CMB2_Type_Base." -msgstr "" - -#: vendor/cmb2/includes/CMB2_Types.php:329 -msgid "Add Row" -msgstr "" - -#: vendor/cmb2/includes/CMB2_hookup.php:148 -msgid "" -"Term Metadata is a WordPress 4.4+ feature. Please upgrade your WordPress " -"install." -msgstr "" - -#: vendor/cmb2/includes/CMB2_hookup.php:152 -msgid "Term metaboxes configuration requires a \"taxonomies\" parameter." -msgstr "" - -#: vendor/cmb2/includes/CMB2_hookup.php:389 -msgid "Toggle panel: %s" -msgstr "" - -#: vendor/cmb2/includes/helper-functions.php:287 -msgid "Save" -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller.php:250 -msgid "This box does not have read permissions." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller.php:268 -msgid "This box does not have write permissions." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller.php:289 -msgid "" -"No box found by that id. A box needs to be registered with the " -"\"show_in_rest\" parameter configured." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller.php:365 -msgid "A human-readable description of the object." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller.php:370 -msgid "The id for the object." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller.php:375 -msgid "The title for the object." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:50 -msgid "Includes the registered fields for the box in the response." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:72 -msgid "" -"Includes the fully rendered attributes, 'form_open', 'form_close', as well " -"as the enqueued 'js_dependencies' script handles, and 'css_dependencies' " -"stylesheet handles." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:122 -msgid "No boxes found." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:27 -msgid "Includes the box object which the fields are registered to in the response." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:30 -msgid "" -"When the '_rendered' argument is passed, the renderable field attributes " -"will be returned fully rendered. By default, the names of the callback " -"handers for the renderable attributes will be returned." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:33 -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:36 -msgid "" -"To view or modify the field's value, the 'object_id' and 'object_type' " -"arguments are required." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:236 -msgid "CMB2 Field value cannot be updated without the value parameter specified." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:295 -msgid "" -"CMB2 Field value cannot be modified without the object_id and object_type " -"parameters specified." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:308 -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:335 -msgid "No field found by that id." -msgstr "" - -#: vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:407 -msgid "Value Error for %s" -msgstr "" - -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:24 -msgid "The register_routes() method must be overriden" -msgstr "" - -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:34 -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:44 -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:54 -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:64 -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:74 -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:84 -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:94 -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:104 -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:114 -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:124 -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:134 -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:145 -msgid "Method '%s' not implemented. Must be over-ridden in subclass." -msgstr "" - -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:248 -msgid "Current page of the collection." -msgstr "" - -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:256 -msgid "Maximum number of items to be returned in result set." -msgstr "" - -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:265 -msgid "Limit results to those matching a string." -msgstr "" - -#: vendor/cmb2/includes/shim/WP_REST_Controller.php:283 -msgid "" -"Scope under which the request is made; determines fields present in " -"response." -msgstr "" - -#: vendor/cmb2/includes/types/CMB2_Type_File.php:40 -msgid "Add or Upload File" -msgstr "" - -#: vendor/cmb2/includes/types/CMB2_Type_File_List.php:39 -msgid "Add or Upload Files" -msgstr "" - -#: vendor/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:27 -#: vendor/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:25 -msgid "No terms" -msgstr "" - -#: wp-cloudflare-dashboard.php:282 -msgid "" -"WP Cloudflare Dashboard is missing requirements and has been deactivated. Please make sure all requirements are " -"available." -msgstr "" - -#. Plugin Name of the plugin/theme -msgid "WP Cloudflare Dashboard" -msgstr "" - -#. Author URI of the plugin/theme -msgid "https://tylerkemme.com" +#: includes/class-options.php:73, includes/class-options.php:107 +msgid "Cloudflare Dashboard" msgstr "" -#. Description of the plugin/theme -msgid "A Cloudflare Analytics Dashboard for Wordpress." +#: includes/class-options.php:106 +msgid "Cloudflare Dashboard Analytics" msgstr "" -#. Author of the plugin/theme -msgid "Tyler Kemme" +#: includes/class-options.php:115 +msgid "Cloudflare Dashboard Settings" msgstr "" -#: vendor/cmb2/includes/CMB2_JS.php:128 -msgctxt "Valid formatDate string for jquery-ui datepicker" -msgid "mm/dd/yy" +#: includes/class-options.php:116 +msgid "Settings" msgstr "" - -#: vendor/cmb2/includes/CMB2_JS.php:148 -msgctxt "" -"Valid formatting string, as per " -"http://trentrichardson.com/examples/timepicker/" -msgid "hh:mm TT" -msgstr "" \ No newline at end of file diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index e440c9f..cb27ec1 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -6,7 +6,9 @@ $baseDir = dirname($vendorDir); return array( + 'WPCD_Analytics' => $baseDir . '/includes/class-analytics.php', 'WPCD_Assets' => $baseDir . '/includes/class-assets.php', + 'WPCD_Charts' => $baseDir . '/includes/class-charts.php', 'WPCD_Cloudclient' => $baseDir . '/includes/class-cloudclient.php', 'WPCD_Options' => $baseDir . '/includes/class-options.php', 'WP_Cloudflare_Dashboard' => $baseDir . '/wp-cloudflare-dashboard.php', diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php deleted file mode 100644 index 5a823ee..0000000 --- a/vendor/composer/autoload_files.php +++ /dev/null @@ -1,12 +0,0 @@ - $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', - 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', -); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 3c4508c..b265c64 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,8 +6,4 @@ $baseDir = dirname($vendorDir); return array( - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), - 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), - 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), - 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index a1f287e..3abf9aa 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -47,24 +47,6 @@ public static function getLoader() $loader->register(true); - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit00ab720335e10d22966530f1721378ee::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire00ab720335e10d22966530f1721378ee($fileIdentifier, $file); - } - return $loader; } } - -function composerRequire00ab720335e10d22966530f1721378ee($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - } -} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 0ee01d0..b16f1a1 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -6,44 +6,6 @@ class ComposerStaticInit00ab720335e10d22966530f1721378ee { - public static $files = array ( - 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', - 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', - ); - - public static $prefixLengthsPsr4 = array ( - 'P' => - array ( - 'Psr\\Http\\Message\\' => 17, - ), - 'G' => - array ( - 'GuzzleHttp\\Psr7\\' => 16, - 'GuzzleHttp\\Promise\\' => 19, - 'GuzzleHttp\\' => 11, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Psr\\Http\\Message\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/http-message/src', - ), - 'GuzzleHttp\\Psr7\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', - ), - 'GuzzleHttp\\Promise\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', - ), - 'GuzzleHttp\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', - ), - ); - public static $prefixesPsr0 = array ( 'C' => array ( @@ -55,7 +17,9 @@ class ComposerStaticInit00ab720335e10d22966530f1721378ee ); public static $classMap = array ( + 'WPCD_Analytics' => __DIR__ . '/../..' . '/includes/class-analytics.php', 'WPCD_Assets' => __DIR__ . '/../..' . '/includes/class-assets.php', + 'WPCD_Charts' => __DIR__ . '/../..' . '/includes/class-charts.php', 'WPCD_Cloudclient' => __DIR__ . '/../..' . '/includes/class-cloudclient.php', 'WPCD_Options' => __DIR__ . '/../..' . '/includes/class-options.php', 'WP_Cloudflare_Dashboard' => __DIR__ . '/../..' . '/wp-cloudflare-dashboard.php', @@ -64,8 +28,6 @@ class ComposerStaticInit00ab720335e10d22966530f1721378ee public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit00ab720335e10d22966530f1721378ee::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit00ab720335e10d22966530f1721378ee::$prefixDirsPsr4; $loader->prefixesPsr0 = ComposerStaticInit00ab720335e10d22966530f1721378ee::$prefixesPsr0; $loader->classMap = ComposerStaticInit00ab720335e10d22966530f1721378ee::$classMap; diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 01cb72f..39b14dd 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -74,257 +74,18 @@ "zend" ] }, - { - "name": "psr/http-message", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-08-06T14:39:51+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ] - }, - { - "name": "guzzlehttp/psr7", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/0d6c7ca039329247e4f0f8f8f6506810e8248855", - "reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2017-02-27T10:51:17+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "request", - "response", - "stream", - "uri", - "url" - ] - }, - { - "name": "guzzlehttp/promises", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "time": "2016-12-20T10:07:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ] - }, - { - "name": "guzzlehttp/guzzle", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "2297b43ad7c07a6b70a54c19e3fdd27ddd266d0b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/2297b43ad7c07a6b70a54c19e3fdd27ddd266d0b", - "reference": "2297b43ad7c07a6b70a54c19e3fdd27ddd266d0b", - "shasum": "" - }, - "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.0", - "psr/log": "^1.0" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" - }, - "time": "2017-02-28T22:51:22+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "installation-source": "source", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ] - }, { "name": "webdevstudios/cmb2", "version": "v2.2.4", "version_normalized": "2.2.4.0", "source": { "type": "git", - "url": "https://github.com/WebDevStudios/CMB2.git", + "url": "https://github.com/CMB2/CMB2.git", "reference": "badecc7f908781ac14b879c74526f9d055f4a41e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WebDevStudios/CMB2/zipball/badecc7f908781ac14b879c74526f9d055f4a41e", + "url": "https://api.github.com/repos/CMB2/CMB2/zipball/badecc7f908781ac14b879c74526f9d055f4a41e", "reference": "badecc7f908781ac14b879c74526f9d055f4a41e", "shasum": "" }, diff --git a/vendor/guzzlehttp/guzzle b/vendor/guzzlehttp/guzzle deleted file mode 160000 index 2297b43..0000000 --- a/vendor/guzzlehttp/guzzle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2297b43ad7c07a6b70a54c19e3fdd27ddd266d0b diff --git a/vendor/guzzlehttp/promises b/vendor/guzzlehttp/promises deleted file mode 160000 index a59da6c..0000000 --- a/vendor/guzzlehttp/promises +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a59da6cf61d80060647ff4d3eb2c03a2bc694646 diff --git a/vendor/guzzlehttp/psr7 b/vendor/guzzlehttp/psr7 deleted file mode 160000 index 0d6c7ca..0000000 --- a/vendor/guzzlehttp/psr7 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0d6c7ca039329247e4f0f8f8f6506810e8248855 diff --git a/vendor/psr/http-message b/vendor/psr/http-message deleted file mode 160000 index f6561bf..0000000 --- a/vendor/psr/http-message +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f6561bf28d520154e4b0ec72be95418abe6d9363 diff --git a/wp-cloudflare-dashboard.php b/wp-cloudflare-dashboard.php index 272a327..f299412 100644 --- a/wp-cloudflare-dashboard.php +++ b/wp-cloudflare-dashboard.php @@ -3,7 +3,7 @@ * Plugin Name: WP Cloudflare Dashboard * Plugin URI: https://tylerkemme.com * Description: A Cloudflare Analytics Dashboard for Wordpress. - * Version: 0.3.3 + * WPCD_VERSION: 0.3.3 * Author: Tyler Kemme * Author URI: https://tylerkemme.com * Donate link: https://tylerkemme.com @@ -14,15 +14,15 @@ * @link https://tylerkemme.com * * @package WP Cloudflare Dashboard - * @version 0.3.3 + * @WPCD_VERSION 0.3.3 */ /** * Copyright (c) 2017 Tyler Kemme (email : tylerkemme@gmail.com) * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2 or, at - * your discretion, any later version, as published by the Free + * it under the terms of the GNU General Public License, WPCD_VERSION 2 or, at + * your discretion, any later WPCD_VERSION, as published by the Free * Software Foundation. * * This program is distributed in the hope that it will be useful, @@ -45,23 +45,23 @@ /** * Main initiation class * - * @since 0.0.0 + * @since 0.3.3 */ final class WP_Cloudflare_Dashboard { /** - * Current version + * Current WPCD_VERSION * * @var string - * @since 0.0.0 + * @since 0.3.3 */ - const VERSION = '0.3.3'; + const WPCD_VERSION = '0.3.4'; /** * URL of plugin directory * * @var string - * @since 0.0.0 + * @since 0.3.3 */ protected $url = ''; @@ -69,7 +69,7 @@ final class WP_Cloudflare_Dashboard { * Path of plugin directory * * @var string - * @since 0.0.0 + * @since 0.3.3 */ protected $path = ''; @@ -77,7 +77,7 @@ final class WP_Cloudflare_Dashboard { * Plugin basename * * @var string - * @since 0.0.0 + * @since 0.3.3 */ protected $basename = ''; @@ -85,7 +85,7 @@ final class WP_Cloudflare_Dashboard { * Detailed activation error messages * * @var array - * @since 0.0.0 + * @since 0.3.3 */ protected $activation_errors = array(); @@ -93,14 +93,14 @@ final class WP_Cloudflare_Dashboard { * Singleton instance of plugin * * @var WP_Cloudflare_Dashboard - * @since 0.0.0 + * @since 0.3.3 */ protected static $single_instance = null; /** * Instance of WPCD_Options * - * @since0.0.0 + * @since 0.0.0 * @var WPCD_Options */ protected $options; @@ -108,7 +108,7 @@ final class WP_Cloudflare_Dashboard { /** * Instance of WPCD_Cloudclient * - * @since0.1.0 + * @since 0.1.0 * @var WPCD_Cloudclient */ protected $cloudclient; @@ -116,7 +116,7 @@ final class WP_Cloudflare_Dashboard { /** * Instance of WPCD_Assets * - * @since0.1.0 + * @since 0.1.0 * @var WPCD_Assets */ protected $assets; @@ -124,15 +124,23 @@ final class WP_Cloudflare_Dashboard { /** * Instance of WPCD_Analytics * - * @since0.2.0 + * @since 0.3.3 * @var WPCD_Analytics */ protected $analytics; + /** + * Instance of WPCD_Charts + * + * @since 0.3.3 + * @var WPCD_Charts + */ + protected $charts; + /** * Creates or returns an instance of this class. * - * @since 0.0.0 + * @since 0.3.3 * @return WP_Cloudflare_Dashboard A single instance of this class. */ public static function get_instance() { @@ -146,7 +154,7 @@ public static function get_instance() { /** * Sets up our plugin * - * @since 0.0.0 + * @since 0.3.3 */ protected function __construct() { $this->basename = plugin_basename( __FILE__ ); @@ -157,20 +165,22 @@ protected function __construct() { /** * Attach other plugin classes to the base plugin class. * - * @since 0.0.0 + * @since 0.3.3 * @return void */ public function plugin_classes() { // Attach other plugin classes to the base plugin class. $this->options = new WPCD_Options( $this ); + $this->analytics = new WPCD_Analytics( $this ); $this->cloudclient = new WPCD_Cloudclient( $this ); + $this->charts = new WPCD_Charts( $this ); $this->assets = new WPCD_Assets( $this ); } // END OF PLUGIN CLASSES FUNCTION /** * Add hooks and filters * - * @since 0.0.0 + * @since 0.3.3 * @return void */ public function hooks() { @@ -184,7 +194,7 @@ public function hooks() { /** * Activate the plugin * - * @since 0.0.0 + * @since 0.3.3 * @return void */ public function _activate() { @@ -196,7 +206,7 @@ public function _activate() { * Deactivate the plugin * Uninstall routines should be in uninstall.php * - * @since 0.0.0 + * @since 0.3.3 * @return void */ public function _deactivate() {} @@ -204,7 +214,7 @@ public function _deactivate() {} /** * Init hooks * - * @since 0.0.0 + * @since 0.3.3 * @return void */ public function init() { @@ -224,7 +234,7 @@ public function init() { * Check if the plugin meets requirements and * disable it if they are not present. * - * @since 0.0.0 + * @since 0.3.3 * @return boolean result of meets_requirements */ public function check_requirements() { @@ -245,7 +255,7 @@ public function check_requirements() { /** * Deactivates this plugin, hook this function on admin_init. * - * @since 0.0.0 + * @since 0.3.3 * @return void */ public function deactivate_me() { @@ -259,7 +269,7 @@ public function deactivate_me() { /** * Check that all plugin requirements are met * - * @since 0.0.0 + * @since 0.3.3 * @return boolean True if requirements are met. */ public function meets_requirements() { @@ -273,7 +283,7 @@ public function meets_requirements() { /** * Adds a notice to the dashboard if the plugin requirements are not met * - * @since 0.0.0 + * @since 0.3.3 * @return void */ public function requirements_not_met_notice() { @@ -303,7 +313,7 @@ public function requirements_not_met_notice() { /** * Magic getter for our object. * - * @since 0.0.0 + * @since 0.3.3 * @param string $field Field to get. * @throws Exception Throws an exception if the field is invalid. * @return mixed @@ -311,12 +321,14 @@ public function requirements_not_met_notice() { public function __get( $field ) { switch ( $field ) { case 'version': - return self::VERSION; + return self::WPCD_VERSION; case 'basename': case 'url': case 'path': case 'options': + case 'analytics': case 'cloudclient': + case 'charts': case 'assets': return $this->$field; default: @@ -329,7 +341,7 @@ public function __get( $field ) { * Grab the WP_Cloudflare_Dashboard object and return it. * Wrapper for WP_Cloudflare_Dashboard::get_instance() * - * @since 0.0.0 + * @since 0.3.3 * @return WP_Cloudflare_Dashboard Singleton instance of plugin class. */ function wpcd() {