├── classes ├── static │ ├── loading.gif │ ├── toolbar.min.js │ ├── toolbar.js │ ├── toolbar.min.css │ ├── exit-survey │ │ ├── exit-survey.css │ │ └── exit-survey.js │ └── toolbar.css ├── external │ ├── do_not_donate_smallest.png │ ├── php │ │ ├── plugin-update-checker │ │ │ ├── Puc │ │ │ │ ├── v4 │ │ │ │ │ └── Factory.php │ │ │ │ └── v4p9 │ │ │ │ │ ├── DebugBar │ │ │ │ │ ├── ThemePanel.php │ │ │ │ │ ├── PluginPanel.php │ │ │ │ │ ├── PluginExtension.php │ │ │ │ │ └── Panel.php │ │ │ │ │ ├── Vcs │ │ │ │ │ ├── BaseChecker.php │ │ │ │ │ ├── Reference.php │ │ │ │ │ └── ThemeUpdateChecker.php │ │ │ │ │ ├── Update.php │ │ │ │ │ ├── Autoloader.php │ │ │ │ │ ├── Theme │ │ │ │ │ ├── Package.php │ │ │ │ │ ├── Update.php │ │ │ │ │ └── UpdateChecker.php │ │ │ │ │ ├── Utils.php │ │ │ │ │ ├── OAuthSignature.php │ │ │ │ │ ├── InstalledPackage.php │ │ │ │ │ ├── Plugin │ │ │ │ │ ├── Update.php │ │ │ │ │ └── Info.php │ │ │ │ │ ├── Metadata.php │ │ │ │ │ └── StateStore.php │ │ │ ├── languages │ │ │ │ ├── plugin-update-checker-ca.mo │ │ │ │ ├── plugin-update-checker-ja.mo │ │ │ │ ├── plugin-update-checker-cs_CZ.mo │ │ │ │ ├── plugin-update-checker-da_DK.mo │ │ │ │ ├── plugin-update-checker-de_DE.mo │ │ │ │ ├── plugin-update-checker-es_ES.mo │ │ │ │ ├── plugin-update-checker-fa_IR.mo │ │ │ │ ├── plugin-update-checker-fr_CA.mo │ │ │ │ ├── plugin-update-checker-fr_FR.mo │ │ │ │ ├── plugin-update-checker-hu_HU.mo │ │ │ │ ├── plugin-update-checker-it_IT.mo │ │ │ │ ├── plugin-update-checker-nl_BE.mo │ │ │ │ ├── plugin-update-checker-nl_NL.mo │ │ │ │ ├── plugin-update-checker-pt_BR.mo │ │ │ │ ├── plugin-update-checker-sl_SI.mo │ │ │ │ ├── plugin-update-checker-sv_SE.mo │ │ │ │ ├── plugin-update-checker-de_DE.po │ │ │ │ ├── plugin-update-checker-it_IT.po │ │ │ │ ├── plugin-update-checker-fa_IR.po │ │ │ │ ├── plugin-update-checker-hu_HU.po │ │ │ │ ├── plugin-update-checker-sv_SE.po │ │ │ │ ├── plugin-update-checker-da_DK.po │ │ │ │ ├── plugin-update-checker.pot │ │ │ │ ├── plugin-update-checker-fr_FR.po │ │ │ │ ├── plugin-update-checker-cs_CZ.po │ │ │ │ ├── plugin-update-checker-ca.po │ │ │ │ ├── plugin-update-checker-es_ES.po │ │ │ │ ├── plugin-update-checker-fr_CA.po │ │ │ │ ├── plugin-update-checker-sl_SI.po │ │ │ │ ├── plugin-update-checker-nl_BE.po │ │ │ │ ├── plugin-update-checker-nl_NL.po │ │ │ │ ├── plugin-update-checker-pt_BR.po │ │ │ │ └── plugin-update-checker-ja.po │ │ │ ├── examples │ │ │ │ ├── theme.json │ │ │ │ └── plugin.json │ │ │ ├── plugin-update-checker.php │ │ │ ├── vendor │ │ │ │ └── Parsedown.php │ │ │ ├── .editorconfig │ │ │ ├── composer.json │ │ │ ├── license.txt │ │ │ ├── load-v4p9.php │ │ │ ├── css │ │ │ │ └── puc-debug-bar.css │ │ │ └── js │ │ │ │ └── debug-bar.js │ │ ├── index.html │ │ ├── yui-php-cssmin-bundled │ │ │ ├── index.html │ │ │ └── Utils.php │ │ └── persist-admin-notices-dismissal │ │ │ ├── dismiss-notice.js │ │ │ ├── persist-admin-notices-dismissal.php │ │ │ └── README.md │ ├── index.html │ └── js │ │ ├── index.html │ │ ├── unslider.css │ │ ├── jquery.cookie.min.js │ │ ├── unslider-dots.css │ │ ├── jquery.cookie.js │ │ └── unslider.min.js ├── critcss-inc │ ├── css │ │ ├── ao-tablesorter │ │ │ ├── asc.gif │ │ │ ├── bg.gif │ │ │ ├── desc.gif │ │ │ └── style.css │ │ └── admin_styles.css │ ├── js │ │ ├── admin_settings.js │ │ └── md5.min.js │ ├── admin_settings_impexp.js.php │ ├── admin_settings_debug.php │ ├── admin_settings_explain.php │ └── admin_settings_key.php ├── index.html ├── autoptimizeCLI.php ├── autoptimizeCSSmin.php ├── autoptimizeSpeedupper.php ├── autoptimizeHTML.php ├── autoptimizePartners.php └── autoptimizeCacheChecker.php ├── index.html ├── config ├── index.html ├── autoptimize_404_handler.php └── default.php ├── README.md ├── .github └── workflows │ └── plugin-check.yml ├── contributing.md ├── autoptimize.php └── autoptimize_helper.php_example /classes/static/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/static/loading.gif -------------------------------------------------------------------------------- /classes/external/do_not_donate_smallest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/do_not_donate_smallest.png -------------------------------------------------------------------------------- /classes/critcss-inc/css/ao-tablesorter/asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/critcss-inc/css/ao-tablesorter/asc.gif -------------------------------------------------------------------------------- /classes/critcss-inc/css/ao-tablesorter/bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/critcss-inc/css/ao-tablesorter/bg.gif -------------------------------------------------------------------------------- /classes/critcss-inc/css/ao-tablesorter/desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/critcss-inc/css/ao-tablesorter/desc.gif -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4/Factory.php: -------------------------------------------------------------------------------- 1 | Generated by Autoptimize -------------------------------------------------------------------------------- /classes/index.html: -------------------------------------------------------------------------------- 1 | Generated by Autoptimize -------------------------------------------------------------------------------- /config/index.html: -------------------------------------------------------------------------------- 1 | Generated by Autoptimize -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-ca.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-ca.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-ja.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-ja.mo -------------------------------------------------------------------------------- /classes/external/index.html: -------------------------------------------------------------------------------- 1 | Generated by Autoptimize 2 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-cs_CZ.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-cs_CZ.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-da_DK.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-da_DK.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-de_DE.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-de_DE.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-es_ES.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-es_ES.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-fa_IR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-fa_IR.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-fr_CA.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-fr_CA.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-fr_FR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-fr_FR.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-hu_HU.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-hu_HU.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-it_IT.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-it_IT.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-nl_BE.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-nl_BE.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-nl_NL.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-nl_NL.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-pt_BR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-pt_BR.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-sl_SI.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-sl_SI.mo -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-sv_SE.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/futtta/autoptimize/HEAD/classes/external/php/plugin-update-checker/languages/plugin-update-checker-sv_SE.mo -------------------------------------------------------------------------------- /classes/external/js/index.html: -------------------------------------------------------------------------------- 1 | Generated by Autoptimize 2 | -------------------------------------------------------------------------------- /classes/external/php/index.html: -------------------------------------------------------------------------------- 1 | Generated by Autoptimize 2 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/examples/theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "details_url": "http://example.com/version-2.0-details.html", 4 | "download_url": "http://example.com/example-theme-2.0.zip" 5 | } -------------------------------------------------------------------------------- /classes/external/php/yui-php-cssmin-bundled/index.html: -------------------------------------------------------------------------------- 1 | Generated by Autoptimize 2 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/plugin-update-checker.php: -------------------------------------------------------------------------------- 1 | =') ) { 5 | require __DIR__ . '/ParsedownModern.php'; 6 | } else { 7 | require __DIR__ . '/ParsedownLegacy.php'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset=utf-8 3 | end_of_line=lf 4 | insert_final_newline=false 5 | indent_style=tab 6 | tab_width=4 7 | 8 | [{phpunit.xml.dist,*.jhm,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.jrxml,*.xml,*.jnlp,*.wsdl}] 9 | indent_style=space 10 | indent_size=4 11 | 12 | [*.svg] 13 | indent_style=space 14 | indent_size=4 15 | 16 | -------------------------------------------------------------------------------- /classes/critcss-inc/js/admin_settings.js: -------------------------------------------------------------------------------- 1 | // Toggle button control for collapsible elements 2 | jQuery(".toggle-btn").click(function () { 3 | $header = jQuery(this); 4 | $content = $header.next(); 5 | $content.slideToggle(250, "swing", function () { 6 | jQuery("span.toggle-indicator", $header).toggleClass('dashicons-arrow-down'); 7 | }); 8 | }); 9 | 10 | // Attach an event to export buttons 11 | jQuery("#exportSettings").click(function(){exportSettings();}); -------------------------------------------------------------------------------- /classes/external/js/unslider.css: -------------------------------------------------------------------------------- 1 | .unslider{overflow:auto;margin:0;padding:0}.unslider-wrap{position:relative}.unslider-wrap.unslider-carousel>li{float:left}.unslider-vertical>ul{height:100%}.unslider-vertical li{float:none;width:100%}.unslider-fade{position:relative}.unslider-fade .unslider-wrap li{position:absolute;left:0;top:0;right:0;z-index:8}.unslider-fade .unslider-wrap li.unslider-active{z-index:10}.unslider li,.unslider ol,.unslider ul{list-style:none;margin:0;padding:0;border:none}.unslider-arrow{position:absolute;left:20px;z-index:2;cursor:pointer}.unslider-arrow.next{left:auto;right:20px} 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Autoptimize 2 | =========== 3 | 4 | The [official Autoptimize repo on GitHub can be found here](https://github.com/futtta/autoptimize/). 5 | 6 | ## Installing/running the tests 7 | * Install wp test suite by running `bin/install-wp-tests.sh` 8 | * Run `composer install` 9 | * Now you should be able to run either `composer test` or `phpunit` 10 | 11 | Have a read through `tests/test-ao.php` and `tests/bootstrap.php` if you'd like to know more. 12 | 13 | Ideally, this should be switched to a more modern setup using https://github.com/Brain-WP/BrainMonkey -- once the AO codebase allows for easier testing. One day, maybe. 14 | -------------------------------------------------------------------------------- /.github/workflows/plugin-check.yml: -------------------------------------------------------------------------------- 1 | name: 'Plugin Checker' 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - beta 7 | 8 | jobs: 9 | prepare: 10 | name: "Plugin Checker" 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - name: Checkout code 16 | uses: actions/checkout@v3 17 | 18 | - name: Run plugin check 19 | uses: wordpress/plugin-check-action@v1 20 | with: 21 | exclude-directories: 'vendor,classes/external' 22 | exclude-checks: | 23 | late_escaping 24 | plugin_review_phpcs 25 | file_type 26 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/DebugBar/ThemePanel.php: -------------------------------------------------------------------------------- 1 | row('Theme directory', htmlentities($this->updateChecker->directoryName)); 13 | parent::displayConfigHeader(); 14 | } 15 | 16 | protected function getUpdateFields() { 17 | return array_merge(parent::getUpdateFields(), array('details_url')); 18 | } 19 | } 20 | 21 | endif; 22 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/Vcs/BaseChecker.php: -------------------------------------------------------------------------------- 1 | 1&&(value===null||typeof value!=="object")){options=jQuery.extend({},options);if(value===null){options.expires=-1;}if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}return(document.cookie=[encodeURIComponent(key),'=',options.raw?String(value):encodeURIComponent(String(value)),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}options=value||{};var result,decode=options.raw?function(s){return s;}:decodeURIComponent;return(result=new RegExp('(?:^|; )'+encodeURIComponent(key)+'=([^;]*)').exec(document.cookie))?decode(result[1]):null;}; 2 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yahnis-elsts/plugin-update-checker", 3 | "type": "library", 4 | "description": "A custom update checker for WordPress plugins and themes. Useful if you can't host your plugin in the official WP repository but still want it to support automatic updates.", 5 | "keywords": ["wordpress", "plugin updates", "automatic updates", "theme updates"], 6 | "homepage": "https://github.com/YahnisElsts/plugin-update-checker/", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Yahnis Elsts", 11 | "email": "whiteshadow@w-shadow.com", 12 | "homepage": "http://w-shadow.com/", 13 | "role": "Developer" 14 | } 15 | ], 16 | "require": { 17 | "php": ">=5.2.0", 18 | "ext-json": "*" 19 | }, 20 | "autoload": { 21 | "files": ["load-v4p9.php"] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /classes/autoptimizeCLI.php: -------------------------------------------------------------------------------- 1 | slug = $this->slug; 27 | $update->new_version = $this->version; 28 | $update->package = $this->download_url; 29 | 30 | return $update; 31 | } 32 | } 33 | 34 | endif; 35 | -------------------------------------------------------------------------------- /classes/external/js/unslider-dots.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Here's where everything gets included. You don't need 3 | * to change anything here, and doing so might break 4 | * stuff. Here be dragons and all that. 5 | */ 6 | /** 7 | * Default variables 8 | * 9 | * While these can be set with JavaScript, it's probably 10 | * better and faster to just set them here, compile to 11 | * CSS and include that instead to use some of that 12 | * hardware-accelerated goodness. 13 | */ 14 | .unslider-nav ol { 15 | list-style: none; 16 | text-align: center; 17 | } 18 | .unslider-nav ol li { 19 | display: inline-block; 20 | width: 6px; 21 | height: 6px; 22 | margin: 0 4px; 23 | background: transparent; 24 | border-radius: 5px; 25 | overflow: hidden; 26 | text-indent: -999em; 27 | border: 2px solid #fff; 28 | cursor: pointer; 29 | } 30 | .unslider-nav ol li.unslider-active { 31 | background: #fff; 32 | cursor: default; 33 | } 34 | -------------------------------------------------------------------------------- /classes/external/php/persist-admin-notices-dismissal/dismiss-notice.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | //shorthand for ready event. 3 | $( 4 | function () { 5 | $( 'div[data-dismissible] button.notice-dismiss' ).on('click', 6 | function (event) { 7 | event.preventDefault(); 8 | var $this = $( this ); 9 | 10 | var attr_value, option_name, dismissible_length, data; 11 | 12 | attr_value = $this.parent().attr( 'data-dismissible' ).split( '-' ); 13 | 14 | // remove the dismissible length from the attribute value and rejoin the array. 15 | dismissible_length = attr_value.pop(); 16 | 17 | option_name = attr_value.join( '-' ); 18 | 19 | data = { 20 | 'action': 'dismiss_admin_notice', 21 | 'option_name': option_name, 22 | 'dismissible_length': dismissible_length, 23 | 'nonce': dismissible_notice.nonce 24 | }; 25 | 26 | // We can also pass the url value separately from ajaxurl for front end AJAX implementations 27 | $.post( ajaxurl, data ); 28 | } 29 | ); 30 | } 31 | ) 32 | 33 | }(jQuery)); 34 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Jānis Elsts 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/DebugBar/PluginPanel.php: -------------------------------------------------------------------------------- 1 | row('Plugin file', htmlentities($this->updateChecker->pluginFile)); 13 | parent::displayConfigHeader(); 14 | } 15 | 16 | protected function getMetadataButton() { 17 | $requestInfoButton = ''; 18 | if ( function_exists('get_submit_button') ) { 19 | $requestInfoButton = get_submit_button( 20 | 'Request Info', 21 | 'secondary', 22 | 'puc-request-info-button', 23 | false, 24 | array('id' => $this->updateChecker->getUniqueName('request-info-button')) 25 | ); 26 | } 27 | return $requestInfoButton; 28 | } 29 | 30 | protected function getUpdateFields() { 31 | return array_merge( 32 | parent::getUpdateFields(), 33 | array('homepage', 'upgrade_notice', 'tested',) 34 | ); 35 | } 36 | } 37 | 38 | endif; 39 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/DebugBar/PluginExtension.php: -------------------------------------------------------------------------------- 1 | updateChecker->getUniqueName('uid') ) { 19 | return; 20 | } 21 | $this->preAjaxRequest(); 22 | $info = $this->updateChecker->requestInfo(); 23 | if ( $info !== null ) { 24 | echo 'Successfully retrieved plugin info from the metadata URL:'; 25 | echo '
', htmlentities(print_r($info, true)), '
'; 26 | } else { 27 | echo 'Failed to retrieve plugin info from the metadata URL.'; 28 | } 29 | exit; 30 | } 31 | } 32 | 33 | endif; 34 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/load-v4p9.php: -------------------------------------------------------------------------------- 1 | 'Puc_v4p9_Plugin_UpdateChecker', 12 | 'Theme_UpdateChecker' => 'Puc_v4p9_Theme_UpdateChecker', 13 | 14 | 'Vcs_PluginUpdateChecker' => 'Puc_v4p9_Vcs_PluginUpdateChecker', 15 | 'Vcs_ThemeUpdateChecker' => 'Puc_v4p9_Vcs_ThemeUpdateChecker', 16 | 17 | 'GitHubApi' => 'Puc_v4p9_Vcs_GitHubApi', 18 | 'BitBucketApi' => 'Puc_v4p9_Vcs_BitBucketApi', 19 | 'GitLabApi' => 'Puc_v4p9_Vcs_GitLabApi', 20 | ) 21 | as $pucGeneralClass => $pucVersionedClass 22 | ) { 23 | Puc_v4_Factory::addVersion($pucGeneralClass, $pucVersionedClass, '4.9'); 24 | //Also add it to the minor-version factory in case the major-version factory 25 | //was already defined by another, older version of the update checker. 26 | Puc_v4p9_Factory::addVersion($pucGeneralClass, $pucVersionedClass, '4.9'); 27 | } 28 | 29 | -------------------------------------------------------------------------------- /classes/critcss-inc/css/ao-tablesorter/style.css: -------------------------------------------------------------------------------- 1 | /* tables */ 2 | table.tablesorter { 3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; 4 | margin: 30px 0 5px; 5 | font-size: 8pt; 6 | width: 100%; 7 | text-align: left; 8 | } 9 | table.tablesorter thead tr th, 10 | table.tablesorter tfoot tr th { 11 | background-color: #f1f1f1; 12 | font-size: 8pt; 13 | padding: 2px; 14 | } 15 | table.tablesorter thead tr .header { 16 | background-image: url(bg.gif); 17 | background-repeat: no-repeat; 18 | background-position: center right; 19 | cursor: pointer; 20 | } 21 | table.tablesorter tbody td { 22 | color: #444; 23 | padding: 4px; 24 | background-color: #fff; 25 | vertical-align: middle; 26 | } 27 | table.tablesorter tbody tr.even td, 28 | table.tablesorter tbody tr:nth-child(even) td { 29 | background-color: #f9f9f9; 30 | } 31 | table.tablesorter thead tr .headerSortUp { 32 | background-image: url(asc.gif); 33 | } 34 | table.tablesorter thead tr .headerSortDown { 35 | background-image: url(desc.gif); 36 | } 37 | table.tablesorter thead tr .headerSortDown, 38 | table.tablesorter thead tr .headerSortUp { 39 | background-color: #ccc; 40 | } 41 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/Vcs/Reference.php: -------------------------------------------------------------------------------- 1 | properties = $properties; 21 | } 22 | 23 | /** 24 | * @param string $name 25 | * @return mixed|null 26 | */ 27 | public function __get($name) { 28 | return array_key_exists($name, $this->properties) ? $this->properties[$name] : null; 29 | } 30 | 31 | /** 32 | * @param string $name 33 | * @param mixed $value 34 | */ 35 | public function __set($name, $value) { 36 | $this->properties[$name] = $value; 37 | } 38 | 39 | /** 40 | * @param string $name 41 | * @return bool 42 | */ 43 | public function __isset($name) { 44 | return isset($this->properties[$name]); 45 | } 46 | 47 | } 48 | 49 | endif; 50 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-de_DE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2016-06-29 20:21+0100\n" 5 | "PO-Revision-Date: 2016-06-29 20:23+0100\n" 6 | "Last-Translator: Igor Lückel \n" 7 | "Language-Team: \n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "X-Generator: Poedit 1.8.1\n" 12 | "X-Poedit-Basepath: ..\n" 13 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 14 | "X-Poedit-SourceCharset: UTF-8\n" 15 | "X-Poedit-KeywordsList: __;_e\n" 16 | "Language: de_DE\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: github-checker.php:137 20 | msgid "There is no changelog available." 21 | msgstr "Es ist keine Liste von Programmänderungen verfügbar." 22 | 23 | #: plugin-update-checker.php:852 24 | msgid "Check for updates" 25 | msgstr "Nach Update suchen" 26 | 27 | #: plugin-update-checker.php:896 28 | msgid "This plugin is up to date." 29 | msgstr "Das Plugin ist aktuell." 30 | 31 | #: plugin-update-checker.php:898 32 | msgid "A new version of this plugin is available." 33 | msgstr "Es ist eine neue Version für das Plugin verfügbar." 34 | 35 | #: plugin-update-checker.php:900 36 | #, php-format 37 | msgid "Unknown update checker status \"%s\"" 38 | msgstr "Unbekannter Update Status \"%s\"" 39 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-it_IT.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2016-06-29 20:21+0100\n" 5 | "PO-Revision-Date: 2017-01-15 12:24+0100\n" 6 | "Last-Translator: Igor Lückel \n" 7 | "Language-Team: \n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "X-Generator: Poedit 1.5.5\n" 12 | "X-Poedit-Basepath: ..\n" 13 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 14 | "X-Poedit-SourceCharset: UTF-8\n" 15 | "X-Poedit-KeywordsList: __;_e\n" 16 | "Language: de_DE\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: github-checker.php:137 20 | msgid "There is no changelog available." 21 | msgstr "Non c'è alcuna sezione di aggiornamento disponibile" 22 | 23 | #: plugin-update-checker.php:852 24 | msgid "Check for updates" 25 | msgstr "Verifica aggiornamenti" 26 | 27 | #: plugin-update-checker.php:896 28 | msgid "This plugin is up to date." 29 | msgstr "Il plugin è aggiornato" 30 | 31 | #: plugin-update-checker.php:898 32 | msgid "A new version of this plugin is available." 33 | msgstr "Una nuova versione del plugin è disponibile" 34 | 35 | #: plugin-update-checker.php:900 36 | #, php-format 37 | msgid "Unknown update checker status \"%s\"" 38 | msgstr "Si è verificato un problema sconosciuto \"%s\"" 39 | -------------------------------------------------------------------------------- /contributing.md: -------------------------------------------------------------------------------- 1 | Issues 2 | == 3 | If you are a plugin user who has problems configuring Autoptimize (your site breaking in some way when activating AO) **the place to get help is [the Autoptimize support forum at wordpress.org](https://wordpress.org/support/plugin/autoptimize/)**. 4 | 5 | If you are a developer and you think you discovered a bug in the code or if you have ideas for improvements, create an issue here on Github with a clear technical description. 6 | 7 | If you are both developer & plugin user the choice is yours (it really depends on what type of support you need) ;-) 8 | 9 | Pull requests 10 | == 11 | PR's are enthousiastically welcomed! 12 | 13 | For optimal efficiency please take the following things into account: 14 | 1. use the **beta** branch as master is frozen to be at the same level as the current version on wordpress.org. 15 | 2. test your changes not only functionally, but also using the **unit tests** available (running `composer test` after having done `composer install` and running `bin/install-wp-tests.sh`) 16 | 3. (new) code is supposed to follow the WordPress code guidelines, test using **phpcs** (install with `composer install` and then run `vendor/squizlabs/bin/phpcs` against your changed/ added file 17 | 18 | When in doubt or in need of guidance/ help create an issue describing what you would like to change and we'll figure it out! :-) 19 | 20 | Frank 21 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-fa_IR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2016-02-17 14:21+0100\n" 5 | "PO-Revision-Date: 2016-10-28 14:30+0330\n" 6 | "Last-Translator: studio RVOLA \n" 7 | "Language-Team: Pro Style \n" 8 | "Language: fa_IR\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "X-Generator: Poedit 1.8.8\n" 13 | "X-Poedit-Basepath: ..\n" 14 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-KeywordsList: __;_e\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: github-checker.php:120 20 | msgid "There is no changelog available." 21 | msgstr "شرحی برای تغییرات یافت نشد" 22 | 23 | #: plugin-update-checker.php:637 24 | msgid "Check for updates" 25 | msgstr "بررسی برای بروزرسانی " 26 | 27 | #: plugin-update-checker.php:681 28 | msgid "This plugin is up to date." 29 | msgstr "شما از آخرین نسخه استفاده میکنید . به‌روز باشید" 30 | 31 | #: plugin-update-checker.php:683 32 | msgid "A new version of this plugin is available." 33 | msgstr "نسخه جدیدی برای افزونه ارائه شده است ." 34 | 35 | #: plugin-update-checker.php:685 36 | #, php-format 37 | msgid "Unknown update checker status \"%s\"" 38 | msgstr "وضعیت ناشناخته برای بروزرسانی \"%s\"" 39 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-hu_HU.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2016-01-11 21:23+0100\n" 5 | "PO-Revision-Date: 2016-01-11 21:25+0100\n" 6 | "Last-Translator: Tamás András Horváth \n" 7 | "Language-Team: \n" 8 | "Language: hu_HU\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "X-Generator: Poedit 1.8.6\n" 13 | "X-Poedit-Basepath: ..\n" 14 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-KeywordsList: __;_e\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: github-checker.php:137 20 | msgid "There is no changelog available." 21 | msgstr "Nem érhető el a changelog." 22 | 23 | #: plugin-update-checker.php:852 24 | msgid "Check for updates" 25 | msgstr "Frissítés ellenőrzése" 26 | 27 | #: plugin-update-checker.php:896 28 | msgid "This plugin is up to date." 29 | msgstr "Ez a plugin naprakész." 30 | 31 | #: plugin-update-checker.php:898 32 | msgid "A new version of this plugin is available." 33 | msgstr "Új verzió érhető el a kiegészítőhöz" 34 | 35 | #: plugin-update-checker.php:900 36 | #, php-format 37 | msgid "Unknown update checker status \"%s\"" 38 | msgstr "Ismeretlen a frissítés ellenőrző státusza \"%s\"" 39 | 40 | #~ msgid "Every %d hours" 41 | #~ msgstr "Minden %d órában" 42 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-sv_SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2017-05-20 10:53+0300\n" 5 | "PO-Revision-Date: 2017-10-16 15:02+0200\n" 6 | "Language-Team: \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "X-Generator: Poedit 2.0.4\n" 11 | "X-Poedit-Basepath: ..\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Poedit-SourceCharset: UTF-8\n" 14 | "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" 15 | "Last-Translator: \n" 16 | "Language: sv_SE\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: Puc/v4p1/Plugin/UpdateChecker.php:358 20 | msgid "Check for updates" 21 | msgstr "Sök efter uppdateringar" 22 | 23 | #: Puc/v4p1/Plugin/UpdateChecker.php:405 24 | #, php-format 25 | msgctxt "the plugin title" 26 | msgid "The %s plugin is up to date." 27 | msgstr "Tillägget %s är uppdaterat." 28 | 29 | #: Puc/v4p1/Plugin/UpdateChecker.php:407 30 | #, php-format 31 | msgctxt "the plugin title" 32 | msgid "A new version of the %s plugin is available." 33 | msgstr "Det finns en ny version av tillägget %s." 34 | 35 | #: Puc/v4p1/Plugin/UpdateChecker.php:409 36 | #, php-format 37 | msgid "Unknown update checker status \"%s\"" 38 | msgstr "Okänd status för kontroll av uppdatering “%s”" 39 | 40 | #: Puc/v4p1/Vcs/PluginUpdateChecker.php:83 41 | msgid "There is no changelog available." 42 | msgstr "Det finns ingen ändringslogg tillgänglig." 43 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-da_DK.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2017-05-20 10:53+0300\n" 5 | "PO-Revision-Date: 2017-10-17 11:07+0200\n" 6 | "Last-Translator: Mikk3lRo\n" 7 | "Language-Team: Mikk3lRo\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "X-Generator: Poedit 2.0.4\n" 12 | "X-Poedit-Basepath: ..\n" 13 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 14 | "X-Poedit-SourceCharset: UTF-8\n" 15 | "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" 16 | "Language: da_DK\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: Puc/v4p1/Plugin/UpdateChecker.php:358 20 | msgid "Check for updates" 21 | msgstr "Undersøg for opdateringer" 22 | 23 | #: Puc/v4p1/Plugin/UpdateChecker.php:405 24 | #, php-format 25 | msgctxt "the plugin title" 26 | msgid "The %s plugin is up to date." 27 | msgstr "Plugin'et %s er allerede opdateret." 28 | 29 | #: Puc/v4p1/Plugin/UpdateChecker.php:407 30 | #, php-format 31 | msgctxt "the plugin title" 32 | msgid "A new version of the %s plugin is available." 33 | msgstr "En ny version af plugin'et %s er tilgængelig." 34 | 35 | #: Puc/v4p1/Plugin/UpdateChecker.php:409 36 | #, php-format 37 | msgid "Unknown update checker status \"%s\"" 38 | msgstr "Ukendt opdateringsstatus: \"%s\"" 39 | 40 | #: Puc/v4p1/Vcs/PluginUpdateChecker.php:83 41 | msgid "There is no changelog available." 42 | msgstr "Der er ingen ændringslog tilgængelig." 43 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/Autoloader.php: -------------------------------------------------------------------------------- 1 | rootDir = dirname(__FILE__) . '/'; 14 | $nameParts = explode('_', __CLASS__, 3); 15 | $this->prefix = $nameParts[0] . '_' . $nameParts[1] . '_'; 16 | 17 | $this->libraryDir = realpath($this->rootDir . '../..') . '/'; 18 | $this->staticMap = array( 19 | 'PucReadmeParser' => 'vendor/PucReadmeParser.php', 20 | 'Parsedown' => 'vendor/Parsedown.php', 21 | 'Puc_v4_Factory' => 'Puc/v4/Factory.php', 22 | ); 23 | 24 | spl_autoload_register(array($this, 'autoload')); 25 | } 26 | 27 | public function autoload($className) { 28 | if ( isset($this->staticMap[$className]) && file_exists($this->libraryDir . $this->staticMap[$className]) ) { 29 | /** @noinspection PhpIncludeInspection */ 30 | include ($this->libraryDir . $this->staticMap[$className]); 31 | return; 32 | } 33 | 34 | if (strpos($className, $this->prefix) === 0) { 35 | $path = substr($className, strlen($this->prefix)); 36 | $path = str_replace('_', '/', $path); 37 | $path = $this->rootDir . $path . '.php'; 38 | 39 | if (file_exists($path)) { 40 | /** @noinspection PhpIncludeInspection */ 41 | include $path; 42 | } 43 | } 44 | } 45 | } 46 | 47 | endif; 48 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker.pot: -------------------------------------------------------------------------------- 1 | #, fuzzy 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: plugin-update-checker\n" 5 | "POT-Creation-Date: 2017-11-24 17:02+0200\n" 6 | "PO-Revision-Date: 2016-01-10 20:59+0100\n" 7 | "Last-Translator: Tamás András Horváth \n" 8 | "Language-Team: \n" 9 | "Language: en_US\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Generator: Poedit 2.0.4\n" 14 | "X-Poedit-Basepath: ..\n" 15 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 16 | "X-Poedit-SourceCharset: UTF-8\n" 17 | "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" 18 | "X-Poedit-SearchPath-0: .\n" 19 | 20 | #: Puc/v4p3/Plugin/UpdateChecker.php:395 21 | msgid "Check for updates" 22 | msgstr "" 23 | 24 | #: Puc/v4p3/Plugin/UpdateChecker.php:548 25 | #, php-format 26 | msgctxt "the plugin title" 27 | msgid "The %s plugin is up to date." 28 | msgstr "" 29 | 30 | #: Puc/v4p3/Plugin/UpdateChecker.php:550 31 | #, php-format 32 | msgctxt "the plugin title" 33 | msgid "A new version of the %s plugin is available." 34 | msgstr "" 35 | 36 | #: Puc/v4p3/Plugin/UpdateChecker.php:552 37 | #, php-format 38 | msgctxt "the plugin title" 39 | msgid "Could not determine if updates are available for %s." 40 | msgstr "" 41 | 42 | #: Puc/v4p3/Plugin/UpdateChecker.php:558 43 | #, php-format 44 | msgid "Unknown update checker status \"%s\"" 45 | msgstr "" 46 | 47 | #: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 48 | msgid "There is no changelog available." 49 | msgstr "" 50 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-fr_FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2017-07-07 14:53+0200\n" 5 | "PO-Revision-Date: 2017-07-07 14:54+0200\n" 6 | "Language-Team: studio RVOLA \n" 7 | "Language: fr_FR\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "X-Generator: Poedit 2.0.2\n" 12 | "X-Poedit-Basepath: ..\n" 13 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 14 | "X-Poedit-SourceCharset: UTF-8\n" 15 | "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" 16 | "Last-Translator: Nicolas GEHIN\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: Puc/v4p1/Plugin/UpdateChecker.php:358 20 | msgid "Check for updates" 21 | msgstr "Vérifier les mises à jour" 22 | 23 | #: Puc/v4p1/Plugin/UpdateChecker.php:405 24 | #, php-format 25 | msgctxt "the plugin title" 26 | msgid "The %s plugin is up to date." 27 | msgstr "L’extension %s est à jour." 28 | 29 | #: Puc/v4p1/Plugin/UpdateChecker.php:407 30 | #, php-format 31 | msgctxt "the plugin title" 32 | msgid "A new version of the %s plugin is available." 33 | msgstr "Une nouvelle version de l’extension %s est disponible." 34 | 35 | #: Puc/v4p1/Plugin/UpdateChecker.php:409 36 | #, php-format 37 | msgid "Unknown update checker status \"%s\"" 38 | msgstr "Un problème inconnu est survenu \"%s\"" 39 | 40 | #: Puc/v4p1/Vcs/PluginUpdateChecker.php:85 41 | msgid "There is no changelog available." 42 | msgstr "Il n’y a aucun journal de mise à jour disponible." 43 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/css/puc-debug-bar.css: -------------------------------------------------------------------------------- 1 | .puc-debug-bar-panel-v4 pre { 2 | margin-top: 0; 3 | } 4 | 5 | /* Style the debug data table to match "widefat" table style used by WordPress. */ 6 | table.puc-debug-data { 7 | width: 100%; 8 | clear: both; 9 | margin: 0; 10 | 11 | border-spacing: 0; 12 | background-color: #f9f9f9; 13 | 14 | border-radius: 3px; 15 | border: 1px solid #dfdfdf; 16 | border-collapse: separate; 17 | } 18 | 19 | table.puc-debug-data * { 20 | word-wrap: break-word; 21 | } 22 | 23 | table.puc-debug-data th { 24 | width: 11em; 25 | padding: 7px 7px 8px; 26 | text-align: left; 27 | 28 | font-family: "Georgia", "Times New Roman", "Bitstream Charter", "Times", serif; 29 | font-weight: 400; 30 | font-size: 14px; 31 | line-height: 1.3em; 32 | text-shadow: rgba(255, 255, 255, 0.804) 0 1px 0; 33 | } 34 | 35 | table.puc-debug-data td, table.puc-debug-data th { 36 | border-width: 1px 0; 37 | border-style: solid; 38 | 39 | border-top-color: #fff; 40 | border-bottom-color: #dfdfdf; 41 | 42 | text-transform: none; 43 | } 44 | 45 | table.puc-debug-data td { 46 | color: #555; 47 | font-size: 12px; 48 | padding: 4px 7px 2px; 49 | vertical-align: top; 50 | } 51 | 52 | .puc-ajax-response { 53 | border: 1px solid #dfdfdf; 54 | border-radius: 3px; 55 | padding: 0.5em; 56 | margin: 5px 0; 57 | background-color: white; 58 | } 59 | 60 | .puc-ajax-nonce { 61 | display: none; 62 | } 63 | 64 | .puc-ajax-response dt { 65 | margin: 0; 66 | } 67 | 68 | .puc-ajax-response dd { 69 | margin: 0 0 1em; 70 | } 71 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-cs_CZ.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "POT-Creation-Date: 2017-05-20 10:53+0300\n" 6 | "PO-Revision-Date: 2017-07-05 15:39+0000\n" 7 | "Last-Translator: Vojtěch Sajdl \n" 8 | "Language-Team: Czech (Czech Republic)\n" 9 | "Language: cs-CZ\n" 10 | "Plural-Forms: nplurals=2; plural=(n != 1)\n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: 8bit\n" 14 | "X-Loco-Source-Locale: cs_CZ\n" 15 | "X-Generator: Loco - https://localise.biz/\n" 16 | "X-Poedit-Basepath: ..\n" 17 | "X-Poedit-SourceCharset: UTF-8\n" 18 | "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" 19 | "X-Poedit-SearchPath-0: .\n" 20 | "X-Loco-Parser: loco_parse_po" 21 | 22 | #: Puc/v4p1/Plugin/UpdateChecker.php:358 23 | msgid "Check for updates" 24 | msgstr "Zkontrolovat aktualizace" 25 | 26 | #: Puc/v4p1/Plugin/UpdateChecker.php:405 27 | #, php-format 28 | msgctxt "the plugin title" 29 | msgid "The %s plugin is up to date." 30 | msgstr "Plugin %s je aktuální." 31 | 32 | #: Puc/v4p1/Plugin/UpdateChecker.php:407 33 | #, php-format 34 | msgctxt "the plugin title" 35 | msgid "A new version of the %s plugin is available." 36 | msgstr "Nová verze pluginu %s je dostupná." 37 | 38 | #: Puc/v4p1/Plugin/UpdateChecker.php:409 39 | #, php-format 40 | msgid "Unknown update checker status \"%s\"" 41 | msgstr "Neznámý status kontroly aktualizací \"%s\"" 42 | 43 | #: Puc/v4p1/Vcs/PluginUpdateChecker.php:83 44 | msgid "There is no changelog available." 45 | msgstr "Changelog není dostupný." 46 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-ca.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2017-11-24 17:02+0200\n" 5 | "PO-Revision-Date: 2019-09-25 18:15+0200\n" 6 | "Language-Team: \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "X-Generator: Poedit 2.2.3\n" 11 | "X-Poedit-Basepath: ..\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Poedit-SourceCharset: UTF-8\n" 14 | "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" 15 | "Last-Translator: \n" 16 | "Language: ca\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: Puc/v4p3/Plugin/UpdateChecker.php:395 20 | msgid "Check for updates" 21 | msgstr "Comprova si hi ha actualitzacions" 22 | 23 | #: Puc/v4p3/Plugin/UpdateChecker.php:548 24 | #, php-format 25 | msgctxt "the plugin title" 26 | msgid "The %s plugin is up to date." 27 | msgstr "L’extensió %s està actualitzada." 28 | 29 | #: Puc/v4p3/Plugin/UpdateChecker.php:550 30 | #, php-format 31 | msgctxt "the plugin title" 32 | msgid "A new version of the %s plugin is available." 33 | msgstr "Una nova versió de l’extensió %s està disponible." 34 | 35 | #: Puc/v4p3/Plugin/UpdateChecker.php:552 36 | #, php-format 37 | msgctxt "the plugin title" 38 | msgid "Could not determine if updates are available for %s." 39 | msgstr "No s’ha pogut determinar si hi ha actualitzacions per a %s." 40 | 41 | #: Puc/v4p3/Plugin/UpdateChecker.php:558 42 | #, php-format 43 | msgid "Unknown update checker status \"%s\"" 44 | msgstr "Estat del comprovador d’actualitzacions desconegut \"%s\"" 45 | 46 | #: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 47 | msgid "There is no changelog available." 48 | msgstr "No hi ha cap registre de canvis disponible." 49 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-es_ES.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2017-11-24 17:02+0200\n" 5 | "PO-Revision-Date: 2019-09-25 18:17+0200\n" 6 | "Language-Team: \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "X-Generator: Poedit 2.2.3\n" 11 | "X-Poedit-Basepath: ..\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Poedit-SourceCharset: UTF-8\n" 14 | "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" 15 | "Last-Translator: \n" 16 | "Language: es_ES\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: Puc/v4p3/Plugin/UpdateChecker.php:395 20 | msgid "Check for updates" 21 | msgstr "Comprobar si hay actualizaciones" 22 | 23 | #: Puc/v4p3/Plugin/UpdateChecker.php:548 24 | #, php-format 25 | msgctxt "the plugin title" 26 | msgid "The %s plugin is up to date." 27 | msgstr "El plugin %s está actualizado." 28 | 29 | #: Puc/v4p3/Plugin/UpdateChecker.php:550 30 | #, php-format 31 | msgctxt "the plugin title" 32 | msgid "A new version of the %s plugin is available." 33 | msgstr "Una nueva versión del %s plugin está disponible." 34 | 35 | #: Puc/v4p3/Plugin/UpdateChecker.php:552 36 | #, php-format 37 | msgctxt "the plugin title" 38 | msgid "Could not determine if updates are available for %s." 39 | msgstr "No se pudo determinar si hay actualizaciones disponibles para %s." 40 | 41 | #: Puc/v4p3/Plugin/UpdateChecker.php:558 42 | #, php-format 43 | msgid "Unknown update checker status \"%s\"" 44 | msgstr "Estado del comprobador de actualización desconocido \"%s\"" 45 | 46 | #: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 47 | msgid "There is no changelog available." 48 | msgstr "No hay registro de cambios disponible." 49 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-fr_CA.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2017-11-24 17:02+0200\n" 5 | "PO-Revision-Date: 2018-02-12 10:32-0500\n" 6 | "Language-Team: \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "X-Generator: Poedit 2.0.4\n" 11 | "X-Poedit-Basepath: ..\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Poedit-SourceCharset: UTF-8\n" 14 | "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" 15 | "Last-Translator: Eric Gagnon \n" 16 | "Language: fr_CA\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: Puc/v4p3/Plugin/UpdateChecker.php:395 20 | msgid "Check for updates" 21 | msgstr "Vérifier les mises à jour" 22 | 23 | #: Puc/v4p3/Plugin/UpdateChecker.php:548 24 | #, php-format 25 | msgctxt "the plugin title" 26 | msgid "The %s plugin is up to date." 27 | msgstr "L’extension %s est à jour." 28 | 29 | #: Puc/v4p3/Plugin/UpdateChecker.php:550 30 | #, php-format 31 | msgctxt "the plugin title" 32 | msgid "A new version of the %s plugin is available." 33 | msgstr "Une nouvelle version de l’extension %s est disponible." 34 | 35 | #: Puc/v4p3/Plugin/UpdateChecker.php:552 36 | #, php-format 37 | msgctxt "the plugin title" 38 | msgid "Could not determine if updates are available for %s." 39 | msgstr "Impossible de déterminer si une mise à jour est disponible pour \"%s\"" 40 | 41 | #: Puc/v4p3/Plugin/UpdateChecker.php:558 42 | #, php-format 43 | msgid "Unknown update checker status \"%s\"" 44 | msgstr "Un problème inconnu est survenu \"%s\"" 45 | 46 | #: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 47 | msgid "There is no changelog available." 48 | msgstr "Il n’y a aucun journal de mise à jour disponible." 49 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-sl_SI.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2017-11-24 17:02+0200\n" 5 | "PO-Revision-Date: 2018-10-27 20:36+0200\n" 6 | "Language-Team: \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "X-Generator: Poedit 2.2\n" 11 | "X-Poedit-Basepath: ..\n" 12 | "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100>=3 && n%100<=4 ? 2 : 3);\n" 13 | "X-Poedit-SourceCharset: UTF-8\n" 14 | "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" 15 | "Last-Translator: Igor Funa\n" 16 | "Language: sl_SI\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: Puc/v4p3/Plugin/UpdateChecker.php:395 20 | msgid "Check for updates" 21 | msgstr "Preveri posodobitve" 22 | 23 | #: Puc/v4p3/Plugin/UpdateChecker.php:548 24 | #, php-format 25 | msgctxt "the plugin title" 26 | msgid "The %s plugin is up to date." 27 | msgstr "Vtičnik %s je že posodobljen." 28 | 29 | #: Puc/v4p3/Plugin/UpdateChecker.php:550 30 | #, php-format 31 | msgctxt "the plugin title" 32 | msgid "A new version of the %s plugin is available." 33 | msgstr "Nova različica vtičnika %s je na razpolago." 34 | 35 | #: Puc/v4p3/Plugin/UpdateChecker.php:552 36 | #, php-format 37 | msgctxt "the plugin title" 38 | msgid "Could not determine if updates are available for %s." 39 | msgstr "Ne morem ugotoviti če se za vtičnik %s na razpolago posodobitve." 40 | 41 | #: Puc/v4p3/Plugin/UpdateChecker.php:558 42 | #, php-format 43 | msgid "Unknown update checker status \"%s\"" 44 | msgstr "Neznan status preverjanja posodobitev za \"%s\"" 45 | 46 | #: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 47 | msgid "There is no changelog available." 48 | msgstr "Dnevnik sprememb ni na razpolago." 49 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-nl_BE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2018-03-25 18:15+0200\n" 5 | "PO-Revision-Date: 2018-03-25 18:32+0200\n" 6 | "Language-Team: \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "X-Generator: Poedit 1.8.7.1\n" 11 | "X-Poedit-Basepath: ..\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Poedit-SourceCharset: UTF-8\n" 14 | "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" 15 | "Last-Translator: Frank Goossens \n" 16 | "Language: nl_BE\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: Puc/v4p3/Plugin/UpdateChecker.php:395 20 | msgid "Check for updates" 21 | msgstr "Controleer op nieuwe versies" 22 | 23 | #: Puc/v4p3/Plugin/UpdateChecker.php:548 24 | #, php-format 25 | msgctxt "the plugin title" 26 | msgid "The %s plugin is up to date." 27 | msgstr "De meest recente %s versie is geïnstalleerd." 28 | 29 | #: Puc/v4p3/Plugin/UpdateChecker.php:550 30 | #, php-format 31 | msgctxt "the plugin title" 32 | msgid "A new version of the %s plugin is available." 33 | msgstr "Er is een nieuwe versie van %s beschikbaar." 34 | 35 | #: Puc/v4p3/Plugin/UpdateChecker.php:552 36 | #, php-format 37 | msgctxt "the plugin title" 38 | msgid "Could not determine if updates are available for %s." 39 | msgstr "Kon niet bepalen of er nieuwe versie van %s beschikbaar is." 40 | 41 | #: Puc/v4p3/Plugin/UpdateChecker.php:558 42 | #, php-format 43 | msgid "Unknown update checker status \"%s\"" 44 | msgstr "Ongekende status bij controle op nieuwe versie: \"%s\"" 45 | 46 | #: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 47 | msgid "There is no changelog available." 48 | msgstr "Er is geen changelog beschikbaar." 49 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-nl_NL.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2018-03-25 18:15+0200\n" 5 | "PO-Revision-Date: 2018-03-25 18:32+0200\n" 6 | "Language-Team: \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "X-Generator: Poedit 1.8.7.1\n" 11 | "X-Poedit-Basepath: ..\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Poedit-SourceCharset: UTF-8\n" 14 | "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" 15 | "Last-Translator: Frank Goossens \n" 16 | "Language: nl_NL\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: Puc/v4p3/Plugin/UpdateChecker.php:395 20 | msgid "Check for updates" 21 | msgstr "Controleer op nieuwe versies" 22 | 23 | #: Puc/v4p3/Plugin/UpdateChecker.php:548 24 | #, php-format 25 | msgctxt "the plugin title" 26 | msgid "The %s plugin is up to date." 27 | msgstr "De meest recente %s versie is geïnstalleerd." 28 | 29 | #: Puc/v4p3/Plugin/UpdateChecker.php:550 30 | #, php-format 31 | msgctxt "the plugin title" 32 | msgid "A new version of the %s plugin is available." 33 | msgstr "Er is een nieuwe versie van %s beschikbaar." 34 | 35 | #: Puc/v4p3/Plugin/UpdateChecker.php:552 36 | #, php-format 37 | msgctxt "the plugin title" 38 | msgid "Could not determine if updates are available for %s." 39 | msgstr "Kon niet bepalen of er nieuwe versie van %s beschikbaar is." 40 | 41 | #: Puc/v4p3/Plugin/UpdateChecker.php:558 42 | #, php-format 43 | msgid "Unknown update checker status \"%s\"" 44 | msgstr "Ongekende status bij controle op nieuwe versie: \"%s\"" 45 | 46 | #: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 47 | msgid "There is no changelog available." 48 | msgstr "Er is geen changelog beschikbaar." 49 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-pt_BR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: plugin-update-checker\n" 4 | "POT-Creation-Date: 2017-05-19 15:41-0300\n" 5 | "PO-Revision-Date: 2017-05-19 15:42-0300\n" 6 | "Last-Translator: \n" 7 | "Language-Team: \n" 8 | "Language: pt_BR\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "X-Generator: Poedit 1.8.8\n" 13 | "X-Poedit-Basepath: ..\n" 14 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-KeywordsList: __;_e;_x;_x:1,2c\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: Puc/v4p1/Plugin/UpdateChecker.php:358 20 | msgid "Check for updates" 21 | msgstr "Verificar Atualizações" 22 | 23 | #: Puc/v4p1/Plugin/UpdateChecker.php:401 Puc/v4p1/Plugin/UpdateChecker.php:406 24 | #, php-format 25 | msgctxt "the plugin title" 26 | msgid "The %s plugin is up to date." 27 | msgstr "O plugin %s já está na sua versão mais recente." 28 | 29 | #: Puc/v4p1/Plugin/UpdateChecker.php:408 30 | #, php-format 31 | msgctxt "the plugin title" 32 | msgid "A new version of the %s plugin is available." 33 | msgstr "Há uma nova versão para o plugin %s disponível para download." 34 | 35 | #: Puc/v4p1/Plugin/UpdateChecker.php:410 36 | #, php-format 37 | msgid "Unknown update checker status \"%s\"" 38 | msgstr "Status \"%s\" desconhecido." 39 | 40 | #: Puc/v4p1/Vcs/PluginUpdateChecker.php:83 41 | msgid "There is no changelog available." 42 | msgstr "Não há um changelog disponível." 43 | 44 | #~ msgid "The %s plugin is up to date." 45 | #~ msgstr "O plugin %s já está na sua versão mais recente." 46 | 47 | #~ msgid "A new version of the %s plugin is available." 48 | #~ msgstr "Há uma nova versão para o plugin %s disponível para download." 49 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/languages/plugin-update-checker-ja.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "POT-Creation-Date: 2019-07-15 17:07+0900\n" 5 | "PO-Revision-Date: 2019-07-15 17:12+0900\n" 6 | "Last-Translator: tak \n" 7 | "Language-Team: \n" 8 | "Language: ja_JP\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "X-Generator: Poedit 2.2.3\n" 13 | "X-Poedit-Basepath: ../../../../../../Applications/XAMPP/xamppfiles/htdocs/" 14 | "kisagai/wordpress/wp-content/plugins/simple-stripe-gateway/Puc\n" 15 | "Plural-Forms: nplurals=1; plural=0;\n" 16 | "X-Poedit-KeywordsList: __;_x:1,2c\n" 17 | "X-Poedit-SearchPath-0: .\n" 18 | 19 | #: v4p7/Plugin/Ui.php:54 20 | msgid "View details" 21 | msgstr "詳細を表示" 22 | 23 | #: v4p7/Plugin/Ui.php:77 24 | #, php-format 25 | msgid "More information about %s" 26 | msgstr "%sについての詳細" 27 | 28 | #: v4p7/Plugin/Ui.php:128 29 | msgid "Check for updates" 30 | msgstr "アップデートを確認" 31 | 32 | #: v4p7/Plugin/Ui.php:213 33 | #, php-format 34 | msgctxt "the plugin title" 35 | msgid "The %s plugin is up to date." 36 | msgstr "%s プラグインは、最新バージョンです。" 37 | 38 | #: v4p7/Plugin/Ui.php:215 39 | #, php-format 40 | msgctxt "the plugin title" 41 | msgid "A new version of the %s plugin is available." 42 | msgstr "%s プラグインの最新バージョンがあります。" 43 | 44 | #: v4p7/Plugin/Ui.php:217 45 | #, php-format 46 | msgctxt "the plugin title" 47 | msgid "Could not determine if updates are available for %s." 48 | msgstr "%s のアップデートがあるかどうかを判断できませんでした。" 49 | 50 | #: v4p7/Plugin/Ui.php:223 51 | #, php-format 52 | msgid "Unknown update checker status \"%s\"" 53 | msgstr "バージョンアップの確認で想定外の状態になりました。ステータス:”%s”" 54 | 55 | #: v4p7/Vcs/PluginUpdateChecker.php:98 56 | msgid "There is no changelog available." 57 | msgstr "更新履歴はありません。" 58 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/js/debug-bar.js: -------------------------------------------------------------------------------- 1 | jQuery(function($) { 2 | 3 | function runAjaxAction(button, action) { 4 | button = $(button); 5 | var panel = button.closest('.puc-debug-bar-panel-v4'); 6 | var responseBox = button.closest('td').find('.puc-ajax-response'); 7 | 8 | responseBox.text('Processing...').show(); 9 | $.post( 10 | ajaxurl, 11 | { 12 | action : action, 13 | uid : panel.data('uid'), 14 | _wpnonce: panel.data('nonce') 15 | }, 16 | function(data) { 17 | responseBox.html(data); 18 | }, 19 | 'html' 20 | ); 21 | } 22 | 23 | $('.puc-debug-bar-panel-v4 input[name="puc-check-now-button"]').click(function() { 24 | runAjaxAction(this, 'puc_v4_debug_check_now'); 25 | return false; 26 | }); 27 | 28 | $('.puc-debug-bar-panel-v4 input[name="puc-request-info-button"]').click(function() { 29 | runAjaxAction(this, 'puc_v4_debug_request_info'); 30 | return false; 31 | }); 32 | 33 | 34 | // Debug Bar uses the panel class name as part of its link and container IDs. This means we can 35 | // end up with multiple identical IDs if more than one plugin uses the update checker library. 36 | // Fix it by replacing the class name with the plugin slug. 37 | var panels = $('#debug-menu-targets').find('.puc-debug-bar-panel-v4'); 38 | panels.each(function() { 39 | var panel = $(this); 40 | var uid = panel.data('uid'); 41 | var target = panel.closest('.debug-menu-target'); 42 | 43 | //Change the panel wrapper ID. 44 | target.attr('id', 'debug-menu-target-puc-' + uid); 45 | 46 | //Change the menu link ID as well and point it at the new target ID. 47 | $('#debug-bar-menu').find('.puc-debug-menu-link-' + uid) 48 | .closest('.debug-menu-link') 49 | .attr('id', 'debug-menu-link-puc-' + uid) 50 | .attr('href', '#' + target.attr('id')); 51 | }); 52 | }); -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/examples/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "My Example Plugin", 3 | "version": "2.0", 4 | "download_url": "http://example.com/updates/example-plugin.zip", 5 | 6 | "homepage": "http://example.com/", 7 | "requires": "4.5", 8 | "tested": "4.8", 9 | "last_updated": "2017-01-01 16:17:00", 10 | "upgrade_notice": "Here's why you should upgrade...", 11 | 12 | "author": "Janis Elsts", 13 | "author_homepage": "http://example.com/", 14 | 15 | "sections": { 16 | "description": "(Required) Plugin description. Basic HTML can be used in all sections.", 17 | "installation": "(Recommended) Installation instructions.", 18 | "changelog": "(Recommended) Changelog.

This section will be displayed by default when the user clicks 'View version x.y.z details'.

", 19 | "custom_section": "This is a custom section labeled 'Custom Section'." 20 | }, 21 | 22 | "icons" : { 23 | "1x" : "http://w-shadow.com/files/external-update-example/assets/icon-128x128.png", 24 | "2x" : "http://w-shadow.com/files/external-update-example/assets/icon-256x256.png" 25 | }, 26 | 27 | "banners": { 28 | "low": "http://w-shadow.com/files/external-update-example/assets/banner-772x250.png", 29 | "high": "http://w-shadow.com/files/external-update-example/assets/banner-1544x500.png" 30 | }, 31 | 32 | "translations": [ 33 | { 34 | "language": "fr_FR", 35 | "version": "4.0", 36 | "updated": "2016-04-22 23:22:42", 37 | "package": "http://example.com/updates/translations/french-language-pack.zip" 38 | }, 39 | { 40 | "language": "de_DE", 41 | "version": "5.0", 42 | "updated": "2016-04-22 23:22:42", 43 | "package": "http://example.com/updates/translations/german-language-pack.zip" 44 | } 45 | ], 46 | 47 | "rating": 90, 48 | "num_ratings": 123, 49 | 50 | "downloaded": 1234, 51 | "active_installs": 12345 52 | } -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/Theme/Package.php: -------------------------------------------------------------------------------- 1 | stylesheet = $stylesheet; 17 | $this->theme = wp_get_theme($this->stylesheet); 18 | 19 | parent::__construct($updateChecker); 20 | } 21 | 22 | public function getInstalledVersion() { 23 | return $this->theme->get('Version'); 24 | } 25 | 26 | public function getAbsoluteDirectoryPath() { 27 | if ( method_exists($this->theme, 'get_stylesheet_directory') ) { 28 | return $this->theme->get_stylesheet_directory(); //Available since WP 3.4. 29 | } 30 | return get_theme_root($this->stylesheet) . '/' . $this->stylesheet; 31 | } 32 | 33 | /** 34 | * Get the value of a specific plugin or theme header. 35 | * 36 | * @param string $headerName 37 | * @param string $defaultValue 38 | * @return string Either the value of the header, or $defaultValue if the header doesn't exist or is empty. 39 | */ 40 | public function getHeaderValue($headerName, $defaultValue = '') { 41 | $value = $this->theme->get($headerName); 42 | if ( ($headerName === false) || ($headerName === '') ) { 43 | return $defaultValue; 44 | } 45 | return $value; 46 | } 47 | 48 | protected function getHeaderNames() { 49 | return array( 50 | 'Name' => 'Theme Name', 51 | 'ThemeURI' => 'Theme URI', 52 | 'Description' => 'Description', 53 | 'Author' => 'Author', 54 | 'AuthorURI' => 'Author URI', 55 | 'Version' => 'Version', 56 | 'Template' => 'Template', 57 | 'Status' => 'Status', 58 | 'Tags' => 'Tags', 59 | 'TextDomain' => 'Text Domain', 60 | 'DomainPath' => 'Domain Path', 61 | ); 62 | } 63 | } 64 | 65 | endif; 66 | -------------------------------------------------------------------------------- /classes/autoptimizeCSSmin.php: -------------------------------------------------------------------------------- 1 | minifier = new Autoptimize\tubalmartin\CssMin\Minifier( $raise_limits ); 27 | } 28 | 29 | /** 30 | * Runs the minifier on given string of $css. 31 | * Returns the minified css. 32 | * 33 | * @param string $css CSS to minify. 34 | * 35 | * @return string 36 | */ 37 | public function run( $css ) 38 | { 39 | // hide calc() if filter says yes (as YUI CSS compressor PHP port has problems retaining spaces around + and - operators). 40 | // regex see tests at https://regex101.com/r/ofGQG9/1 41 | if ( apply_filters( 'autoptimize_filter_css_hide_calc', true ) ) { 42 | $css = autoptimizeBase::replace_contents_with_marker_if_exists( 'CALC', 'calc(', '#(calc|min|max|clamp)\([^;}]*\)#m', $css ); 43 | } 44 | 45 | // minify. 46 | $result = $this->minifier->run( $css ); 47 | 48 | // restore calc() if filter says yes. 49 | if ( apply_filters( 'autoptimize_filter_css_hide_calc', true ) ) { 50 | $result = autoptimizeBase::restore_marked_content( 'CALC', $result ); 51 | } 52 | 53 | return $result; 54 | } 55 | 56 | /** 57 | * Static helper. 58 | * 59 | * @param string $css CSS to minify. 60 | * 61 | * @return string 62 | */ 63 | public static function minify( $css ) 64 | { 65 | $minifier = new self(); 66 | 67 | return $minifier->run( $css ); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/Utils.php: -------------------------------------------------------------------------------- 1 | $node) ) { 26 | $currentValue = $currentValue->$node; 27 | } else { 28 | return $default; 29 | } 30 | } 31 | 32 | return $currentValue; 33 | } 34 | 35 | /** 36 | * Get the first array element that is not empty. 37 | * 38 | * @param array $values 39 | * @param mixed|null $default Returns this value if there are no non-empty elements. 40 | * @return mixed|null 41 | */ 42 | public static function findNotEmpty($values, $default = null) { 43 | if ( empty($values) ) { 44 | return $default; 45 | } 46 | 47 | foreach ($values as $value) { 48 | if ( !empty($value) ) { 49 | return $value; 50 | } 51 | } 52 | 53 | return $default; 54 | } 55 | 56 | /** 57 | * Check if the input string starts with the specified prefix. 58 | * 59 | * @param string $input 60 | * @param string $prefix 61 | * @return bool 62 | */ 63 | public static function startsWith($input, $prefix) { 64 | $length = strlen($prefix); 65 | return (substr($input, 0, $length) === $prefix); 66 | } 67 | } 68 | 69 | endif; 70 | -------------------------------------------------------------------------------- /config/autoptimize_404_handler.php: -------------------------------------------------------------------------------- 1 | '; 31 | $js_or_css = pathinfo( $original_request, PATHINFO_EXTENSION ); 32 | 33 | // add multisite logic. 34 | $multisite = false; 35 | if ( true === $multisite ) { 36 | preg_match( '#\/([0-9]{1,5})\/(?:js|css)\/[a-z0-9]*_fallback\.(?:js|css)$#', $fallback_target, $child_site_id ); 37 | $ao_root_cache_dir = preg_replace( '#[0-9]*\/$#', '', $ao_cache_dir ); 38 | $ao_cache_dir = $ao_root_cache_dir . $child_site_id[1] . '/'; 39 | } 40 | 41 | $fallback_path = $ao_cache_dir . $js_or_css . '/fallback.' . $js_or_css; 42 | 43 | if ( $original_request !== $fallback_target && file_exists( $fallback_path ) ) { 44 | // error_log( 'Autoptimize file ' . $original_request . ' not found, using fallback instead.' ); 45 | header( 'HTTP/1.1 302 Found' ); 46 | header( 'Location: ' . $fallback_target ); 47 | } else { 48 | // error_log( 'Autoptimize file ' . $original_request . ' not found, sending 410 gone response.' ); 49 | header( 'HTTP/1.1 410 Gone' ); 50 | } 51 | 52 | exit(); 53 | -------------------------------------------------------------------------------- /classes/critcss-inc/admin_settings_impexp.js.php: -------------------------------------------------------------------------------- 1 | 7 | // Export and download settings 8 | function exportSettings( idToEdit ) { 9 | console.log('Exporting...'); 10 | var data = { 11 | 'action': 'ao_ccss_export', 12 | 'ao_ccss_export_nonce': '', 13 | }; 14 | 15 | jQuery.post(ajaxurl, data, function(response) { 16 | response_array=JSON.parse(response); 17 | if (response_array['code'] == 200) { 18 | 25 | export_url = '/uploads/ao_ccss' + '' + response_array['file']; 26 | msg = "Download export-file from: "+ export_url + ""; 27 | } else { 28 | msg = response_array['msg']; 29 | } 30 | jQuery("#importdialog").html(msg); 31 | jQuery("#importdialog").dialog({ 32 | autoOpen: true, 33 | height: 210, 34 | width: 700, 35 | title: "", 36 | modal: true, 37 | buttons: { 38 | OK: function() { 39 | jQuery( this ).dialog( "close" ); 40 | } 41 | } 42 | }); 43 | }); 44 | } 45 | 46 | // Upload and import settings 47 | function upload(){ 48 | var fd = new FormData(); 49 | var file = jQuery(document).find('#settingsfile'); 50 | var settings_file = file[0].files[0]; 51 | fd.append('file', settings_file); 52 | fd.append('action', 'ao_ccss_import'); 53 | fd.append('ao_ccss_import_nonce', ''); 54 | 55 | jQuery.ajax({ 56 | url: ajaxurl, 57 | type: 'POST', 58 | data: fd, 59 | contentType: false, 60 | processData: false, 61 | success: function(response) { 62 | response_array=JSON.parse(response); 63 | if (response_array['code'] == 200) { 64 | window.location.reload(); 65 | } 66 | } 67 | }); 68 | } 69 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/Theme/Update.php: -------------------------------------------------------------------------------- 1 | $this->slug, 19 | 'new_version' => $this->version, 20 | 'url' => $this->details_url, 21 | ); 22 | 23 | if ( !empty($this->download_url) ) { 24 | $update['package'] = $this->download_url; 25 | } 26 | 27 | return $update; 28 | } 29 | 30 | /** 31 | * Create a new instance of Theme_Update from its JSON-encoded representation. 32 | * 33 | * @param string $json Valid JSON string representing a theme information object. 34 | * @return self New instance of ThemeUpdate, or NULL on error. 35 | */ 36 | public static function fromJson($json) { 37 | $instance = new self(); 38 | if ( !parent::createFromJson($json, $instance) ) { 39 | return null; 40 | } 41 | return $instance; 42 | } 43 | 44 | /** 45 | * Create a new instance by copying the necessary fields from another object. 46 | * 47 | * @param StdClass|Puc_v4p9_Theme_Update $object The source object. 48 | * @return Puc_v4p9_Theme_Update The new copy. 49 | */ 50 | public static function fromObject($object) { 51 | $update = new self(); 52 | $update->copyFields($object, $update); 53 | return $update; 54 | } 55 | 56 | /** 57 | * Basic validation. 58 | * 59 | * @param StdClass $apiResponse 60 | * @return bool|WP_Error 61 | */ 62 | protected function validateMetadata($apiResponse) { 63 | $required = array('version', 'details_url'); 64 | foreach($required as $key) { 65 | if ( !isset($apiResponse->$key) || empty($apiResponse->$key) ) { 66 | return new WP_Error( 67 | 'tuc-invalid-metadata', 68 | sprintf('The theme metadata is missing the required "%s" key.', $key) 69 | ); 70 | } 71 | } 72 | return true; 73 | } 74 | 75 | protected function getFieldNames() { 76 | return array_merge(parent::getFieldNames(), self::$extraFields); 77 | } 78 | 79 | protected function getPrefixedFilter($tag) { 80 | return parent::getPrefixedFilter($tag) . '_theme'; 81 | } 82 | } 83 | 84 | endif; 85 | -------------------------------------------------------------------------------- /classes/static/toolbar.min.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function() 2 | {var percentage=jQuery('#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar').attr('percentage');var rotate=percentage*1.8;jQuery('#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .mask.full, #wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .fill').css({'-webkit-transform':'rotate('+rotate+'deg)','-ms-transform':'rotate('+rotate+'deg)','transform':'rotate('+rotate+'deg)'});jQuery('#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .inset').css('background-color',jQuery('#wp-admin-bar-autoptimize .ab-sub-wrapper').css('background-color'));jQuery('#wp-admin-bar-autoptimize-delete-cache .ab-item').css('background-color',jQuery('#wpadminbar').css('background-color'));jQuery('#wp-admin-bar-autoptimize-default li').on('click',function(e) 3 | {var id=(typeof e.target.id!='undefined'&&e.target.id)?e.target.id:jQuery(e.target).parent('li').attr('id');var action='';if(id=='wp-admin-bar-autoptimize-delete-cache'){action='autoptimize_delete_cache';}else{return;} 4 | jQuery('#wp-admin-bar-autoptimize').removeClass('hover');var modal_loading=jQuery('
').appendTo('body').show();var success=function(){jQuery('#wp-admin-bar-autoptimize-cache-info .size').attr('class','size green').html('0.00 B');jQuery('#wp-admin-bar-autoptimize-cache-info .files').html('0');jQuery('#wp-admin-bar-autoptimize-cache-info .percentage .numbers').attr('class','numbers green').html('0%');jQuery('#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .fill').attr('class','fill bg-green');jQuery('#wp-admin-bar-autoptimize').attr('class','menupop bullet-green');jQuery('#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .mask.full, #wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .fill').css({'-webkit-transform':'rotate(0deg)','-ms-transform':'rotate(0deg)','transform':'rotate(0deg)'});};var notice=function(){jQuery('

'+autoptimize_ajax_object.error_msg+'


').insertAfter('#wpbody .wrap h1:first-of-type').show();};jQuery.ajax({type:'GET',url:autoptimize_ajax_object.ajaxurl,data:{'action':action,'nonce':autoptimize_ajax_object.nonce},dataType:'json',cache:false,timeout:9000,success:function(cleared) 5 | {modal_loading.remove();if(cleared){success();}else{notice();}},error:function(jqXHR,textStatus) 6 | {modal_loading.remove();notice();}});});}); 7 | -------------------------------------------------------------------------------- /classes/critcss-inc/admin_settings_debug.php: -------------------------------------------------------------------------------- 1 | get_results( 11 | ' 12 | SELECT option_name AS name, 13 | option_value AS value 14 | FROM ' . $wpdb->options . ' 15 | WHERE option_name LIKE "autoptimize_%%" 16 | ORDER BY name 17 | ', 18 | ARRAY_A 19 | ); 20 | 21 | // Query AO's transients. 22 | $ao_trans = $wpdb->get_results( 23 | ' 24 | SELECT option_name AS name, 25 | option_value AS value 26 | FROM ' . $wpdb->options . ' 27 | WHERE option_name LIKE "_transient_autoptimize_%%" 28 | OR option_name LIKE "_transient_timeout_autoptimize_%%" 29 | ', 30 | ARRAY_A 31 | ); 32 | 33 | // Render debug panel if there's something to show. 34 | if ( $ao_options || $ao_trans ) { 35 | ?> 36 | 37 |
    38 |
  • 39 |

    40 | 41 | 45 |

    :

    46 | 47 | 50 | 51 | 54 | 68 | 69 | 72 |
    52 | 53 | 55 | " . wp_strip_all_tags( $option['value'] ) . "\n\nDecoded JSON:\n
    " . wp_strip_all_tags( $value ) . '
    '; 60 | } else { 61 | echo 'Empty'; 62 | } 63 | } else { 64 | echo wp_strip_all_tags( $option['value'] ); 65 | } 66 | ?> 67 |
    73 |
    74 | 78 |

    :

    79 |
    80 |
    81 |

    :

    82 |
    83 |
  • 84 |
85 | 86 | consumerKey = $consumerKey; 14 | $this->consumerSecret = $consumerSecret; 15 | } 16 | 17 | /** 18 | * Sign a URL using OAuth 1.0. 19 | * 20 | * @param string $url The URL to be signed. It may contain query parameters. 21 | * @param string $method HTTP method such as "GET", "POST" and so on. 22 | * @return string The signed URL. 23 | */ 24 | public function sign($url, $method = 'GET') { 25 | $parameters = array(); 26 | 27 | //Parse query parameters. 28 | $query = parse_url($url, PHP_URL_QUERY); 29 | if ( !empty($query) ) { 30 | parse_str($query, $parsedParams); 31 | if ( is_array($parameters) ) { 32 | $parameters = $parsedParams; 33 | } 34 | //Remove the query string from the URL. We'll replace it later. 35 | $url = substr($url, 0, strpos($url, '?')); 36 | } 37 | 38 | $parameters = array_merge( 39 | $parameters, 40 | array( 41 | 'oauth_consumer_key' => $this->consumerKey, 42 | 'oauth_nonce' => $this->nonce(), 43 | 'oauth_signature_method' => 'HMAC-SHA1', 44 | 'oauth_timestamp' => time(), 45 | 'oauth_version' => '1.0', 46 | ) 47 | ); 48 | unset($parameters['oauth_signature']); 49 | 50 | //Parameters must be sorted alphabetically before signing. 51 | ksort($parameters); 52 | 53 | //The most complicated part of the request - generating the signature. 54 | //The string to sign contains the HTTP method, the URL path, and all of 55 | //our query parameters. Everything is URL encoded. Then we concatenate 56 | //them with ampersands into a single string to hash. 57 | $encodedVerb = urlencode($method); 58 | $encodedUrl = urlencode($url); 59 | $encodedParams = urlencode(http_build_query($parameters, '', '&')); 60 | 61 | $stringToSign = $encodedVerb . '&' . $encodedUrl . '&' . $encodedParams; 62 | 63 | //Since we only have one OAuth token (the consumer secret) we only have 64 | //to use it as our HMAC key. However, we still have to append an & to it 65 | //as if we were using it with additional tokens. 66 | $secret = urlencode($this->consumerSecret) . '&'; 67 | 68 | //The signature is a hash of the consumer key and the base string. Note 69 | //that we have to get the raw output from hash_hmac and base64 encode 70 | //the binary data result. 71 | $parameters['oauth_signature'] = base64_encode(hash_hmac('sha1', $stringToSign, $secret, true)); 72 | 73 | return ($url . '?' . http_build_query($parameters)); 74 | } 75 | 76 | /** 77 | * Generate a random nonce. 78 | * 79 | * @return string 80 | */ 81 | private function nonce() { 82 | $mt = microtime(); 83 | 84 | $rand = null; 85 | if ( is_callable('random_bytes') ) { 86 | try { 87 | $rand = random_bytes(16); 88 | } catch (Exception $ex) { 89 | //Fall back to mt_rand (below). 90 | } 91 | } 92 | if ( $rand === null ) { 93 | $rand = mt_rand(); 94 | } 95 | 96 | return md5($mt . '_' . $rand); 97 | } 98 | } 99 | 100 | endif; 101 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/InstalledPackage.php: -------------------------------------------------------------------------------- 1 | updateChecker = $updateChecker; 18 | } 19 | 20 | /** 21 | * Get the currently installed version of the plugin or theme. 22 | * 23 | * @return string|null Version number. 24 | */ 25 | abstract public function getInstalledVersion(); 26 | 27 | /** 28 | * Get the full path of the plugin or theme directory (without a trailing slash). 29 | * 30 | * @return string 31 | */ 32 | abstract public function getAbsoluteDirectoryPath(); 33 | 34 | /** 35 | * Check whether a regular file exists in the package's directory. 36 | * 37 | * @param string $relativeFileName File name relative to the package directory. 38 | * @return bool 39 | */ 40 | public function fileExists($relativeFileName) { 41 | return is_file( 42 | $this->getAbsoluteDirectoryPath() 43 | . DIRECTORY_SEPARATOR 44 | . ltrim($relativeFileName, '/\\') 45 | ); 46 | } 47 | 48 | /* ------------------------------------------------------------------- 49 | * File header parsing 50 | * ------------------------------------------------------------------- 51 | */ 52 | 53 | /** 54 | * Parse plugin or theme metadata from the header comment. 55 | * 56 | * This is basically a simplified version of the get_file_data() function from /wp-includes/functions.php. 57 | * It's intended as a utility for subclasses that detect updates by parsing files in a VCS. 58 | * 59 | * @param string|null $content File contents. 60 | * @return string[] 61 | */ 62 | public function getFileHeader($content) { 63 | $content = (string)$content; 64 | 65 | //WordPress only looks at the first 8 KiB of the file, so we do the same. 66 | $content = substr($content, 0, 8192); 67 | //Normalize line endings. 68 | $content = str_replace("\r", "\n", $content); 69 | 70 | $headers = $this->getHeaderNames(); 71 | $results = array(); 72 | foreach ($headers as $field => $name) { 73 | $success = preg_match('/^[ \t\/*#@]*' . preg_quote($name, '/') . ':(.*)$/mi', $content, $matches); 74 | 75 | if ( ($success === 1) && $matches[1] ) { 76 | $value = $matches[1]; 77 | if ( function_exists('_cleanup_header_comment') ) { 78 | $value = _cleanup_header_comment($value); 79 | } 80 | $results[$field] = $value; 81 | } else { 82 | $results[$field] = ''; 83 | } 84 | } 85 | 86 | return $results; 87 | } 88 | 89 | /** 90 | * @return array Format: ['HeaderKey' => 'Header Name'] 91 | */ 92 | abstract protected function getHeaderNames(); 93 | 94 | /** 95 | * Get the value of a specific plugin or theme header. 96 | * 97 | * @param string $headerName 98 | * @return string Either the value of the header, or an empty string if the header doesn't exist. 99 | */ 100 | abstract public function getHeaderValue($headerName); 101 | 102 | } 103 | endif; 104 | -------------------------------------------------------------------------------- /classes/critcss-inc/admin_settings_explain.php: -------------------------------------------------------------------------------- 1 | 11 | 15 | 16 |
    17 |
    18 | ', '', '

    ', '

    ', '', '', '', '', '', '' ); 46 | } else { 47 | // we were able to fetch the explenation, so add the JS to show correct language. 48 | $ccss_explanation .= ""; 49 | } 50 | 51 | // and echo it. 52 | echo $ccss_explanation; 53 | ?> 54 |
    55 |
56 | >16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}"function"==typeof define&&define.amd?define(function(){return A}):"object"==typeof module&&module.exports?module.exports=A:n.md5=A}(this); 2 | //# sourceMappingURL=md5.min.js.map -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/Plugin/Update.php: -------------------------------------------------------------------------------- 1 | copyFields($object, $update); 61 | return $update; 62 | } 63 | 64 | /** 65 | * @return string[] 66 | */ 67 | protected function getFieldNames() { 68 | return array_merge(parent::getFieldNames(), self::$extraFields); 69 | } 70 | 71 | /** 72 | * Transform the update into the format used by WordPress native plugin API. 73 | * 74 | * @return object 75 | */ 76 | public function toWpFormat() { 77 | $update = parent::toWpFormat(); 78 | 79 | $update->id = $this->id; 80 | $update->url = $this->homepage; 81 | $update->tested = $this->tested; 82 | $update->plugin = $this->filename; 83 | 84 | if ( !empty($this->upgrade_notice) ) { 85 | $update->upgrade_notice = $this->upgrade_notice; 86 | } 87 | 88 | if ( !empty($this->icons) && is_array($this->icons) ) { 89 | //This should be an array with up to 4 keys: 'svg', '1x', '2x' and 'default'. 90 | //Docs: https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/#plugin-icons 91 | $icons = array_intersect_key( 92 | $this->icons, 93 | array('svg' => true, '1x' => true, '2x' => true, 'default' => true) 94 | ); 95 | if ( !empty($icons) ) { 96 | $update->icons = $icons; 97 | 98 | //It appears that the 'default' icon isn't used anywhere in WordPress 4.9, 99 | //but lets set it just in case a future release needs it. 100 | if ( !isset($update->icons['default']) ) { 101 | $update->icons['default'] = current($update->icons); 102 | } 103 | } 104 | } 105 | 106 | return $update; 107 | } 108 | } 109 | 110 | endif; 111 | -------------------------------------------------------------------------------- /classes/critcss-inc/admin_settings_key.php: -------------------------------------------------------------------------------- 1 | 18 | 19 | 30 |
    31 |
  • 32 |

    :

    33 | 40 | 41 |
    42 | 43 | 64 |
  • 65 |
66 | ' ).appendTo( 'body' ).show(); 32 | 33 | var success = function() { 34 | // Reset output values & class names of cache info 35 | jQuery( '#wp-admin-bar-autoptimize-cache-info .size' ).attr( 'class', 'size green' ).html( '0.00 B' ); 36 | jQuery( '#wp-admin-bar-autoptimize-cache-info .files' ).html( '0' ); 37 | jQuery( '#wp-admin-bar-autoptimize-cache-info .percentage .numbers' ).attr( 'class', 'numbers green' ).html( '0%' ); 38 | jQuery( '#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .fill' ).attr( 'class', 'fill bg-green' ); 39 | 40 | // Reset the class names of bullet icon 41 | jQuery( '#wp-admin-bar-autoptimize' ).attr( 'class', 'menupop bullet-green' ); 42 | 43 | // Reset the Radial Bar progress 44 | jQuery( '#wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .mask.full, #wp-admin-bar-autoptimize-cache-info .autoptimize-radial-bar .fill' ).css({ 45 | '-webkit-transform' : 'rotate(0deg)', 46 | '-ms-transform' : 'rotate(0deg)', 47 | 'transform' : 'rotate(0deg)' 48 | }); 49 | }; 50 | 51 | var notice = function() { 52 | jQuery( '

' + autoptimize_ajax_object.error_msg + '


' ).insertAfter( '#wpbody .wrap h1:first-of-type' ).show(); 53 | }; 54 | 55 | jQuery.ajax({ 56 | type : 'GET', 57 | url : autoptimize_ajax_object.ajaxurl, 58 | data : {'action':action, 'nonce':autoptimize_ajax_object.nonce}, 59 | dataType : 'json', 60 | cache : false, 61 | timeout : 9000, 62 | success : function( cleared ) 63 | { 64 | // Remove the Autoptimize Loading Modal 65 | modal_loading.remove(); 66 | if ( cleared ) { 67 | success(); 68 | } else { 69 | notice(); 70 | } 71 | }, 72 | error: function( jqXHR, textStatus ) 73 | { 74 | // Remove the Autoptimize Loading Modal 75 | modal_loading.remove(); 76 | 77 | // WordPress Admin Notice 78 | notice(); 79 | } 80 | }); 81 | }); 82 | }); 83 | -------------------------------------------------------------------------------- /classes/static/toolbar.min.css: -------------------------------------------------------------------------------- 1 | .autoptimize-loading{display:none;position:fixed;background-color:rgba(102,102,102,.8);background-image:url(loading.gif);background-position:center;background-repeat:no-repeat;top:0;left:0;width:100%;height:100%;z-index:9000000000}#wp-admin-bar-autoptimize .white{color:#eee}#wp-admin-bar-autoptimize .green{color:#26bd26}#wp-admin-bar-autoptimize .orange{color:#ec9103}#wp-admin-bar-autoptimize .red{color:#ea1919}#wp-admin-bar-autoptimize .bg-green{background:#26bd26}#wp-admin-bar-autoptimize .bg-orange{background:#ec9103}#wp-admin-bar-autoptimize .bg-red{background:#ea1919}#wp-admin-bar-autoptimize.bullet-green .ab-icon:before,#wp-admin-bar-autoptimize.bullet-green:hover .ab-icon:before{content:"\f159";color:#02ca02;font-size:14px}#wp-admin-bar-autoptimize.bullet-orange .ab-icon:before,#wp-admin-bar-autoptimize.bullet-orange:hover .ab-icon:before{content:"\f159";color:#ec9103;font-size:14px}#wp-admin-bar-autoptimize.bullet-red .ab-icon:before,#wp-admin-bar-autoptimize.bullet-red:hover .ab-icon:before{content:"\f159";color:#ea1919;font-size:14px;-webkit-animation:blink 1s step-end infinite;animation:blink 1s step-end infinite}@-webkit-keyframes blink{50%{visibility:hidden}}@keyframes blink{50%{visibility:hidden}}#wp-admin-bar-autoptimize table,#wp-admin-bar-autoptimize th,#wp-admin-bar-autoptimize td{border:0 !important}#wp-admin-bar-autoptimize-default{padding-top:0 !important}#wp-admin-bar-autoptimize-delete-cache .ab-item{cursor:pointer !important;background:#464b50}#wp-admin-bar-autoptimize-delete-cache .ab-item:hover{color:rgba(240,245,250,.85) !important;background:#b57373 !important}#wp-admin-bar-autoptimize-cache-info{padding-top:8px !important;padding-bottom:8px !important}#wp-admin-bar-autoptimize-cache-info,#wp-admin-bar-autoptimize-cache-info .ab-item{height:auto !important;cursor:default !important}#wp-admin-bar-autoptimize-cache-info td+td{padding-left:3px}#wp-admin-bar-autoptimize-cache-info .ab-item,#wp-admin-bar-autoptimize-cache-info .ab-item:hover{color:#b4b9be !important}#wp-admin-bar-autoptimize-cache-info .ab-item>p{display:block}#wp-admin-bar-autoptimize-cache-info .ab-item p,#wp-admin-bar-autoptimize-cache-info .ab-item td{font-size:11px !important;line-height:16px !important}#wp-admin-bar-autoptimize-cache-info .ab-item table{display:inline-block !important;margin-left:10px !important}.autoptimize-radial-bar{display:inline-block !important;margin-top:5px !important}.autoptimize-radial-bar,.autoptimize-radial-bar .mask,.autoptimize-radial-bar .fill,.autoptimize-radial-bar .shadow{width:36px !important;height:36px !important}.autoptimize-radial-bar{background-color:#d6dadc}.autoptimize-radial-bar .fill{background-color:#02ca02}.autoptimize-radial-bar .numbers{color:#02ca02}.autoptimize-radial-bar .mask{clip:rect(0px,36px,36px,18px)}.autoptimize-radial-bar .fill{clip:rect(0px,18px,36px,0px)}.autoptimize-radial-bar .inset{width:26px !important;height:26px !important;margin-left:5px !important;margin-top:5px !important;background-color:#32373c}.autoptimize-radial-bar .percentage{width:26px !important;height:16px !important;line-height:11px !important;top:7px !important;left:0 !important;overflow:hidden}.autoptimize-radial-bar .numbers{width:26px !important;font-weight:600 !important;font-size:9px !important;margin-top:-5px !important;display:inline-block;vertical-align:top;text-align:center}.autoptimize-radial-bar .inset{box-shadow:3px 3px 5px rgba(0,0,0,.3) !important}.autoptimize-radial-bar .shadow{box-shadow:3px 3px 5px rgba(0,0,0,.3) inset !important}.autoptimize-radial-bar .mask,.autoptimize-radial-bar .fill,.autoptimize-radial-bar .shadow,.autoptimize-radial-bar .inset,.autoptimize-radial-bar .percentage{position:absolute !important}.autoptimize-radial-bar,.autoptimize-radial-bar .mask,.autoptimize-radial-bar .fill,.autoptimize-radial-bar .shadow,.autoptimize-radial-bar .inset{border-radius:50% !important}#wp-admin-bar-autoptimize tr{border:0 !important}#wp-admin-bar-autoptimize td{background-color:#32373c !important} 2 | -------------------------------------------------------------------------------- /classes/external/js/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | /*jslint browser: true */ /*global jQuery: true */ 2 | 3 | /** 4 | * jQuery Cookie plugin 5 | * 6 | * Copyright (c) 2010 Klaus Hartl (stilbuero.de) 7 | * Dual licensed under the MIT and GPL licenses: 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * http://www.gnu.org/licenses/gpl.html 10 | * 11 | */ 12 | 13 | // TODO JsDoc 14 | 15 | /** 16 | * Create a cookie with the given key and value and other optional parameters. 17 | * 18 | * @example $.cookie('the_cookie', 'the_value'); 19 | * @desc Set the value of a cookie. 20 | * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); 21 | * @desc Create a cookie with all available options. 22 | * @example $.cookie('the_cookie', 'the_value'); 23 | * @desc Create a session cookie. 24 | * @example $.cookie('the_cookie', null); 25 | * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain 26 | * used when the cookie was set. 27 | * 28 | * @param String key The key of the cookie. 29 | * @param String value The value of the cookie. 30 | * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. 31 | * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. 32 | * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. 33 | * If set to null or omitted, the cookie will be a session cookie and will not be retained 34 | * when the the browser exits. 35 | * @option String path The value of the path attribute of the cookie (default: path of page that created the cookie). 36 | * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). 37 | * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will 38 | * require a secure protocol (like HTTPS). 39 | * @type undefined 40 | * 41 | * @name $.cookie 42 | * @cat Plugins/Cookie 43 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 44 | */ 45 | 46 | /** 47 | * Get the value of a cookie with the given key. 48 | * 49 | * @example $.cookie('the_cookie'); 50 | * @desc Get the value of a cookie. 51 | * 52 | * @param String key The key of the cookie. 53 | * @return The value of the cookie. 54 | * @type String 55 | * 56 | * @name $.cookie 57 | * @cat Plugins/Cookie 58 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 59 | */ 60 | jQuery.cookie = function (key, value, options) { 61 | 62 | // key and value given, set cookie... 63 | if (arguments.length > 1 && (value === null || typeof value !== "object")) { 64 | options = jQuery.extend({}, options); 65 | 66 | if (value === null) { 67 | options.expires = -1; 68 | } 69 | 70 | if (typeof options.expires === 'number') { 71 | var days = options.expires, t = options.expires = new Date(); 72 | t.setDate(t.getDate() + days); 73 | } 74 | 75 | return (document.cookie = [ 76 | encodeURIComponent(key), '=', 77 | options.raw ? String(value) : encodeURIComponent(String(value)), 78 | options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 79 | options.path ? '; path=' + options.path : '', 80 | options.domain ? '; domain=' + options.domain : '', 81 | options.secure ? '; secure' : '' 82 | ].join('')); 83 | } 84 | 85 | // key and possibly options given, get cookie... 86 | options = value || {}; 87 | var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; 88 | return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; 89 | }; 90 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/Metadata.php: -------------------------------------------------------------------------------- 1 | validateMetadata($apiResponse); 40 | if ( is_wp_error($valid) ){ 41 | do_action('puc_api_error', $valid); 42 | trigger_error($valid->get_error_message(), E_USER_NOTICE); 43 | return false; 44 | } 45 | 46 | foreach(get_object_vars($apiResponse) as $key => $value){ 47 | $target->$key = $value; 48 | } 49 | 50 | return true; 51 | } 52 | 53 | /** 54 | * No validation by default! Subclasses should check that the required fields are present. 55 | * 56 | * @param StdClass $apiResponse 57 | * @return bool|WP_Error 58 | */ 59 | protected function validateMetadata(/** @noinspection PhpUnusedParameterInspection */ $apiResponse) { 60 | return true; 61 | } 62 | 63 | /** 64 | * Create a new instance by copying the necessary fields from another object. 65 | * 66 | * @abstract 67 | * @param StdClass|self $object The source object. 68 | * @return self The new copy. 69 | */ 70 | public static function fromObject(/** @noinspection PhpUnusedParameterInspection */ $object) { 71 | throw new LogicException('The ' . __METHOD__ . ' method must be implemented by subclasses'); 72 | } 73 | 74 | /** 75 | * Create an instance of StdClass that can later be converted back to an 76 | * update or info container. Useful for serialization and caching, as it 77 | * avoids the "incomplete object" problem if the cached value is loaded 78 | * before this class. 79 | * 80 | * @return StdClass 81 | */ 82 | public function toStdClass() { 83 | $object = new stdClass(); 84 | $this->copyFields($this, $object); 85 | return $object; 86 | } 87 | 88 | /** 89 | * Transform the metadata into the format used by WordPress core. 90 | * 91 | * @return object 92 | */ 93 | abstract public function toWpFormat(); 94 | 95 | /** 96 | * Copy known fields from one object to another. 97 | * 98 | * @param StdClass|self $from 99 | * @param StdClass|self $to 100 | */ 101 | protected function copyFields($from, $to) { 102 | $fields = $this->getFieldNames(); 103 | 104 | if ( property_exists($from, 'slug') && !empty($from->slug) ) { 105 | //Let plugins add extra fields without having to create subclasses. 106 | $fields = apply_filters($this->getPrefixedFilter('retain_fields') . '-' . $from->slug, $fields); 107 | } 108 | 109 | foreach ($fields as $field) { 110 | if ( property_exists($from, $field) ) { 111 | $to->$field = $from->$field; 112 | } 113 | } 114 | } 115 | 116 | /** 117 | * @return string[] 118 | */ 119 | protected function getFieldNames() { 120 | return array(); 121 | } 122 | 123 | /** 124 | * @param string $tag 125 | * @return string 126 | */ 127 | protected function getPrefixedFilter($tag) { 128 | return 'puc_' . $tag; 129 | } 130 | } 131 | 132 | endif; 133 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/Vcs/ThemeUpdateChecker.php: -------------------------------------------------------------------------------- 1 | api = $api; 27 | $this->api->setHttpFilterName($this->getUniqueName('request_update_options')); 28 | 29 | parent::__construct($api->getRepositoryUrl(), $stylesheet, $customSlug, $checkPeriod, $optionName); 30 | 31 | $this->api->setSlug($this->slug); 32 | } 33 | 34 | public function requestUpdate() { 35 | $api = $this->api; 36 | $api->setLocalDirectory($this->package->getAbsoluteDirectoryPath()); 37 | 38 | $update = new Puc_v4p9_Theme_Update(); 39 | $update->slug = $this->slug; 40 | 41 | //Figure out which reference (tag or branch) we'll use to get the latest version of the theme. 42 | $updateSource = $api->chooseReference($this->branch); 43 | if ( $updateSource ) { 44 | $ref = $updateSource->name; 45 | $update->download_url = $updateSource->downloadUrl; 46 | } else { 47 | do_action( 48 | 'puc_api_error', 49 | new WP_Error( 50 | 'puc-no-update-source', 51 | 'Could not retrieve version information from the repository. ' 52 | . 'This usually means that the update checker either can\'t connect ' 53 | . 'to the repository or it\'s configured incorrectly.' 54 | ), 55 | null, null, $this->slug 56 | ); 57 | $ref = $this->branch; 58 | } 59 | 60 | //Get headers from the main stylesheet in this branch/tag. Its "Version" header and other metadata 61 | //are what the WordPress install will actually see after upgrading, so they take precedence over releases/tags. 62 | $remoteHeader = $this->package->getFileHeader($api->getRemoteFile('style.css', $ref)); 63 | $update->version = Puc_v4p9_Utils::findNotEmpty(array( 64 | $remoteHeader['Version'], 65 | Puc_v4p9_Utils::get($updateSource, 'version'), 66 | )); 67 | 68 | //The details URL defaults to the Theme URI header or the repository URL. 69 | $update->details_url = Puc_v4p9_Utils::findNotEmpty(array( 70 | $remoteHeader['ThemeURI'], 71 | $this->package->getHeaderValue('ThemeURI'), 72 | $this->metadataUrl, 73 | )); 74 | 75 | if ( empty($update->version) ) { 76 | //It looks like we didn't find a valid update after all. 77 | $update = null; 78 | } 79 | 80 | $update = $this->filterUpdateResult($update); 81 | return $update; 82 | } 83 | 84 | //FIXME: This is duplicated code. Both theme and plugin subclasses that use VCS share these methods. 85 | 86 | public function setBranch($branch) { 87 | $this->branch = $branch; 88 | return $this; 89 | } 90 | 91 | public function setAuthentication($credentials) { 92 | $this->api->setAuthentication($credentials); 93 | return $this; 94 | } 95 | 96 | public function getVcsApi() { 97 | return $this->api; 98 | } 99 | 100 | public function getUpdate() { 101 | $update = parent::getUpdate(); 102 | 103 | if ( isset($update) && !empty($update->download_url) ) { 104 | $update->download_url = $this->api->signDownloadUrl($update->download_url); 105 | } 106 | 107 | return $update; 108 | } 109 | 110 | public function onDisplayConfiguration($panel) { 111 | parent::onDisplayConfiguration($panel); 112 | $panel->row('Branch', $this->branch); 113 | $panel->row('Authentication enabled', $this->api->isAuthenticationEnabled() ? 'Yes' : 'No'); 114 | $panel->row('API client', get_class($this->api)); 115 | } 116 | } 117 | 118 | endif; 119 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/Plugin/Info.php: -------------------------------------------------------------------------------- 1 | sections = (array)$instance->sections; 58 | $instance->icons = (array)$instance->icons; 59 | 60 | return $instance; 61 | } 62 | 63 | /** 64 | * Very, very basic validation. 65 | * 66 | * @param StdClass $apiResponse 67 | * @return bool|WP_Error 68 | */ 69 | protected function validateMetadata($apiResponse) { 70 | if ( 71 | !isset($apiResponse->name, $apiResponse->version) 72 | || empty($apiResponse->name) 73 | || empty($apiResponse->version) 74 | ) { 75 | return new WP_Error( 76 | 'puc-invalid-metadata', 77 | "The plugin metadata file does not contain the required 'name' and/or 'version' keys." 78 | ); 79 | } 80 | return true; 81 | } 82 | 83 | 84 | /** 85 | * Transform plugin info into the format used by the native WordPress.org API 86 | * 87 | * @return object 88 | */ 89 | public function toWpFormat(){ 90 | $info = new stdClass; 91 | 92 | //The custom update API is built so that many fields have the same name and format 93 | //as those returned by the native WordPress.org API. These can be assigned directly. 94 | $sameFormat = array( 95 | 'name', 'slug', 'version', 'requires', 'tested', 'rating', 'upgrade_notice', 96 | 'num_ratings', 'downloaded', 'active_installs', 'homepage', 'last_updated', 97 | ); 98 | foreach($sameFormat as $field){ 99 | if ( isset($this->$field) ) { 100 | $info->$field = $this->$field; 101 | } else { 102 | $info->$field = null; 103 | } 104 | } 105 | 106 | //Other fields need to be renamed and/or transformed. 107 | $info->download_link = $this->download_url; 108 | $info->author = $this->getFormattedAuthor(); 109 | $info->sections = array_merge(array('description' => ''), $this->sections); 110 | 111 | if ( !empty($this->banners) ) { 112 | //WP expects an array with two keys: "high" and "low". Both are optional. 113 | //Docs: https://wordpress.org/plugins/about/faq/#banners 114 | $info->banners = is_object($this->banners) ? get_object_vars($this->banners) : $this->banners; 115 | $info->banners = array_intersect_key($info->banners, array('high' => true, 'low' => true)); 116 | } 117 | 118 | return $info; 119 | } 120 | 121 | protected function getFormattedAuthor() { 122 | if ( !empty($this->author_homepage) ){ 123 | /** @noinspection HtmlUnknownTarget */ 124 | return sprintf('%s', $this->author_homepage, $this->author); 125 | } 126 | return $this->author; 127 | } 128 | } 129 | 130 | endif; 131 | -------------------------------------------------------------------------------- /autoptimize.php: -------------------------------------------------------------------------------- 1 | setBranch( 'beta' ); 39 | } 40 | 41 | // Bail early if attempting to run on non-supported php versions. 42 | if ( version_compare( PHP_VERSION, '5.6', '<' ) ) { 43 | function autoptimize_incompatible_admin_notice() { 44 | echo '

' . esc_html__( 'Autoptimize requires PHP 5.6 (or higher) to function properly. Please upgrade PHP. The Plugin has been auto-deactivated.', 'autoptimize' ) . '

'; 45 | if ( isset( $_GET['activate'] ) ) { 46 | unset( $_GET['activate'] ); 47 | } 48 | } 49 | function autoptimize_deactivate_self() { 50 | deactivate_plugins( plugin_basename( AUTOPTIMIZE_PLUGIN_FILE ) ); 51 | } 52 | add_action( 'admin_notices', 'autoptimize_incompatible_admin_notice' ); 53 | add_action( 'admin_init', 'autoptimize_deactivate_self' ); 54 | return; 55 | } 56 | 57 | function autoptimize_autoload( $class_name ) { 58 | if ( in_array( $class_name, array( 'AO_Minify_HTML', 'JSMin' ) ) ) { 59 | $file = strtolower( $class_name ); 60 | $file = str_replace( '_', '-', $file ); 61 | $path = dirname( __FILE__ ) . '/classes/external/php/'; 62 | $filepath = $path . $file . '.php'; 63 | } elseif ( false !== strpos( $class_name, 'Autoptimize\\tubalmartin\\CssMin' ) ) { 64 | $file = str_replace( 'Autoptimize\\tubalmartin\\CssMin\\', '', $class_name ); 65 | $path = dirname( __FILE__ ) . '/classes/external/php/yui-php-cssmin-bundled/'; 66 | $filepath = $path . $file . '.php'; 67 | } elseif ( 'autoptimize' === substr( $class_name, 0, 11 ) ) { 68 | // One of our "old" classes. 69 | $file = $class_name; 70 | $path = dirname( __FILE__ ) . '/classes/'; 71 | $filepath = $path . $file . '.php'; 72 | } elseif ( 'PAnD' === $class_name ) { 73 | $file = 'persist-admin-notices-dismissal'; 74 | $path = dirname( __FILE__ ) . '/classes/external/php/persist-admin-notices-dismissal/'; 75 | $filepath = $path . $file . '.php'; 76 | } 77 | 78 | // If we didn't match one of our rules, bail! 79 | if ( ! isset( $filepath ) || ! is_readable( $filepath ) ) { 80 | return; 81 | } 82 | 83 | require $filepath; 84 | } 85 | 86 | spl_autoload_register( 'autoptimize_autoload' ); 87 | 88 | // Load WP CLI command(s) on demand. 89 | if ( defined( 'WP_CLI' ) && WP_CLI ) { 90 | require AUTOPTIMIZE_PLUGIN_DIR . 'classes/autoptimizeCLI.php'; 91 | } 92 | 93 | // filter to disable AO both on front- and backend. 94 | if ( apply_filters( 'autoptimize_filter_disable_plugin', false ) ) { 95 | return; 96 | } 97 | 98 | /** 99 | * Retrieve the instance of the main plugin class. 100 | * 101 | * @return autoptimizeMain 102 | */ 103 | function autoptimize() { 104 | static $plugin = null; 105 | 106 | if ( null === $plugin ) { 107 | $plugin = new autoptimizeMain( AUTOPTIMIZE_PLUGIN_VERSION, AUTOPTIMIZE_PLUGIN_FILE ); 108 | } 109 | 110 | return $plugin; 111 | } 112 | 113 | autoptimize()->run(); 114 | -------------------------------------------------------------------------------- /classes/external/php/yui-php-cssmin-bundled/Utils.php: -------------------------------------------------------------------------------- 1 | 1 ? $vh - 1 : $vh); 68 | 69 | if ($vh * 6 < 1) { 70 | return $v1 + ($v2 - $v1) * 6 * $vh; 71 | } 72 | 73 | if ($vh * 2 < 1) { 74 | return $v2; 75 | } 76 | 77 | if ($vh * 3 < 2) { 78 | return $v1 + ($v2 - $v1) * ((2 / 3) - $vh) * 6; 79 | } 80 | 81 | return $v1; 82 | } 83 | 84 | /** 85 | * Convert strings like "64M" or "30" to int values 86 | * @param mixed $size 87 | * @return int 88 | */ 89 | public static function normalizeInt($size) 90 | { 91 | if (is_string($size)) { 92 | $letter = substr($size, -1); 93 | $size = intval($size); 94 | switch ($letter) { 95 | case 'M': 96 | case 'm': 97 | return (int) $size * 1048576; 98 | case 'K': 99 | case 'k': 100 | return (int) $size * 1024; 101 | case 'G': 102 | case 'g': 103 | return (int) $size * 1073741824; 104 | } 105 | } 106 | return (int) $size; 107 | } 108 | 109 | /** 110 | * Converts a string containing and RGB percentage value into a RGB integer value i.e. '90%' -> 229.5 111 | * @param $rgbPercentage 112 | * @return int 113 | */ 114 | public static function rgbPercentageToRgbInteger($rgbPercentage) 115 | { 116 | if (strpos($rgbPercentage, '%') !== false) { 117 | $rgbPercentage = self::roundNumber(floatval(str_replace('%', '', $rgbPercentage)) * 2.55); 118 | } 119 | 120 | return intval($rgbPercentage, 10); 121 | } 122 | 123 | /** 124 | * Converts a RGB color into a HEX color 125 | * @param array $rgbColors 126 | * @return array 127 | */ 128 | public static function rgbToHex($rgbColors) 129 | { 130 | $hexColors = array(); 131 | 132 | // Values outside the sRGB color space should be clipped (0-255) 133 | for ($i = 0, $l = count($rgbColors); $i < $l; $i++) { 134 | $hexColors[$i] = sprintf("%02x", self::clampNumberSrgb(self::rgbPercentageToRgbInteger($rgbColors[$i]))); 135 | } 136 | 137 | return $hexColors; 138 | } 139 | 140 | /** 141 | * Rounds a number to its closest integer 142 | * @param $n 143 | * @return int 144 | */ 145 | public static function roundNumber($n) 146 | { 147 | return intval(round(floatval($n)), 10); 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /classes/external/php/persist-admin-notices-dismissal/persist-admin-notices-dismissal.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | * @package Persist Admin notices Dismissal 22 | * @author Collins Agbonghama 23 | * @author Andy Fragen 24 | * @license http://www.gnu.org/licenses GNU General Public License 25 | * @version 1.4.1 26 | */ 27 | 28 | /** 29 | * Exit if called directly. 30 | */ 31 | if ( ! defined( 'ABSPATH' ) ) { 32 | die; 33 | } 34 | 35 | if ( ! class_exists( 'PAnD' ) ) { 36 | 37 | /** 38 | * Class PAnD 39 | */ 40 | class PAnD { 41 | 42 | /** 43 | * Init hooks. 44 | */ 45 | public static function init() { 46 | add_action( 'admin_enqueue_scripts', array( __CLASS__, 'load_script' ) ); 47 | add_action( 'wp_ajax_dismiss_admin_notice', array( __CLASS__, 'dismiss_admin_notice' ) ); 48 | } 49 | 50 | /** 51 | * Enqueue javascript and variables. 52 | */ 53 | public static function load_script() { 54 | 55 | if ( is_customize_preview() ) { 56 | return; 57 | } 58 | 59 | wp_enqueue_script( 60 | 'dismissible-notices', 61 | plugins_url( 'dismiss-notice.js', __FILE__ ), 62 | array( 'jquery', 'common' ), 63 | false, 64 | true 65 | ); 66 | 67 | wp_localize_script( 68 | 'dismissible-notices', 69 | 'dismissible_notice', 70 | array( 71 | 'nonce' => wp_create_nonce( 'dismissible-notice' ), 72 | ) 73 | ); 74 | } 75 | 76 | /** 77 | * Handles Ajax request to persist notices dismissal. 78 | * Uses check_ajax_referer to verify nonce. 79 | */ 80 | public static function dismiss_admin_notice() { 81 | $option_name = sanitize_text_field( $_POST['option_name'] ); 82 | $dismissible_length = sanitize_text_field( $_POST['dismissible_length'] ); 83 | 84 | if ( 'forever' != $dismissible_length ) { 85 | // If $dismissible_length is not an integer default to 1 86 | $dismissible_length = ( 0 == absint( $dismissible_length ) ) ? 1 : $dismissible_length; 87 | $dismissible_length = strtotime( absint( $dismissible_length ) . ' days' ); 88 | } 89 | 90 | check_ajax_referer( 'dismissible-notice', 'nonce' ); 91 | self::set_admin_notice_cache( $option_name, $dismissible_length ); 92 | wp_die(); 93 | } 94 | 95 | /** 96 | * Is admin notice active? 97 | * 98 | * @param string $arg data-dismissible content of notice. 99 | * 100 | * @return bool 101 | */ 102 | public static function is_admin_notice_active( $arg ) { 103 | $array = explode( '-', $arg ); 104 | $length = array_pop( $array ); 105 | $option_name = implode( '-', $array ); 106 | $db_record = self::get_admin_notice_cache( $option_name ); 107 | if ( 'forever' == $db_record ) { 108 | return false; 109 | } elseif ( absint( $db_record ) >= time() ) { 110 | return false; 111 | } else { 112 | return true; 113 | } 114 | } 115 | 116 | /** 117 | * Returns admin notice cached timeout. 118 | * 119 | * @access public 120 | * 121 | * @param string|bool $id admin notice name or false. 122 | * 123 | * @return array|bool The timeout. False if expired. 124 | */ 125 | public static function get_admin_notice_cache( $id = false ) { 126 | if ( ! $id ) { 127 | return false; 128 | } 129 | $cache_key = 'pand-' . md5( $id ); 130 | $timeout = get_site_option( $cache_key ); 131 | $timeout = 'forever' === $timeout ? time() + 60 : $timeout; 132 | 133 | if ( empty( $timeout ) || time() > $timeout ) { 134 | return false; 135 | } 136 | 137 | return $timeout; 138 | } 139 | 140 | /** 141 | * Sets admin notice timeout in site option. 142 | * 143 | * @access public 144 | * 145 | * @param string $id Data Identifier. 146 | * @param string|bool $timeout Timeout for admin notice. 147 | * 148 | * @return bool 149 | */ 150 | public static function set_admin_notice_cache( $id, $timeout ) { 151 | $cache_key = 'pand-' . md5( $id ); 152 | update_site_option( $cache_key, $timeout ); 153 | 154 | return true; 155 | } 156 | 157 | } 158 | 159 | } 160 | -------------------------------------------------------------------------------- /classes/autoptimizeSpeedupper.php: -------------------------------------------------------------------------------- 1 | add_hooks(); 16 | } 17 | 18 | public function add_hooks() 19 | { 20 | if ( apply_filters( 'autoptimize_js_do_minify', true ) ) { 21 | add_filter( 'autoptimize_js_individual_script', array( $this, 'js_snippetcacher' ), 10, 2 ); 22 | add_filter( 'autoptimize_js_after_minify', array( $this, 'js_cleanup' ), 10, 1 ); 23 | } 24 | if ( apply_filters( 'autoptimize_css_do_minify', true ) ) { 25 | add_filter( 'autoptimize_css_individual_style', array( $this, 'css_snippetcacher' ), 10, 2 ); 26 | add_filter( 'autoptimize_css_after_minify', array( $this, 'css_cleanup' ), 10, 1 ); 27 | } 28 | } 29 | 30 | public function js_snippetcacher( $jsin, $jsfilename ) 31 | { 32 | $md5hash = 'snippet_' . md5( $jsin ); 33 | $ccheck = new autoptimizeCache( $md5hash, 'js' ); 34 | if ( $ccheck->check() ) { 35 | $scriptsrc = $ccheck->retrieve(); 36 | } else { 37 | if ( false === ( strpos( $jsfilename, 'min.js' ) ) && ( str_replace( apply_filters( 'autoptimize_filter_js_consider_minified', false ), '', $jsfilename ) === $jsfilename ) ) { 38 | $tmp_jscode = trim( JSMin::minify( $jsin ) ); 39 | if ( ! empty( $tmp_jscode ) ) { 40 | $scriptsrc = $tmp_jscode; 41 | unset( $tmp_jscode ); 42 | } else { 43 | $scriptsrc = $jsin; 44 | } 45 | } else { 46 | // Removing comments, linebreaks and stuff! 47 | $scriptsrc = preg_replace( '#^\s*\/\/.*$#Um', '', $jsin ); 48 | $scriptsrc = preg_replace( '#^\s*\/\*[^!].*\*\/\s?#Us', '', $scriptsrc ); 49 | $scriptsrc = preg_replace( "#(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+#", "\n", $scriptsrc ); 50 | } 51 | 52 | $last_char = substr( $scriptsrc, -1, 1 ); 53 | if ( ';' !== $last_char && '}' !== $last_char ) { 54 | $scriptsrc .= ';'; 55 | } 56 | 57 | if ( ! empty( $jsfilename ) && str_replace( apply_filters( 'autoptimize_filter_js_speedup_cache', false ), '', $jsfilename ) === $jsfilename ) { 58 | // Don't cache inline CSS or if filter says no! 59 | $ccheck->cache( $scriptsrc, 'text/javascript' ); 60 | } 61 | } 62 | unset( $ccheck ); 63 | 64 | return $scriptsrc; 65 | } 66 | 67 | public function css_snippetcacher( $cssin, $cssfilename ) 68 | { 69 | $md5hash = 'snippet_' . md5( $cssin ); 70 | $ccheck = new autoptimizeCache( $md5hash, 'css' ); 71 | if ( $ccheck->check() ) { 72 | $stylesrc = $ccheck->retrieve(); 73 | } else { 74 | if ( ( false === strpos( $cssfilename, 'min.css' ) ) && ( str_replace( apply_filters( 'autoptimize_filter_css_consider_minified', false ), '', $cssfilename ) === $cssfilename ) ) { 75 | $cssmin = new autoptimizeCSSmin(); 76 | $tmp_code = trim( $cssmin->run( $cssin ) ); 77 | 78 | if ( ! empty( $tmp_code ) ) { 79 | $stylesrc = $tmp_code; 80 | unset( $tmp_code ); 81 | } else { 82 | $stylesrc = $cssin; 83 | } 84 | } else { 85 | // .min.css -> no heavy-lifting, just some cleanup! 86 | $stylesrc = preg_replace( '#^\s*\/\*[^!].*\*\/\s?#Us', '', $cssin ); 87 | $stylesrc = preg_replace( "#(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+#", "\n", $stylesrc ); 88 | $stylesrc = autoptimizeStyles::fixurls( $cssfilename, $stylesrc ); 89 | } 90 | if ( ! empty( $cssfilename ) && ( str_replace( apply_filters( 'autoptimize_filter_css_speedup_cache', false ), '', $cssfilename ) === $cssfilename ) ) { 91 | // Only caching CSS if it's not inline and is allowed by filter! 92 | $ccheck->cache( $stylesrc, 'text/css' ); 93 | } 94 | } 95 | unset( $ccheck ); 96 | 97 | return $stylesrc; 98 | } 99 | 100 | public function css_cleanup( $cssin ) 101 | { 102 | // Speedupper results in aggregated CSS not being minified, so the filestart-marker AO adds when aggregating needs to be removed. 103 | return trim( str_replace( array( '/*FILESTART*/', '/*FILESTART2*/' ), '', $cssin ) ); 104 | } 105 | 106 | public function js_cleanup( $jsin ) 107 | { 108 | return trim( $jsin ); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /classes/static/exit-survey/exit-survey.css: -------------------------------------------------------------------------------- 1 | 2 | tr[data-slug="autoptimize"] span.deactivate{ 3 | position: relative; 4 | } 5 | 6 | .ao-feedback { 7 | background: #fff; 8 | max-width: 400px; 9 | z-index: 10000; 10 | box-shadow: 0 0 15px -5px rgba(0, 0, 0, .5); 11 | transition: all .3s ease-out; 12 | } 13 | 14 | 15 | .ao-feedback .popup--header { 16 | position: relative; 17 | background-color: #e5e5e5; 18 | } 19 | 20 | .ao-feedback .popup--header h5 { 21 | margin: 0; 22 | font-size: 16px; 23 | padding: 10px 15px; 24 | color: #222; 25 | font-weight: 900; 26 | text-align: left; 27 | } 28 | 29 | .ao-feedback .popup--body { 30 | padding: 15px; 31 | padding-top: 5px; 32 | } 33 | 34 | .ao-feedback .popup--form { 35 | margin: 0; 36 | font-size: 13px; 37 | padding-top: 10px; 38 | } 39 | 40 | .ao-feedback .popup--form input[type="radio"] { 41 | margin: 0 10px 0 0; 42 | } 43 | 44 | .ao-feedback .popup--form input[type="radio"]:checked ~ textarea { 45 | display: block; 46 | } 47 | 48 | .ao-feedback .popup--form textarea { 49 | width: 100%; 50 | margin: 10px 0 0; 51 | display: none; 52 | max-height: 150px; 53 | } 54 | 55 | .ao-feedback .popup--form input[type='email'] { 56 | width: 100%; 57 | margin: 10px 0 0; 58 | } 59 | 60 | .ao-feedback .popup--form input[type='email']:invalid { 61 | color:red; 62 | border-color:red; 63 | } 64 | 65 | .ao-feedback .popup--form p.last-attempt { 66 | display: none; 67 | } 68 | 69 | .ao-feedback li { 70 | display: flex; 71 | align-items: center; 72 | margin-bottom: 15px; 73 | flex-wrap: wrap; 74 | } 75 | 76 | .ao-feedback li label { 77 | max-width: 90%; 78 | } 79 | 80 | .ao-feedback li:last-child { 81 | margin-bottom: 0; 82 | } 83 | 84 | .ao-feedback .popup--footer { 85 | padding: 0 15px 15px; 86 | } 87 | 88 | .ao-feedback .actions { 89 | display: flex; 90 | flex-wrap: wrap; 91 | } 92 | 93 | .info-disclosure-link { 94 | width: 100%; 95 | margin-bottom: 15px; 96 | } 97 | 98 | .ao-feedback .info-disclosure-content { 99 | max-height: 0; 100 | overflow: hidden; 101 | width: 100%; 102 | transition: .3s ease; 103 | } 104 | 105 | .ao-feedback .info-disclosure-content.active { 106 | max-height: 300px; 107 | } 108 | 109 | .ao-feedback .info-disclosure-content p { 110 | margin: 0; 111 | } 112 | 113 | .ao-feedback .info-disclosure-content ul { 114 | margin: 10px 0; 115 | border-radius: 3px; 116 | } 117 | 118 | .ao-feedback .info-disclosure-content ul li { 119 | display: flex; 120 | align-items: center; 121 | justify-content: space-between; 122 | margin-bottom: 0; 123 | padding: 5px 0; 124 | border-bottom: 1px solid #ccc; 125 | } 126 | 127 | .ao-feedback .buttons { 128 | display: flex; 129 | width: 100%; 130 | } 131 | 132 | .ao-feedback .buttons input:nth-child(2) { 133 | margin: auto; 134 | } 135 | 136 | .ao-feedback .buttons input:last-child { 137 | margin-left: auto; 138 | } 139 | 140 | .ao-plugin-uninstall-feedback-popup .popup--header:before { 141 | content: ""; 142 | display: block; 143 | position: absolute; 144 | border: 20px solid #e5e5e5; 145 | left: -10px; 146 | top: 50%; 147 | border-top: 20px solid transparent; 148 | border-bottom: 20px solid transparent; 149 | border-left: 0; 150 | transform: translateY(-50%); 151 | } 152 | 153 | .ao-plugin-uninstall-feedback-popup { 154 | display: none; 155 | position: absolute; 156 | white-space: normal; 157 | width: 400px; 158 | left: 122%; 159 | top: -21px; 160 | } 161 | 162 | .ao-plugin-uninstall-feedback-popup.sending-feedback .popup--body i { 163 | animation: rotation 2s infinite linear; 164 | display: block; 165 | float: none; 166 | align-items: center; 167 | width: 100%; 168 | margin: 0 auto; 169 | height: 100%; 170 | background: transparent; 171 | padding: 0; 172 | } 173 | 174 | .ao-plugin-uninstall-feedback-popup.sending-feedback .popup--body i:before { 175 | padding: 0; 176 | background: transparent; 177 | box-shadow: none; 178 | color: #b4b9be 179 | } 180 | 181 | 182 | .ao-plugin-uninstall-feedback-popup.active { 183 | display: block; 184 | } 185 | 186 | body.ao-feedback-open .ao-feedback-overlay { 187 | content: ""; 188 | display: block; 189 | background-color: rgba(0, 0, 0, 0.5); 190 | top: 0; 191 | bottom: 0; 192 | right: 0; 193 | left: 0; 194 | z-index: 10000; 195 | position: fixed; 196 | } 197 | 198 | @media (max-width: 768px) { 199 | .ao-plugin-uninstall-feedback-popup { 200 | position: fixed; 201 | max-width: 100%; 202 | margin: 0 auto; 203 | left: 50%; 204 | top: 50px; 205 | transform: translateX(-50%); 206 | } 207 | 208 | .ao-plugin-uninstall-feedback-popup .popup--header:before { 209 | display: none; 210 | } 211 | } 212 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/Theme/UpdateChecker.php: -------------------------------------------------------------------------------- 1 | stylesheet = $stylesheet; 20 | 21 | parent::__construct( 22 | $metadataUrl, 23 | $stylesheet, 24 | $customSlug ? $customSlug : $stylesheet, 25 | $checkPeriod, 26 | $optionName 27 | ); 28 | } 29 | 30 | /** 31 | * For themes, the update array is indexed by theme directory name. 32 | * 33 | * @return string 34 | */ 35 | protected function getUpdateListKey() { 36 | return $this->directoryName; 37 | } 38 | 39 | /** 40 | * Retrieve the latest update (if any) from the configured API endpoint. 41 | * 42 | * @return Puc_v4p9_Update|null An instance of Update, or NULL when no updates are available. 43 | */ 44 | public function requestUpdate() { 45 | list($themeUpdate, $result) = $this->requestMetadata('Puc_v4p9_Theme_Update', 'request_update'); 46 | 47 | if ( $themeUpdate !== null ) { 48 | /** @var Puc_v4p9_Theme_Update $themeUpdate */ 49 | $themeUpdate->slug = $this->slug; 50 | } 51 | 52 | $themeUpdate = $this->filterUpdateResult($themeUpdate, $result); 53 | return $themeUpdate; 54 | } 55 | 56 | public function userCanInstallUpdates() { 57 | return current_user_can('update_themes'); 58 | } 59 | 60 | /** 61 | * Create an instance of the scheduler. 62 | * 63 | * @param int $checkPeriod 64 | * @return Puc_v4p9_Scheduler 65 | */ 66 | protected function createScheduler($checkPeriod) { 67 | return new Puc_v4p9_Scheduler($this, $checkPeriod, array('load-themes.php')); 68 | } 69 | 70 | /** 71 | * Is there an update being installed right now for this theme? 72 | * 73 | * @param WP_Upgrader|null $upgrader The upgrader that's performing the current update. 74 | * @return bool 75 | */ 76 | public function isBeingUpgraded($upgrader = null) { 77 | return $this->upgraderStatus->isThemeBeingUpgraded($this->stylesheet, $upgrader); 78 | } 79 | 80 | protected function createDebugBarExtension() { 81 | return new Puc_v4p9_DebugBar_Extension($this, 'Puc_v4p9_DebugBar_ThemePanel'); 82 | } 83 | 84 | /** 85 | * Register a callback for filtering query arguments. 86 | * 87 | * The callback function should take one argument - an associative array of query arguments. 88 | * It should return a modified array of query arguments. 89 | * 90 | * @param callable $callback 91 | * @return void 92 | */ 93 | public function addQueryArgFilter($callback){ 94 | $this->addFilter('request_update_query_args', $callback); 95 | } 96 | 97 | /** 98 | * Register a callback for filtering arguments passed to wp_remote_get(). 99 | * 100 | * The callback function should take one argument - an associative array of arguments - 101 | * and return a modified array or arguments. See the WP documentation on wp_remote_get() 102 | * for details on what arguments are available and how they work. 103 | * 104 | * @uses add_filter() This method is a convenience wrapper for add_filter(). 105 | * 106 | * @param callable $callback 107 | * @return void 108 | */ 109 | public function addHttpRequestArgFilter($callback) { 110 | $this->addFilter('request_update_options', $callback); 111 | } 112 | 113 | /** 114 | * Register a callback for filtering theme updates retrieved from the external API. 115 | * 116 | * The callback function should take two arguments. If the theme update was retrieved 117 | * successfully, the first argument passed will be an instance of Theme_Update. Otherwise, 118 | * it will be NULL. The second argument will be the corresponding return value of 119 | * wp_remote_get (see WP docs for details). 120 | * 121 | * The callback function should return a new or modified instance of Theme_Update or NULL. 122 | * 123 | * @uses add_filter() This method is a convenience wrapper for add_filter(). 124 | * 125 | * @param callable $callback 126 | * @return void 127 | */ 128 | public function addResultFilter($callback) { 129 | $this->addFilter('request_update_result', $callback, 10, 2); 130 | } 131 | 132 | /** 133 | * Create a package instance that represents this plugin or theme. 134 | * 135 | * @return Puc_v4p9_InstalledPackage 136 | */ 137 | protected function createInstalledPackage() { 138 | return new Puc_v4p9_Theme_Package($this->stylesheet, $this); 139 | } 140 | } 141 | 142 | endif; 143 | -------------------------------------------------------------------------------- /classes/external/php/persist-admin-notices-dismissal/README.md: -------------------------------------------------------------------------------- 1 | # Persist Admin notice Dismissals 2 | [![Latest Stable Version](https://poser.pugx.org/collizo4sky/persist-admin-notices-dismissal/v/stable)](https://packagist.org/packages/collizo4sky/persist-admin-notices-dismissal) 3 | [![Total Downloads](https://poser.pugx.org/collizo4sky/persist-admin-notices-dismissal/downloads)](https://packagist.org/packages/collizo4sky/persist-admin-notices-dismissal) 4 | 5 | Simple framework library that persists the dismissal of admin notices across pages in WordPress dashboard. 6 | 7 | ## Installation 8 | 9 | Run `composer require collizo4sky/persist-admin-notices-dismissal` 10 | 11 | Alternatively, clone or download this repo into the `vendor/` folder in your plugin, and include/require the `persist-admin-notices-dismissal.php` file like so 12 | 13 | ```php 14 | require __DIR__ . '/vendor/persist-admin-notices-dismissal/persist-admin-notices-dismissal.php'; 15 | add_action( 'admin_init', array( 'PAnD', 'init' ) ); 16 | ``` 17 | 18 | or let Composer's autoloader do the work. 19 | 20 | ## How to Use 21 | Firstly, install and activate this library within a plugin. 22 | 23 | Say you have the following markup as your admin notice, 24 | 25 | 26 | ```php 27 | function sample_admin_notice__success() { 28 | ?> 29 |
30 |

31 |
32 | 47 |
48 |

49 |
50 | 84 |
85 |

86 |
87 | 96 |
97 |

98 |
99 | base_prefix . 'sitemeta' : $wpdb->base_prefix . 'options'; 112 | $column = is_multisite() ? 'meta_key' : 'option_name'; 113 | $delete_string = 'DELETE FROM ' . $table . ' WHERE ' . $column . ' LIKE %s LIMIT 1000'; 114 | $wpdb->query( $wpdb->prepare( $delete_string, array( '%pand-%' ) ) ); 115 | ``` 116 | 117 | Cool beans. Isn't it? 118 | -------------------------------------------------------------------------------- /classes/critcss-inc/css/admin_styles.css: -------------------------------------------------------------------------------- 1 | /* form */ 2 | .itemTitle { 3 | margin: 0; 4 | } 5 | .itemTitle.fleft { 6 | float: left; 7 | } 8 | .toggle-btn { 9 | float: right; 10 | position: relative; 11 | top: -10px; 12 | width: 36px; 13 | height: 36px; 14 | margin: 0; 15 | padding: 0; 16 | border: 0; 17 | background: 0 0; 18 | cursor: pointer; 19 | outline: none; 20 | } 21 | .toggle-indicator { 22 | color: #72777c; 23 | display: inline-block; 24 | -webkit-font-smoothing: antialiased; 25 | -moz-osx-font-smoothing: grayscale; 26 | text-decoration: none!important; 27 | outline: none; 28 | } 29 | .itemDetail { 30 | background: #fff; 31 | border: 1px solid #ccc; 32 | padding: 15px; 33 | margin: 15px 10px 10px 0; 34 | min-height: 15px; 35 | word-break: break-word; 36 | } 37 | .collapsible { 38 | clear: both; 39 | } 40 | .howto { 41 | margin: 10px 0 0; 42 | padding: 2px 10px; 43 | min-height: 45px; 44 | font-style: normal; 45 | border-left: solid; 46 | border-left-width: 5px; 47 | border-left-color: #00a0d2; 48 | background-color: white; 49 | } 50 | .howto .title-wrap { 51 | float: left; 52 | margin: 5px 0 15px; 53 | } 54 | .howto .title { 55 | margin: 0; 56 | } 57 | .howto .subtitle { 58 | margin: 0; 59 | padding: 0; 60 | font-weight: 100; 61 | font-style: italic; 62 | color: #72777c; 63 | } 64 | .howto .toggle-btn { 65 | top: -4px; 66 | left: 10px; 67 | } 68 | .howto-wrap { 69 | clear: both; 70 | width: 100%; 71 | } 72 | .form-table { 73 | margin-top: 20px; 74 | } 75 | .form-table tr { 76 | vertical-align: top; 77 | } 78 | .form-table p.notes, 79 | .form-table p code { 80 | font-size: 12px !important; 81 | } 82 | .form-table p.notes { 83 | color: #666; 84 | } 85 | .form-table.rules { 86 | margin-top: 0; 87 | } 88 | .form-table.rules th { 89 | width: 175px; 90 | } 91 | .ui-dialog .form-table.rules th, 92 | .ui-dialog .form-table.rules td { 93 | padding: 5px 0px; 94 | } 95 | .rules-list { 96 | width: 100%; 97 | margin-bottom: 10px; 98 | } 99 | .rules-list tr.header th { 100 | background-color: #f1f1f1; 101 | } 102 | .rules-list tbody .rule:nth-child(even) td { 103 | background-color: #f9f9f9; 104 | } 105 | #rules-list, 106 | #queue { 107 | margin-bottom: 20px; 108 | } 109 | #rules-list h4 { 110 | margin: 20px 0 10px; 111 | font-size: 1.2em; 112 | } 113 | #rules-list .header th, 114 | #rules-list .rule td { 115 | padding: 4px; 116 | } 117 | #rules-list .rule td { 118 | margin: 0; 119 | border-bottom: 1px solid #ccc; 120 | } 121 | #rules-list .type { 122 | width: 80px; 123 | } 124 | #rules-list .btn { 125 | width: 55px; 126 | } 127 | #rules-list .rule td.btn { 128 | width: 70px; 129 | padding: 4px 0 4px 2px; 130 | } 131 | .badge { 132 | padding: 0 5px; 133 | color: #fff; 134 | background-color: #00a0d2; 135 | border-radius: 5px; 136 | font-size: .8em; 137 | font-weight: bold; 138 | text-align: center; 139 | } 140 | .badge.manual { 141 | background-color: #46b450; 142 | } 143 | #rules-list .btn span { 144 | width: 67px; 145 | text-align: center; 146 | } 147 | p.rules-btn { 148 | margin: 20px 0 0; 149 | padding: 0; 150 | } 151 | .queue { 152 | table-layout: fixed; 153 | border-collapse: collapse; 154 | } 155 | .queue .job td { 156 | border-bottom: 1px solid #ccc; 157 | } 158 | .queue .status, 159 | .queue .job td.status { 160 | width: 45px; 161 | } 162 | .queue td.status { 163 | text-align: center; 164 | } 165 | .queue .badge { 166 | border-radius: 3px; 167 | cursor: default; 168 | } 169 | .badge.new { 170 | background-color: #666; 171 | } 172 | .badge.pending { 173 | background-color: #00a0d2; 174 | } 175 | .badge.done { 176 | background-color: #46b450; 177 | } 178 | .badge.review { 179 | background-color: #ffb900; 180 | } 181 | .badge.review.rule { 182 | margin-left: 2px; 183 | } 184 | .badge.error { 185 | background-color: #dc3232; 186 | } 187 | .badge.unknown { 188 | color: #666; 189 | background-color: #ccc; 190 | } 191 | .queue .btn { 192 | width: 86px; 193 | } 194 | .queue .button-secondary { 195 | line-height: 17px; 196 | height: 19px; 197 | padding: 0 2px; 198 | font-size: 8pt; 199 | } 200 | .queue .button-secondary.to-right { 201 | margin-left: 2px; 202 | } 203 | .queue .button-secondary a { 204 | color: #555; 205 | text-decoration: none; 206 | } 207 | .queue .button-secondary a:hover { 208 | color: #23282d; 209 | } 210 | .queue .button-secondary .dashicons { 211 | position: relative; 212 | top: 1px; 213 | font-size: 15px; 214 | } 215 | p.submit.left { 216 | float: left; 217 | } 218 | #importSettingsForm { 219 | float: right; 220 | text-align: left; 221 | max-width: 100%; 222 | margin-top: 20px; 223 | padding-top: 10px; 224 | position: relative; 225 | overflow: hidden; 226 | } 227 | #settingsfile { 228 | padding: 0 2px; 229 | } 230 | #settingsfile { 231 | padding: 0 2px; 232 | } 233 | 234 | /* debug block */ 235 | #debug { 236 | clear: both; 237 | } 238 | #debug .debug th, 239 | #debug .debug td { 240 | padding: 5px 10px; 241 | font-size: 13px; 242 | } 243 | #debug pre { 244 | margin: 0 0 1em; 245 | font-size: 12px; 246 | -moz-tab-size: 4; 247 | -o-tab-size: 4; 248 | tab-size: 4; 249 | white-space: pre-wrap; 250 | } 251 | #explain-panel p { 252 | font-size:120% 253 | } 254 | -------------------------------------------------------------------------------- /classes/autoptimizeHTML.php: -------------------------------------------------------------------------------- 1 | ', 40 | '', 41 | '', 42 | ); 43 | 44 | public function read( $options ) 45 | { 46 | // Remove the HTML comments? 47 | $this->keepcomments = (bool) $options['keepcomments']; 48 | 49 | // Filter to force xhtml. 50 | $this->forcexhtml = (bool) apply_filters( 'autoptimize_filter_html_forcexhtml', false ); 51 | 52 | // minify inline JS/ CSS. 53 | $this->minify_inline = (bool) apply_filters( 'autoptimize_html_minify_inline_js_css', $options['minify_inline'] ); 54 | 55 | // Filterable strings to be excluded from HTML minification. 56 | $exclude = apply_filters( 'autoptimize_filter_html_exclude', '' ); 57 | if ( '' !== $exclude ) { 58 | $exclude_arr = array_filter( array_map( 'trim', explode( ',', $exclude ) ) ); 59 | $this->exclude = array_merge( $exclude_arr, $this->exclude ); 60 | } 61 | 62 | // Nothing else for HTML! 63 | return true; 64 | } 65 | 66 | /** 67 | * Minifies HTML. 68 | * 69 | * @return bool 70 | */ 71 | public function minify() 72 | { 73 | $noptimize = apply_filters( 'autoptimize_filter_html_noptimize', false, $this->content ); 74 | if ( $noptimize ) { 75 | return false; 76 | } 77 | 78 | // Wrap the to-be-excluded strings in noptimize tags. 79 | foreach ( $this->exclude as $str ) { 80 | if ( false !== strpos( $this->content, $str ) ) { 81 | $replacement = '' . $str . ''; 82 | $this->content = str_replace( $str, $replacement, $this->content ); 83 | } 84 | } 85 | 86 | // Noptimize. 87 | $this->content = $this->hide_noptimize( $this->content ); 88 | 89 | // Preparing options for Minify_HTML. 90 | $options = array( 'keepComments' => $this->keepcomments ); 91 | if ( $this->forcexhtml ) { 92 | $options['xhtml'] = true; 93 | } 94 | 95 | // Optionally minify inline JS & CSS. 96 | if ( $this->minify_inline ) { 97 | if ( false != autoptimizeOptionWrapper::get_option( 'autoptimize_js' ) && false != autoptimizeConfig::get_post_meta_ao_settings( 'ao_post_js_optimize' ) && true !== apply_filters( 'autoptimize_filter_js_noptimize', false, $this->content ) && false === strpos( $this->content, 'text/template' ) ) { 98 | $options['jsMinifier'] = 'JSMin::minify'; 99 | } 100 | if ( false != autoptimizeOptionWrapper::get_option( 'autoptimize_css' ) && false != autoptimizeConfig::get_post_meta_ao_settings( 'ao_post_css_optimize' ) && true !== apply_filters( 'autoptimize_filter_css_noptimize', false, $this->content ) ) { 101 | $options['cssMinifier'] = 'autoptimizeCSSmin::minify'; 102 | } 103 | } 104 | 105 | $tmp_content = AO_Minify_HTML::minify( $this->content, $options ); 106 | if ( ! empty( $tmp_content ) ) { 107 | $this->content = $tmp_content; 108 | unset( $tmp_content ); 109 | } 110 | 111 | // Restore noptimize. 112 | $this->content = $this->restore_noptimize( $this->content ); 113 | 114 | // Remove the noptimize-wrapper from around the excluded strings. 115 | foreach ( $this->exclude as $str ) { 116 | $replacement = '' . $str . ''; 117 | if ( false !== strpos( $this->content, $replacement ) ) { 118 | $this->content = str_replace( $replacement, $str, $this->content ); 119 | } 120 | } 121 | 122 | // Revslider data attribs somehow suffer from HTML optimization, this fixes that! 123 | if ( class_exists( 'RevSlider' ) && apply_filters( 'autoptimize_filter_html_dataattrib_cleanup', false ) ) { 124 | $this->content = preg_replace( '#\n(data-.*$)\n#Um', ' $1 ', $this->content ); 125 | $this->content = preg_replace( '#<[^>]*(=\"[^"\'<>\s]*\")(\w)#', '$1 $2', $this->content ); 126 | } 127 | 128 | return true; 129 | } 130 | 131 | /** 132 | * Doesn't do much in case of HTML (no cache in css/js sense there) 133 | * 134 | * @return true 135 | */ 136 | public function cache() 137 | { 138 | return true; 139 | } 140 | 141 | /** 142 | * Returns the HTML markup. 143 | * 144 | * @return string 145 | */ 146 | public function getcontent() 147 | { 148 | return $this->content; 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/StateStore.php: -------------------------------------------------------------------------------- 1 | optionName = $optionName; 33 | } 34 | 35 | /** 36 | * Get time elapsed since the last update check. 37 | * 38 | * If there are no recorded update checks, this method returns a large arbitrary number 39 | * (i.e. time since the Unix epoch). 40 | * 41 | * @return int Elapsed time in seconds. 42 | */ 43 | public function timeSinceLastCheck() { 44 | $this->lazyLoad(); 45 | return time() - $this->lastCheck; 46 | } 47 | 48 | /** 49 | * @return int 50 | */ 51 | public function getLastCheck() { 52 | $this->lazyLoad(); 53 | return $this->lastCheck; 54 | } 55 | 56 | /** 57 | * Set the time of the last update check to the current timestamp. 58 | * 59 | * @return $this 60 | */ 61 | public function setLastCheckToNow() { 62 | $this->lazyLoad(); 63 | $this->lastCheck = time(); 64 | return $this; 65 | } 66 | 67 | /** 68 | * @return null|Puc_v4p9_Update 69 | */ 70 | public function getUpdate() { 71 | $this->lazyLoad(); 72 | return $this->update; 73 | } 74 | 75 | /** 76 | * @param Puc_v4p9_Update|null $update 77 | * @return $this 78 | */ 79 | public function setUpdate(Puc_v4p9_Update $update = null) { 80 | $this->lazyLoad(); 81 | $this->update = $update; 82 | return $this; 83 | } 84 | 85 | /** 86 | * @return string 87 | */ 88 | public function getCheckedVersion() { 89 | $this->lazyLoad(); 90 | return $this->checkedVersion; 91 | } 92 | 93 | /** 94 | * @param string $version 95 | * @return $this 96 | */ 97 | public function setCheckedVersion($version) { 98 | $this->lazyLoad(); 99 | $this->checkedVersion = strval($version); 100 | return $this; 101 | } 102 | 103 | /** 104 | * Get translation updates. 105 | * 106 | * @return array 107 | */ 108 | public function getTranslations() { 109 | $this->lazyLoad(); 110 | if ( isset($this->update, $this->update->translations) ) { 111 | return $this->update->translations; 112 | } 113 | return array(); 114 | } 115 | 116 | /** 117 | * Set translation updates. 118 | * 119 | * @param array $translationUpdates 120 | */ 121 | public function setTranslations($translationUpdates) { 122 | $this->lazyLoad(); 123 | if ( isset($this->update) ) { 124 | $this->update->translations = $translationUpdates; 125 | $this->save(); 126 | } 127 | } 128 | 129 | public function save() { 130 | $state = new stdClass(); 131 | 132 | $state->lastCheck = $this->lastCheck; 133 | $state->checkedVersion = $this->checkedVersion; 134 | 135 | if ( isset($this->update)) { 136 | $state->update = $this->update->toStdClass(); 137 | 138 | $updateClass = get_class($this->update); 139 | $state->updateClass = $updateClass; 140 | $prefix = $this->getLibPrefix(); 141 | if ( Puc_v4p9_Utils::startsWith($updateClass, $prefix) ) { 142 | $state->updateBaseClass = substr($updateClass, strlen($prefix)); 143 | } 144 | } 145 | 146 | update_site_option($this->optionName, $state); 147 | $this->isLoaded = true; 148 | } 149 | 150 | /** 151 | * @return $this 152 | */ 153 | public function lazyLoad() { 154 | if ( !$this->isLoaded ) { 155 | $this->load(); 156 | } 157 | return $this; 158 | } 159 | 160 | protected function load() { 161 | $this->isLoaded = true; 162 | 163 | $state = get_site_option($this->optionName, null); 164 | 165 | if ( !is_object($state) ) { 166 | $this->lastCheck = 0; 167 | $this->checkedVersion = ''; 168 | $this->update = null; 169 | return; 170 | } 171 | 172 | $this->lastCheck = intval(Puc_v4p9_Utils::get($state, 'lastCheck', 0)); 173 | $this->checkedVersion = Puc_v4p9_Utils::get($state, 'checkedVersion', ''); 174 | $this->update = null; 175 | 176 | if ( isset($state->update) ) { 177 | //This mess is due to the fact that the want the update class from this version 178 | //of the library, not the version that saved the update. 179 | 180 | $updateClass = null; 181 | if ( isset($state->updateBaseClass) ) { 182 | $updateClass = $this->getLibPrefix() . $state->updateBaseClass; 183 | } else if ( isset($state->updateClass) && class_exists($state->updateClass) ) { 184 | $updateClass = $state->updateClass; 185 | } 186 | 187 | if ( $updateClass !== null ) { 188 | $this->update = call_user_func(array($updateClass, 'fromObject'), $state->update); 189 | } 190 | } 191 | } 192 | 193 | public function delete() { 194 | delete_site_option($this->optionName); 195 | 196 | $this->lastCheck = 0; 197 | $this->checkedVersion = ''; 198 | $this->update = null; 199 | } 200 | 201 | private function getLibPrefix() { 202 | $parts = explode('_', __CLASS__, 3); 203 | return $parts[0] . '_' . $parts[1] . '_'; 204 | } 205 | } 206 | 207 | endif; 208 | -------------------------------------------------------------------------------- /classes/autoptimizePartners.php: -------------------------------------------------------------------------------- 1 | run(); 16 | } 17 | 18 | public function run() 19 | { 20 | if ( $this->enabled() ) { 21 | add_filter( 'autoptimize_filter_settingsscreen_tabs', array( $this, 'add_partner_tabs' ), 10, 1 ); 22 | } 23 | if ( is_multisite() && is_network_admin() && autoptimizeOptionWrapper::is_ao_active_for_network() ) { 24 | add_action( 'network_admin_menu', array( $this, 'add_admin_menu' ) ); 25 | } else { 26 | add_action( 'admin_menu', array( $this, 'add_admin_menu' ) ); 27 | } 28 | } 29 | 30 | protected function enabled() 31 | { 32 | return apply_filters( 'autoptimize_filter_show_partner_tabs', true ); 33 | } 34 | 35 | public function add_partner_tabs( $in ) 36 | { 37 | $in = array_merge( 38 | $in, 39 | array( 40 | 'ao_partners' => esc_html__( 'Optimize More!', 'autoptimize' ), 41 | ) 42 | ); 43 | 44 | return $in; 45 | } 46 | 47 | public function add_admin_menu() 48 | { 49 | if ( $this->enabled() ) { 50 | add_submenu_page( '', 'AO partner', 'AO partner', 'manage_options', 'ao_partners', array( $this, 'ao_partners_page' ) ); 51 | } 52 | } 53 | 54 | protected function get_ao_partner_feed_markup() 55 | { 56 | $no_feed_text = sprintf( esc_html__( 'Have a look at %1$sAutoptimize Pro%2$s to power-up your site!', 'autoptimize' ), '', '' ); 57 | $output = ''; 58 | if ( apply_filters( 'autoptimize_settingsscreen_remotehttp', true ) ) { 59 | $rss = fetch_feed( 'http://feeds.feedburner.com/OptimizingMattersDownloads' ); 60 | $maxitems = 0; 61 | 62 | if ( ! is_wp_error( $rss ) ) { 63 | $maxitems = $rss->get_item_quantity( 20 ); 64 | $rss_items = $rss->get_items( 0, $maxitems ); 65 | } 66 | 67 | if ( 0 == $maxitems ) { 68 | $output .= $no_feed_text; 69 | } else { 70 | $output .= '
    '; 71 | foreach ( $rss_items as $item ) { 72 | $item_url = esc_url( $item->get_permalink() ); 73 | $enclosure = $item->get_enclosure(); 74 | 75 | $output .= '
  • '; 76 | $output .= '

    ' . esc_html( $item->get_title() ) . '

    '; 77 | 78 | if ( $enclosure && ( false !== strpos( $enclosure->get_type(), 'image' ) ) ) { 79 | $img_url = esc_url( $enclosure->get_link() ); 80 | $output .= '
    '; 81 | } 82 | 83 | $output .= '
    ' . wp_kses_post( $item->get_description() ) . '
    '; 84 | $output .= ''; 85 | $output .= '
  • '; 86 | } 87 | $output .= '
'; 88 | } 89 | } else { 90 | $output .= $no_feed_text; 91 | } 92 | 93 | return $output; 94 | } 95 | 96 | public function ao_partners_page() 97 | { 98 | ?> 99 | 142 | 143 |
144 |

145 | 146 | ' . esc_html__( "These Autoptimize power-ups and related services will improve your site's performance even more!", 'autoptimize' ) . ''; ?> 147 |
148 | get_ao_partner_feed_markup(); ?> 149 |
150 |
151 | Prev',next:''},animation:"horizontal",selectors:{container:"ul:first",slides:"li"},animateHeight:!1,activeClass:e._+"-active",swipe:!0,swipeThreshold:.2},e.$context=t,e.options={},e.$parent=null,e.$container=null,e.$slides=null,e.$nav=null,e.$arrows=[],e.total=0,e.current=0,e.prefix=e._+"-",e.eventSuffix="."+e.prefix+~~(2e3*Math.random()),e.interval=null,e.init=function(t){return e.options=$.extend({},e.defaults,t),e.$container=e.$context.find(e.options.selectors.container).addClass(e.prefix+"wrap"),e.$slides=e.$container.children(e.options.selectors.slides),e.setup(),$.each(["nav","arrows","keys","infinite"],function(t,n){e.options[n]&&e["init"+$._ucfirst(n)]()}),jQuery.event.special.swipe&&e.options.swipe&&e.initSwipe(),e.options.autoplay&&e.start(),e.calculateSlides(),e.$context.trigger(e._+".ready"),e.animate(e.options.index||e.current,"init")},e.setup=function(){e.$context.addClass(e.prefix+e.options.animation).wrap('
'),e.$parent=e.$context.parent("."+e._);var t=e.$context.css("position");"static"===t&&e.$context.css("position","relative"),e.$context.css("overflow","hidden")},e.calculateSlides=function(){if(e.total=e.$slides.length,"fade"!==e.options.animation){var t="width";"vertical"===e.options.animation&&(t="height"),e.$container.css(t,100*e.total+"%").addClass(e.prefix+"carousel"),e.$slides.css(t,100/e.total+"%")}},e.start=function(){return e.interval=setTimeout(function(){e.next()},e.options.delay),e},e.stop=function(){return clearTimeout(e.interval),e},e.initNav=function(){var t=$('');e.$slides.each(function(n){var i=this.getAttribute("data-nav")||n+1;$.isFunction(e.options.nav)&&(i=e.options.nav.call(e.$slides.eq(n),n,i)),t.children("ol").append('
  • '+i+"
  • ")}),e.$nav=t.insertAfter(e.$context),e.$nav.find("li").on("click"+e.eventSuffix,function(){var t=$(this).addClass(e.options.activeClass);t.siblings().removeClass(e.options.activeClass),e.animate(t.attr("data-slide"))})},e.initArrows=function(){e.options.arrows===!0&&(e.options.arrows=e.defaults.arrows),$.each(e.options.arrows,function(t,n){e.$arrows.push($(n).insertAfter(e.$context).on("click"+e.eventSuffix,e[t]))})},e.initKeys=function(){e.options.keys===!0&&(e.options.keys=e.defaults.keys),$(document).on("keyup"+e.eventSuffix,function(t){$.each(e.options.keys,function(n,i){t.which===i&&$.isFunction(e[n])&&e[n].call(e)})})},e.initSwipe=function(){var t=e.$slides.width();"fade"!==e.options.animation&&e.$container.on({movestart:function(t){return t.distX>t.distY&&t.distX<-t.distY||t.distX-t.distY?!!t.preventDefault():void e.$container.css("position","relative")},move:function(n){e.$container.css("left",-(100*e.current)+100*n.distX/t+"%")},moveend:function(n){Math.abs(n.distX)/t>e.options.swipeThreshold?e[n.distX<0?"next":"prev"]():e.$container.animate({left:-(100*e.current)+"%"},e.options.speed/2)}})},e.initInfinite=function(){var t=["first","last"];$.each(t,function(n,i){e.$slides.push.apply(e.$slides,e.$slides.filter(':not(".'+e._+'-clone")')[i]().clone().addClass(e._+"-clone")["insert"+(0===n?"After":"Before")](e.$slides[t[~~!n]]()))})},e.destroyArrows=function(){$.each(e.$arrows,function(t,n){n.remove()})},e.destroySwipe=function(){e.$container.off("movestart move moveend")},e.destroyKeys=function(){$(document).off("keyup"+e.eventSuffix)},e.setIndex=function(t){return 0>t&&(t=e.total-1),e.current=Math.min(Math.max(0,t),e.total-1),e.options.nav&&e.$nav.find('[data-slide="'+e.current+'"]')._active(e.options.activeClass),e.$slides.eq(e.current)._active(e.options.activeClass),e},e.animate=function(t,n){if("first"===t&&(t=0),"last"===t&&(t=e.total),isNaN(t))return e;e.options.autoplay&&e.stop().start(),e.setIndex(t),e.$context.trigger(e._+".change",[t,e.$slides.eq(t)]);var i="animate"+$._ucfirst(e.options.animation);return $.isFunction(e[i])&&e[i](e.current,n),e},e.next=function(){var t=e.current+1;return t>=e.total&&(t=0),e.animate(t,"next")},e.prev=function(){return e.animate(e.current-1,"prev")},e.animateHorizontal=function(t){var n="left";return"rtl"===e.$context.attr("dir")&&(n="right"),e.options.infinite&&e.$container.css("margin-"+n,"-100%"),e.slide(n,t)},e.animateVertical=function(t){return e.options.animateHeight=!0,e.options.infinite&&e.$container.css("margin-top",-e.$slides.outerHeight()),e.slide("top",t)},e.slide=function(t,n){if(e.options.animateHeight&&e._move(e.$context,{height:e.$slides.eq(n).outerHeight()},!1),e.options.infinite){var i;n===e.total-1&&(i=e.total-3,n=-1),n===e.total-2&&(i=0,n=e.total-2),"number"==typeof i&&(e.setIndex(i),e.$context.on(e._+".moved",function(){e.current===i&&e.$container.css(t,-(100*i)+"%").off(e._+".moved")}))}var o={};return o[t]=-(100*n)+"%",e._move(e.$container,o)},e.animateFade=function(t){var n=e.$slides.eq(t).addClass(e.options.activeClass);e._move(n.siblings().removeClass(e.options.activeClass),{opacity:0}),e._move(n,{opacity:1},!1)},e._move=function(t,n,i,o){return i!==!1&&(i=function(){e.$context.trigger(e._+".moved")}),t._move(n,o||e.options.speed,e.options.easing,i)},e.init(n)},$.fn._active=function(t){return this.addClass(t).siblings().removeClass(t)},$._ucfirst=function(t){return(t+"").toLowerCase().replace(/^./,function(t){return t.toUpperCase()})},$.fn._move=function(){return this.stop(!0,!0),$.fn[$.fn.velocity?"velocity":"animate"].apply(this,arguments)},void($.fn.unslider=function(t){return this.each(function(){var n=$(this);if("string"==typeof t&&n.data("unslider")){t=t.split(":");var e=n.data("unslider")[t[0]];if($.isFunction(e))return e.apply(n,t[1]?t[1].split(","):null)}return n.data("unslider",new $.Unslider(n,t))})})):console.warn("Unslider needs jQuery")}(window.jQuery); 2 | -------------------------------------------------------------------------------- /classes/external/php/plugin-update-checker/Puc/v4p9/DebugBar/Panel.php: -------------------------------------------------------------------------------- 1 |
    '; 10 | 11 | public function __construct($updateChecker) { 12 | $this->updateChecker = $updateChecker; 13 | $title = sprintf( 14 | 'PUC (%s)', 15 | esc_attr($this->updateChecker->getUniqueName('uid')), 16 | $this->updateChecker->slug 17 | ); 18 | parent::__construct($title); 19 | } 20 | 21 | public function render() { 22 | printf( 23 | '
    ', 24 | esc_attr($this->updateChecker->getUniqueName('debug-bar-panel')), 25 | esc_attr($this->updateChecker->slug), 26 | esc_attr($this->updateChecker->getUniqueName('uid')), 27 | esc_attr(wp_create_nonce('puc-ajax')) 28 | ); 29 | 30 | $this->displayConfiguration(); 31 | $this->displayStatus(); 32 | $this->displayCurrentUpdate(); 33 | 34 | echo '
    '; 35 | } 36 | 37 | private function displayConfiguration() { 38 | echo '

    Configuration

    '; 39 | echo ''; 40 | $this->displayConfigHeader(); 41 | $this->row('Slug', htmlentities($this->updateChecker->slug)); 42 | $this->row('DB option', htmlentities($this->updateChecker->optionName)); 43 | 44 | $requestInfoButton = $this->getMetadataButton(); 45 | $this->row('Metadata URL', htmlentities($this->updateChecker->metadataUrl) . ' ' . $requestInfoButton . $this->responseBox); 46 | 47 | $scheduler = $this->updateChecker->scheduler; 48 | if ( $scheduler->checkPeriod > 0 ) { 49 | $this->row('Automatic checks', 'Every ' . $scheduler->checkPeriod . ' hours'); 50 | } else { 51 | $this->row('Automatic checks', 'Disabled'); 52 | } 53 | 54 | if ( isset($scheduler->throttleRedundantChecks) ) { 55 | if ( $scheduler->throttleRedundantChecks && ($scheduler->checkPeriod > 0) ) { 56 | $this->row( 57 | 'Throttling', 58 | sprintf( 59 | 'Enabled. If an update is already available, check for updates every %1$d hours instead of every %2$d hours.', 60 | $scheduler->throttledCheckPeriod, 61 | $scheduler->checkPeriod 62 | ) 63 | ); 64 | } else { 65 | $this->row('Throttling', 'Disabled'); 66 | } 67 | } 68 | 69 | $this->updateChecker->onDisplayConfiguration($this); 70 | 71 | echo '
    '; 72 | } 73 | 74 | protected function displayConfigHeader() { 75 | //Do nothing. This should be implemented in subclasses. 76 | } 77 | 78 | protected function getMetadataButton() { 79 | return ''; 80 | } 81 | 82 | private function displayStatus() { 83 | echo '

    Status

    '; 84 | echo ''; 85 | $state = $this->updateChecker->getUpdateState(); 86 | $checkNowButton = ''; 87 | if ( function_exists('get_submit_button') ) { 88 | $checkNowButton = get_submit_button( 89 | 'Check Now', 90 | 'secondary', 91 | 'puc-check-now-button', 92 | false, 93 | array('id' => $this->updateChecker->getUniqueName('check-now-button')) 94 | ); 95 | } 96 | 97 | if ( $state->getLastCheck() > 0 ) { 98 | $this->row('Last check', $this->formatTimeWithDelta($state->getLastCheck()) . ' ' . $checkNowButton . $this->responseBox); 99 | } else { 100 | $this->row('Last check', 'Never'); 101 | } 102 | 103 | $nextCheck = wp_next_scheduled($this->updateChecker->scheduler->getCronHookName()); 104 | $this->row('Next automatic check', $this->formatTimeWithDelta($nextCheck)); 105 | 106 | if ( $state->getCheckedVersion() !== '' ) { 107 | $this->row('Checked version', htmlentities($state->getCheckedVersion())); 108 | $this->row('Cached update', $state->getUpdate()); 109 | } 110 | $this->row('Update checker class', htmlentities(get_class($this->updateChecker))); 111 | echo '
    '; 112 | } 113 | 114 | private function displayCurrentUpdate() { 115 | $update = $this->updateChecker->getUpdate(); 116 | if ( $update !== null ) { 117 | echo '

    An Update Is Available

    '; 118 | echo ''; 119 | $fields = $this->getUpdateFields(); 120 | foreach($fields as $field) { 121 | if ( property_exists($update, $field) ) { 122 | $this->row(ucwords(str_replace('_', ' ', $field)), htmlentities($update->$field)); 123 | } 124 | } 125 | echo '
    '; 126 | } else { 127 | echo '

    No updates currently available

    '; 128 | } 129 | } 130 | 131 | protected function getUpdateFields() { 132 | return array('version', 'download_url', 'slug',); 133 | } 134 | 135 | private function formatTimeWithDelta($unixTime) { 136 | if ( empty($unixTime) ) { 137 | return 'Never'; 138 | } 139 | 140 | $delta = time() - $unixTime; 141 | $result = human_time_diff(time(), $unixTime); 142 | if ( $delta < 0 ) { 143 | $result = 'after ' . $result; 144 | } else { 145 | $result = $result . ' ago'; 146 | } 147 | $result .= ' (' . $this->formatTimestamp($unixTime) . ')'; 148 | return $result; 149 | } 150 | 151 | private function formatTimestamp($unixTime) { 152 | return gmdate('Y-m-d H:i:s', $unixTime + (get_option('gmt_offset') * 3600)); 153 | } 154 | 155 | public function row($name, $value) { 156 | if ( is_object($value) || is_array($value) ) { 157 | $value = '
    ' . htmlentities(print_r($value, true)) . '
    '; 158 | } else if ($value === null) { 159 | $value = 'null'; 160 | } 161 | printf('%1$s %2$s', $name, $value); 162 | } 163 | } 164 | 165 | endif; 166 | -------------------------------------------------------------------------------- /classes/static/exit-survey/exit-survey.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | $(document).ready(function () { 3 | var targetElement = 'tr[data-plugin="autoptimize/autoptimize.php"] span.deactivate a'; 4 | var redirectUrl = $(targetElement).attr('href'); 5 | if ($('.ao-feedback-overlay').length === 0) { 6 | $('body').prepend('
    '); 7 | } 8 | $('#ao_uninstall_feedback_popup').appendTo($(targetElement).parent()); 9 | 10 | $(targetElement).on('click', function (e) { 11 | e.preventDefault(); 12 | $('#ao_uninstall_feedback_popup ').addClass('active'); 13 | $('body').addClass('ao-feedback-open'); 14 | $('.ao-feedback-overlay').on('click', function () { 15 | $('#ao_uninstall_feedback_popup ').removeClass('active'); 16 | $('body').removeClass('ao-feedback-open'); 17 | }); 18 | }); 19 | 20 | $('#ao_uninstall_feedback_popup .info-disclosure-link').on('click', function (e) { 21 | e.preventDefault(); 22 | $(this).parent().find('.info-disclosure-content').toggleClass('active'); 23 | }); 24 | 25 | $('#ao_uninstall_feedback_popup input[type="radio"]').on('change', function () { 26 | var radio = $(this); 27 | $('p.last-attempt').hide(); 28 | if (radio.parent().find('textarea').length > 0 && 29 | radio.parent().find('textarea').val().length === 0) { 30 | $('#ao_uninstall_feedback_popup #ao-deactivate-yes').attr('disabled', 'disabled'); 31 | radio.parent().find('textarea').on('keyup', function (e) { 32 | if ($(this).val().length === 0) { 33 | $('#ao_uninstall_feedback_popup #ao-deactivate-yes').attr('disabled', 'disabled'); 34 | } else if ( $('#ao_feedback998')[0].checkValidity() == true ) { 35 | $('#ao_uninstall_feedback_popup #ao-deactivate-yes').removeAttr('disabled'); 36 | } 37 | }); 38 | } else { 39 | if ( $('#ao_feedback998')[0].checkValidity() == true ) { 40 | $('#ao_uninstall_feedback_popup #ao-deactivate-yes').removeAttr('disabled'); 41 | } 42 | $(this).siblings('p.last-attempt').show(); 43 | } 44 | }); 45 | 46 | $('#ao_feedback998').on('keyup', function (e) { 47 | email_node = $(this); 48 | email_val = email_node.val(); 49 | if ( email_val.length > 0 && email_node[0].checkValidity() == false ) { 50 | $('#ao_uninstall_feedback_popup #ao-deactivate-yes').attr('disabled', 'disabled'); 51 | } else if ( $( '#ao_uninstall_feedback_popup input[name="ao-deactivate-option"]:checked' ).length > 0 ) { 52 | $('#ao_uninstall_feedback_popup #ao-deactivate-yes').removeAttr('disabled'); 53 | } 54 | }); 55 | 56 | $('#ao_uninstall_feedback_popup #ao-deactivate-no').on('click', function (e) { 57 | e.preventDefault(); 58 | e.stopPropagation(); 59 | $(targetElement).unbind('click'); 60 | $('body').removeClass('ao-feedback-open'); 61 | $('#ao_uninstall_feedback_popup').remove(); 62 | if (redirectUrl !== '') { 63 | location.href = redirectUrl; 64 | } 65 | }); 66 | 67 | $('#ao_uninstall_feedback_popup #ao-deactivate-cancel').on('click', function (e) { 68 | e.preventDefault(); 69 | e.stopPropagation(); 70 | $('#ao_uninstall_feedback_popup ').removeClass('active'); 71 | $('body').removeClass('ao-feedback-open'); 72 | }); 73 | 74 | $('#ao_feedback_email_toggle').on('click', function (e) { 75 | $('#ao_feedback998').toggle(); 76 | }); 77 | 78 | $('#ao_uninstall_feedback_popup #ao-deactivate-yes').on('click', function (e) { 79 | e.preventDefault(); 80 | e.stopPropagation(); 81 | $(targetElement).unbind('click'); 82 | 83 | var modal_data = JSON.parse(atob($('#ao_uninstall_feedback_popup').data('modal'))) 84 | 85 | var selectedOption = $( '#ao_uninstall_feedback_popup input[name="ao-deactivate-option"]:checked' ); 86 | 87 | var reason; 88 | 89 | if( selectedOption.attr("id") === "ao_feedback999" ){ 90 | reason = 'Other: ' + selectedOption.parent().find('textarea').val().trim() 91 | }else{ 92 | reason = selectedOption.parent().find('label').attr('data-reason').trim() 93 | } 94 | 95 | var data = { 96 | 'url': modal_data.home, 97 | 'reason': reason, 98 | 'type': 'WP ' + $('#core_version').text().trim(), 99 | 'version' : 'AO ' + $('#ao_plugin_version').text().trim(), 100 | 'email': $('#ao_feedback998').val().trim(), 101 | }; 102 | 103 | $.ajax({ 104 | type: 'POST', 105 | url: atob( modal_data.dest ), 106 | data: data, 107 | complete() { 108 | $('body').removeClass('ao-feedback-open'); 109 | $('#ao_uninstall_feedback_popup').remove(); 110 | if (redirectUrl !== '') { 111 | location.href = redirectUrl; 112 | } 113 | }, 114 | beforeSend() { 115 | $('#ao_uninstall_feedback_popup').addClass('sending-feedback'); 116 | $('#ao_uninstall_feedback_popup .popup--footer').remove(); 117 | $('#ao_uninstall_feedback_popup .popup--body').html(''); 118 | } 119 | }); 120 | }); 121 | }); 122 | })(jQuery); 123 | -------------------------------------------------------------------------------- /classes/autoptimizeCacheChecker.php: -------------------------------------------------------------------------------- 1 | 0.5GB (size is filterable), if so, an option is set which controls showing an admin notice. 7 | */ 8 | 9 | if ( ! defined( 'ABSPATH' ) ) { 10 | exit; 11 | } 12 | 13 | class autoptimizeCacheChecker 14 | { 15 | const SCHEDULE_HOOK = 'ao_cachechecker'; 16 | 17 | public function __construct() 18 | { 19 | } 20 | 21 | public function run() 22 | { 23 | $this->add_hooks(); 24 | } 25 | 26 | public function add_hooks() 27 | { 28 | if ( is_admin() ) { 29 | add_action( 'plugins_loaded', array( $this, 'setup' ) ); 30 | } 31 | add_action( self::SCHEDULE_HOOK, array( $this, 'cronjob' ) ); 32 | add_action( 'admin_notices', array( $this, 'show_admin_notice' ) ); 33 | } 34 | 35 | public function setup() 36 | { 37 | $do_cache_check = (bool) apply_filters( 'autoptimize_filter_cachecheck_do', true ); 38 | $schedule = wp_get_schedule( self::SCHEDULE_HOOK ); 39 | $frequency = apply_filters( 'autoptimize_filter_cachecheck_frequency', 'twicedaily' ); 40 | if ( ! in_array( $frequency, array( 'hourly', 'twicedaily', 'daily', 'weekly', 'monthly' ) ) ) { 41 | $frequency = 'twicedaily'; 42 | } 43 | if ( $do_cache_check && ( ! $schedule || $schedule !== $frequency ) ) { 44 | if ( $schedule ) { 45 | wp_clear_scheduled_hook( self::SCHEDULE_HOOK ); 46 | } 47 | wp_schedule_event( time(), $frequency, self::SCHEDULE_HOOK ); 48 | } elseif ( $schedule && ! $do_cache_check ) { 49 | wp_clear_scheduled_hook( self::SCHEDULE_HOOK ); 50 | } 51 | } 52 | 53 | public function cronjob() 54 | { 55 | // Check cachesize and act accordingly. 56 | $max_size = (int) apply_filters( 'autoptimize_filter_cachecheck_maxsize', 536870912 ); 57 | $do_cache_check = (bool) apply_filters( 'autoptimize_filter_cachecheck_do', true ); 58 | $stat_array = autoptimizeCache::stats(); 59 | $cache_size = round( $stat_array[1] ); 60 | if ( ( $cache_size > $max_size ) && ( $do_cache_check ) ) { 61 | autoptimizeOptionWrapper::update_option( 'autoptimize_cachesize_notice', true ); 62 | if ( apply_filters( 'autoptimize_filter_cachecheck_sendmail', true ) ) { 63 | $home_url = esc_url( home_url() ); 64 | $ao_mailto = apply_filters( 'autoptimize_filter_cachecheck_mailto', autoptimizeOptionWrapper::get_option( 'admin_email', '' ) ); 65 | 66 | $ao_mailsubject = esc_html__( 'Autoptimize cache size warning', 'autoptimize' ) . ' (' . $home_url . ')'; 67 | $ao_mailbody = esc_html__( 'Autoptimize\'s cache size is getting big, consider purging the cache. Have a look at https://wordpress.org/plugins/autoptimize/faq/ to see how you can keep the cache size under control.', 'autoptimize' ) . ' (site: ' . $home_url . ')'; 68 | 69 | if ( ! empty( $ao_mailto ) ) { 70 | $ao_mailresult = wp_mail( $ao_mailto, $ao_mailsubject, $ao_mailbody ); 71 | if ( ! $ao_mailresult ) { 72 | error_log( 'Autoptimize could not send cache size warning mail.' ); 73 | } 74 | } 75 | } 76 | } 77 | 78 | // Check if 3rd party services (e.g. image proxy) are up. 79 | autoptimizeUtils::check_service_availability(); 80 | 81 | // Nukes advanced cache clearing artifacts if they exists... 82 | autoptimizeCache::delete_advanced_cache_clear_artifacts(); 83 | 84 | // Check image optimization stats. 85 | autoptimizeImages::instance()->query_img_provider_stats(); 86 | } 87 | 88 | public function show_admin_notice() 89 | { 90 | if ( (bool) autoptimizeOptionWrapper::get_option( 'autoptimize_cachesize_notice', false ) && current_user_can( 'manage_options' ) ) { 91 | echo '

    '; 92 | // Translators: first two variables are strong tags, 3rd is link to the AO FAQ and the 4th closes that tag. 93 | printf( esc_html__( '%1$sAutoptimize\'s cache size is getting big%2$s, consider purging the cache. Have a look at %3$sthe Autoptimize FAQ%4$s to see how you can keep the cache size under control.', 'autoptimize' ), '', '', '', '' ); 94 | echo '

    '; 95 | autoptimizeOptionWrapper::update_option( 'autoptimize_cachesize_notice', false ); 96 | } 97 | 98 | // Notice for image proxy usage. 99 | $_imgopt_notice = autoptimizeImages::instance()->get_imgopt_status_notice_wrapper(); 100 | if ( current_user_can( 'manage_options' ) && is_array( $_imgopt_notice ) && array_key_exists( 'status', $_imgopt_notice ) && in_array( $_imgopt_notice['status'], array( 1, -1, -2, -3 ) ) ) { 101 | $_dismissible = 'ao-img-opt-notice-'; 102 | $_hide_notice = '7'; 103 | 104 | if ( -1 == $_imgopt_notice['status'] || -2 == $_imgopt_notice['status'] || -3 == $_imgopt_notice['status'] ) { 105 | $_hide_notice = '1'; 106 | } 107 | 108 | $_imgopt_notice_dismissible = apply_filters( 'autoptimize_filter_imgopt_notice_dismissable', $_dismissible . $_hide_notice ); 109 | 110 | if ( $_imgopt_notice && PAnD::is_admin_notice_active( $_imgopt_notice_dismissible ) ) { 111 | echo '

    ' . esc_html__( 'Autoptimize', 'autoptimize' ) . ': ' . $_imgopt_notice['notice'] . '

    '; 112 | } 113 | } 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /classes/static/toolbar.css: -------------------------------------------------------------------------------- 1 | /* Loading Modal */ 2 | .autoptimize-loading 3 | { 4 | display: none; 5 | position: fixed; 6 | background-color: rgba(102, 102, 102, 0.8); 7 | background-image: url('loading.gif'); 8 | background-position: center; 9 | background-repeat: no-repeat; 10 | top: 0; 11 | left: 0; 12 | width: 100%; 13 | height: 100%; 14 | z-index: 9000000000; 15 | } 16 | 17 | /* Toolbar Font Colors */ 18 | #wp-admin-bar-autoptimize .white 19 | { 20 | color: #EEE; 21 | } 22 | 23 | #wp-admin-bar-autoptimize .green 24 | { 25 | color: #26BD26; 26 | } 27 | 28 | #wp-admin-bar-autoptimize .orange 29 | { 30 | color: #EC9103; 31 | } 32 | 33 | #wp-admin-bar-autoptimize .red 34 | { 35 | color: #EA1919; 36 | } 37 | 38 | #wp-admin-bar-autoptimize .bg-green 39 | { 40 | background: #26BD26; 41 | } 42 | 43 | #wp-admin-bar-autoptimize .bg-orange 44 | { 45 | background: #EC9103; 46 | } 47 | 48 | #wp-admin-bar-autoptimize .bg-red 49 | { 50 | background: #EA1919; 51 | } 52 | 53 | /* Toolbar Bullet Icons */ 54 | #wp-admin-bar-autoptimize.bullet-green .ab-icon::before, 55 | #wp-admin-bar-autoptimize.bullet-green:hover .ab-icon::before 56 | { 57 | content: "\f159"; 58 | color: #02CA02; 59 | font-size: 14px; 60 | } 61 | 62 | #wp-admin-bar-autoptimize.bullet-orange .ab-icon::before, 63 | #wp-admin-bar-autoptimize.bullet-orange:hover .ab-icon::before 64 | { 65 | content: "\f159"; 66 | color: #EC9103; 67 | font-size: 14px; 68 | } 69 | 70 | #wp-admin-bar-autoptimize.bullet-red .ab-icon::before, 71 | #wp-admin-bar-autoptimize.bullet-red:hover .ab-icon::before 72 | { 73 | content: "\f159"; 74 | color: #EA1919; 75 | font-size: 14px; 76 | -webkit-animation: blink 1s step-end infinite; 77 | animation: blink 1s step-end infinite; 78 | } 79 | 80 | @-webkit-keyframes blink { 50% { visibility: hidden; }} 81 | @keyframes blink { 50% { visibility: hidden; }} 82 | 83 | 84 | /* Some cosmetic Toolbar things */ 85 | #wp-admin-bar-autoptimize table, #wp-admin-bar-autoptimize th, #wp-admin-bar-autoptimize td 86 | { 87 | border: 0px !important; 88 | } 89 | 90 | #wp-admin-bar-autoptimize-default 91 | { 92 | padding-top: 0 !important; 93 | } 94 | 95 | #wp-admin-bar-autoptimize-delete-cache .ab-item 96 | { 97 | cursor: pointer !important; 98 | background: #464b50; 99 | } 100 | 101 | #wp-admin-bar-autoptimize-delete-cache .ab-item:hover 102 | { 103 | color: rgba(240,245,250,0.85) !important; 104 | background: #B57373 !important; 105 | } 106 | 107 | #wp-admin-bar-autoptimize-cache-info 108 | { 109 | padding-top: 8px !important; 110 | padding-bottom: 8px !important; 111 | } 112 | 113 | #wp-admin-bar-autoptimize-cache-info, 114 | #wp-admin-bar-autoptimize-cache-info .ab-item 115 | { 116 | height: auto !important; 117 | cursor: default !important; 118 | } 119 | 120 | #wp-admin-bar-autoptimize-cache-info td + td 121 | { 122 | padding-left: 3px; 123 | } 124 | 125 | #wp-admin-bar-autoptimize-cache-info .ab-item, 126 | #wp-admin-bar-autoptimize-cache-info .ab-item:hover 127 | { 128 | color: #b4b9be !important; 129 | } 130 | 131 | #wp-admin-bar-autoptimize-cache-info .ab-item > p 132 | { 133 | display: block; 134 | } 135 | 136 | #wp-admin-bar-autoptimize-cache-info .ab-item p, 137 | #wp-admin-bar-autoptimize-cache-info .ab-item td 138 | { 139 | font-size: 11px !important; 140 | line-height: 16px !important; 141 | } 142 | 143 | #wp-admin-bar-autoptimize-cache-info .ab-item table 144 | { 145 | display: inline-block !important; 146 | margin-left: 10px !important; 147 | } 148 | 149 | /* Radial Bar */ 150 | .autoptimize-radial-bar 151 | { 152 | display: inline-block !important; 153 | margin-top: 5px !important; 154 | } 155 | .autoptimize-radial-bar, 156 | .autoptimize-radial-bar .mask, 157 | .autoptimize-radial-bar .fill, 158 | .autoptimize-radial-bar .shadow 159 | { 160 | width : 36px !important; 161 | height : 36px !important; 162 | } 163 | .autoptimize-radial-bar 164 | { 165 | background-color : #d6dadc; 166 | } 167 | .autoptimize-radial-bar .fill 168 | { 169 | background-color : #02ca02; 170 | } 171 | .autoptimize-radial-bar .numbers 172 | { 173 | color : #02ca02; 174 | } 175 | .autoptimize-radial-bar .mask 176 | { 177 | clip : rect(0px, 36px, 36px, 18px); 178 | } 179 | .autoptimize-radial-bar .fill 180 | { 181 | clip : rect(0px, 18px, 36px, 0px); 182 | } 183 | .autoptimize-radial-bar .inset 184 | { 185 | width : 26px !important; 186 | height : 26px !important; 187 | 188 | margin-left : 5px !important; 189 | margin-top : 5px !important; 190 | 191 | background-color : #32373c; 192 | } 193 | .autoptimize-radial-bar .percentage 194 | { 195 | width : 26px !important; 196 | height : 16px !important; 197 | line-height : 11px !important; 198 | 199 | top : 7px !important; 200 | left : 0px !important; 201 | 202 | overflow : hidden; 203 | } 204 | .autoptimize-radial-bar .numbers 205 | { 206 | width : 26px !important; 207 | font-weight : 600 !important; 208 | font-size : 9px !important; 209 | 210 | margin-top : -5px !important; 211 | 212 | display : inline-block; 213 | vertical-align : top; 214 | text-align : center; 215 | } 216 | 217 | .autoptimize-radial-bar .inset 218 | { 219 | box-shadow : 3px 3px 5px rgba(0,0,0,0.3) !important; 220 | } 221 | .autoptimize-radial-bar .shadow 222 | { 223 | box-shadow : 3px 3px 5px rgba(0,0,0,0.3) inset !important; 224 | } 225 | 226 | .autoptimize-radial-bar .mask, 227 | .autoptimize-radial-bar .fill, 228 | .autoptimize-radial-bar .shadow, 229 | .autoptimize-radial-bar .inset, 230 | .autoptimize-radial-bar .percentage 231 | { 232 | position : absolute !important; 233 | } 234 | 235 | .autoptimize-radial-bar, 236 | .autoptimize-radial-bar .mask, 237 | .autoptimize-radial-bar .fill, 238 | .autoptimize-radial-bar .shadow, 239 | .autoptimize-radial-bar .inset 240 | { 241 | border-radius : 50% !important; 242 | } 243 | 244 | /* fixes for toolbar on frontend for other themes messing things up */ 245 | #wp-admin-bar-autoptimize tr{border:0 !important} 246 | #wp-admin-bar-autoptimize td{background-color:#32373c !important} 247 | -------------------------------------------------------------------------------- /autoptimize_helper.php_example: -------------------------------------------------------------------------------- 1 | ","after"); 85 | } 86 | 87 | /* autoptimize_filter_js_replacetag: where in the HTML is optimized JS injected 88 | 89 | @param array $replacetag, containing the html-tag and the method (inject "before", "after" or "replace") 90 | @return array with updated values */ 91 | // add_filter('autoptimize_filter_js_replacetag','my_ao_override_js_replacetag',10,1); 92 | function my_ao_override_js_replacetag($replacetag) { 93 | return array("","replace"); 94 | } 95 | 96 | /* autoptimize_js_do_minify: do we want to minify? if set to false autoptimize effectively only aggregates, but does not minify 97 | 98 | @return: boolean true or false */ 99 | // add_filter('autoptimize_js_do_minify','my_ao_js_minify',10,1); 100 | function my_ao_js_minify() { 101 | return false; 102 | } 103 | 104 | /* autoptimize_css_do_minify: do we want to minify? if set to false autoptimize effectively only aggregates, but does not minify 105 | 106 | @return: boolean true or false */ 107 | // add_filter('autoptimize_css_do_minify','my_ao_css_minify',10,1); 108 | function my_ao_css_minify() { 109 | return false; 110 | } 111 | 112 | /* autoptimize_js_include_inline: do we want AO to also aggregate inline JS? 113 | 114 | @return: boolean true or false */ 115 | // add_filter('autoptimize_js_include_inline','my_ao_js_include_inline',10,1); 116 | function my_ao_js_include_inline() { 117 | return false; 118 | } 119 | 120 | /* autoptimize_css_include_inline: do we want AO to also aggregate inline CSS? 121 | 122 | @return: boolean true or false */ 123 | // add_filter('autoptimize_css_include_inline','my_ao_css_include_inline',10,1); 124 | function my_ao_css_include_inline() { 125 | return false; 126 | } 127 | 128 | /* autoptimize_filter_css_defer_inline: what CSS to inline when "defer and inline" is activated 129 | 130 | @param $inlined: string with above the fold CSS as configured in admin 131 | @return: updated string with above the fold CSS */ 132 | // add_filter('autoptimize_filter_css_defer_inline','my_ao_css_defer_inline',10,1); 133 | function my_ao_css_defer_inline($inlined) { 134 | return $inlined."h2,h1{color:red !important;}"; 135 | } 136 | 137 | /* autoptimize_filter_css_fonts_cdn: do we want to move fonts to the CDN-url as well 138 | 139 | @return: false (default) or true */ 140 | // add_filter('autoptimize_filter_css_fonts_cdn','my_css_cdnfont',10,0); 141 | function my_css_cdnfont(){ 142 | return true; 143 | } 144 | --------------------------------------------------------------------------------