Changeset 2325703
- Timestamp:
- 06/17/2020 08:53:16 AM (6 years ago)
- Location:
- wp-performance/trunk
- Files:
-
- 9 edited
-
includes/addons/cloudflare/cloudflare_api.php (modified) (1 diff)
-
includes/addons/cloudflare/views/admin.php (modified) (1 diff)
-
includes/classes/parser.php (modified) (1 diff)
-
includes/functions/frontend.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (5 diffs)
-
vendor/composer/autoload_static.php (modified) (2 diffs)
-
wp-performance.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-performance/trunk/includes/addons/cloudflare/cloudflare_api.php
r2148462 r2325703 140 140 141 141 $supported = [ 142 30, 60, 300, 1200, 1800, 3600, 7200, 10800, 14400, 18000, 28800, 43200, 57600, 72000, 86400, 172800, 259200, 345600, 432000, 691200, 1382400, 2073600, 2678400, 5356800, 16070400, 31536000142 0, 30, 60, 300, 1200, 1800, 3600, 7200, 10800, 14400, 18000, 28800, 43200, 57600, 72000, 86400, 172800, 259200, 345600, 432000, 691200, 1382400, 2073600, 2678400, 5356800, 16070400, 31536000 143 143 ]; 144 144 -
wp-performance/trunk/includes/addons/cloudflare/views/admin.php
r2148462 r2325703 119 119 <td> 120 120 <select name="cf_browser_expire" form="wpp-settings"> 121 <option value=" "><?php _e( 'Respect Existing Headers', 'wpp' ); ?></option>121 <option value="0"><?php _e( 'Respect Existing Headers', 'wpp' ); ?></option> 122 122 <?php foreach( $options as $option ): ?> 123 123 <option value="<?php echo $option; ?>" <?php wpp_selected( 'cf_browser_expire', $option, 14400 ); ?>> -
wp-performance/trunk/includes/classes/parser.php
r2244284 r2325703 35 35 $this->parseTemplate(); 36 36 37 // Should we cache this page ? 38 if ( 39 Option::boolval( 'cache' ) 40 && empty( $_POST ) 41 && ! is_user_logged_in() 42 ) { 43 $this->saveCache(); 44 } 45 46 return $this->html; 37 /** 38 * Parsed template filter 39 * @since 1.1.8.3 40 */ 41 $template = apply_filters( 'wpp_template', $this->html, $this->is_amp(), $this->time ); 47 42 48 43 } -
wp-performance/trunk/includes/functions/frontend.php
r2116907 r2325703 1 <?php 1 <?php 2 2 /** 3 * WP Performance Optimizer - Frontend actions4 *5 * @author Ante Laca <ante.laca@gmail.com>6 * @package WPP7 */3 * WP Performance Optimizer - Frontend actions 4 * 5 * @author Ante Laca <ante.laca@gmail.com> 6 * @package WPP 7 */ 8 8 9 use WPP\Url; 9 10 use WPP\Cache; 10 11 use WPP\Option; … … 19 20 20 21 // Disable emoji 21 if ( Option::boolval( 'disable_emoji' ) ) 22 if ( Option::boolval( 'disable_emoji' ) ) 22 23 add_action( 'init', 'wpp_disable_emoji' ); 23 24 24 25 // Disable embeds 25 if ( Option::boolval( 'disable_embeds' ) ) 26 if ( Option::boolval( 'disable_embeds' ) ) 26 27 add_action( 'init', 'wpp_disable_embeds', 99999 ); 27 28 28 29 // Hook up 29 30 add_action( 'wp', function() { 30 31 // Do not parse template if it's an ajax request 31 32 if ( ! wpp_is_ajax() ) 32 is_404() || ob_start( [ 'WPP\Parser', 'init' ] ); 33 is_404() || ob_start( [ 'WPP\Parser', 'init' ] ); 33 34 } ); 34 35 … … 41 42 42 43 foreach( [ '_gz', '_amp' ] as $extension ) { 43 if ( file_exists( $page . $extension ) ) 44 if ( file_exists( $page . $extension ) ) 44 45 unlink( $page . $extension ); 45 46 } 46 47 47 48 } 48 49 } 49 50 } 50 51 51 52 } ); 53 54 55 // Save cache file 56 add_filter( 'wpp_template', function( $template, $is_amp, $time ) { 57 58 // Should we cache this page ? 59 if ( 60 Option::boolval( 'cache' ) 61 && empty( $_POST ) 62 && ! is_user_logged_in() 63 ) { 64 65 /** 66 * Filter excluded urls 67 * 68 * @since 1.0.0 69 */ 70 $excluded = apply_filters( 'wpp_exclude_urls', Option::get( 'cache_url_exclude', [] ) ); 71 72 // Check if page is excluded 73 if ( ! wpp_is_url_excluded( Url::current(), $excluded ) ) { 74 75 if ( ! $is_amp ) { 76 77 $template .= sprintf( 78 '<!-- ' . __( 'Cache file was created in %s seconds on %s at %s', 'wpp' ) . ' -->', 79 number_format( ( microtime( true ) - $time ), 2 ), 80 date( get_option( 'date_format' ) ), 81 date( get_option( 'time_format' ) ) 82 ); 83 84 } 85 86 Cache::save( $template, $is_amp ); 87 88 } 89 90 } 91 92 }, 10, 3); -
wp-performance/trunk/readme.txt
r2244284 r2325703 4 4 Tags: wp performance, cache, performance, speed optimization, seo 5 5 Requires at least: 4.7 6 Tested up to: 5. 36 Tested up to: 5.4 7 7 Requires PHP: 5.6 8 8 Stable tag: trunk … … 11 11 12 12 == Changelog == 13 14 = 1.1.8.3 = 15 [FIX] Cloudflare add-on - respect existing headers 13 16 14 17 = 1.1.8.2 = -
wp-performance/trunk/vendor/autoload.php
r2061390 r2325703 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 2acf94a015230b6fef7e83e17ef1d0c2::getLoader();7 return ComposerAutoloaderInit889f9359b5f8cdede198e2d4b0bcf3ce::getLoader(); -
wp-performance/trunk/vendor/composer/autoload_real.php
r2061390 r2325703 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 2acf94a015230b6fef7e83e17ef1d0c25 class ComposerAutoloaderInit889f9359b5f8cdede198e2d4b0bcf3ce 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit 2acf94a015230b6fef7e83e17ef1d0c2', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInit889f9359b5f8cdede198e2d4b0bcf3ce', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit 2acf94a015230b6fef7e83e17ef1d0c2', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInit889f9359b5f8cdede198e2d4b0bcf3ce', 'loadClassLoader')); 25 25 26 26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 28 28 require_once __DIR__ . '/autoload_static.php'; 29 29 30 call_user_func(\Composer\Autoload\ComposerStaticInit 2acf94a015230b6fef7e83e17ef1d0c2::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit889f9359b5f8cdede198e2d4b0bcf3ce::getInitializer($loader)); 31 31 } else { 32 32 $map = require __DIR__ . '/autoload_namespaces.php'; … … 49 49 50 50 if ($useStaticLoader) { 51 $includeFiles = Composer\Autoload\ComposerStaticInit 2acf94a015230b6fef7e83e17ef1d0c2::$files;51 $includeFiles = Composer\Autoload\ComposerStaticInit889f9359b5f8cdede198e2d4b0bcf3ce::$files; 52 52 } else { 53 53 $includeFiles = require __DIR__ . '/autoload_files.php'; 54 54 } 55 55 foreach ($includeFiles as $fileIdentifier => $file) { 56 composerRequire 2acf94a015230b6fef7e83e17ef1d0c2($fileIdentifier, $file);56 composerRequire889f9359b5f8cdede198e2d4b0bcf3ce($fileIdentifier, $file); 57 57 } 58 58 … … 61 61 } 62 62 63 function composerRequire 2acf94a015230b6fef7e83e17ef1d0c2($fileIdentifier, $file)63 function composerRequire889f9359b5f8cdede198e2d4b0bcf3ce($fileIdentifier, $file) 64 64 { 65 65 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
wp-performance/trunk/vendor/composer/autoload_static.php
r2241043 r2325703 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 2acf94a015230b6fef7e83e17ef1d0c27 class ComposerStaticInit889f9359b5f8cdede198e2d4b0bcf3ce 8 8 { 9 9 public static $files = array ( … … 91 91 { 92 92 return \Closure::bind(function () use ($loader) { 93 $loader->prefixLengthsPsr4 = ComposerStaticInit 2acf94a015230b6fef7e83e17ef1d0c2::$prefixLengthsPsr4;94 $loader->prefixDirsPsr4 = ComposerStaticInit 2acf94a015230b6fef7e83e17ef1d0c2::$prefixDirsPsr4;95 $loader->classMap = ComposerStaticInit 2acf94a015230b6fef7e83e17ef1d0c2::$classMap;93 $loader->prefixLengthsPsr4 = ComposerStaticInit889f9359b5f8cdede198e2d4b0bcf3ce::$prefixLengthsPsr4; 94 $loader->prefixDirsPsr4 = ComposerStaticInit889f9359b5f8cdede198e2d4b0bcf3ce::$prefixDirsPsr4; 95 $loader->classMap = ComposerStaticInit889f9359b5f8cdede198e2d4b0bcf3ce::$classMap; 96 96 97 97 }, null, ClassLoader::class); -
wp-performance/trunk/wp-performance.php
r2244284 r2325703 4 4 * Plugin URI: https://www.wp-performance.com 5 5 * Description: WP Performance Optimizer 6 * Version: 1.1.8. 26 * Version: 1.1.8.3 7 7 * Author: Ante Laca 8 8 * Author URI: https://www.antelaca.xyz … … 15 15 16 16 // WP Performance 17 define( 'WPP_VERSION' , '1.1.8. 2' );17 define( 'WPP_VERSION' , '1.1.8.3' ); 18 18 define( 'WPP_SELF' , __FILE__ ); 19 19 define( 'WPP_URI' , plugin_dir_url( __FILE__ ) );
Note: See TracChangeset
for help on using the changeset viewer.