WP Super Cache - Version 1.9.2-beta

Version Description

Download this release

Release Info

Developer jetpackisbestpack
Plugin Icon 128x128 WP Super Cache
Version 1.9.2-beta
Comparing to
See all releases

Code changes from version 1.9.1 to 1.9.2-beta

.eslintrc.cjs ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ module.exports = {
2
+ extends: [ require.resolve( 'jetpack-js-tools/eslintrc/base' ) ],
3
+ rules: {
4
+ // Enforce use of the correct textdomain.
5
+ '@wordpress/i18n-text-domain': [
6
+ 'error',
7
+ {
8
+ allowedTextDomain: 'wp-super-cache',
9
+ },
10
+ ],
11
+ },
12
+ };
CHANGELOG.md CHANGED
@@ -5,7 +5,24 @@
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
 
8
- ## [1.9] - 2022-09-16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  ### Added
10
  - Cache deletion: add new hook to trigger actions after a successful cache deletion from the admin bar. [#26202]
11
 
@@ -610,5 +627,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
610
 
611
  Misc fixes
612
 
613
- [1.9]: https://github.com/Automattic/wp-super-cache/compare/v1.8...v1.9
 
614
  [1.8]: https://github.com/Automattic/wp-super-cache/compare/v1.7.9...v1.8
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
 
8
+ ## [1.9.2-beta] - 2022-12-09
9
+ ### Added
10
+ - Added a dismissable option to install Jetpack Boost. [#26702]
11
+ - Improved stability with the start of an end-to-end test suite. [#26462]
12
+ - Tested with v6.1 of WordPress. [#26831]
13
+
14
+ ### Changed
15
+ - Updated package dependencies.
16
+
17
+ ### Fixed
18
+ - Compatibility: Avoid use of QUERY_STRING value, which is not available in all environments. [#26251]
19
+ - Updated links to related plugins to remove click-tracking redirects. [#26757]
20
+
21
+ ## [1.9.1] - 2022-11-02
22
+ ### Fixed
23
+ - Fixes crash when using the “Jetpack Mobile Theme” plugin alongside Jetpack 11.5.
24
+
25
+ ## [1.9.0] - 2022-09-16
26
  ### Added
27
  - Cache deletion: add new hook to trigger actions after a successful cache deletion from the admin bar. [#26202]
28
 
627
 
628
  Misc fixes
629
 
630
+ [1.9.1-beta]: https://github.com/Automattic/wp-super-cache/compare/v1.9.0...v1.9.1-beta
631
+ [1.9.0]: https://github.com/Automattic/wp-super-cache/compare/v1.8...v1.9
632
  [1.8]: https://github.com/Automattic/wp-super-cache/compare/v1.7.9...v1.8
README.md CHANGED
@@ -9,7 +9,7 @@ A very fast caching engine for WordPress that produces static html files.
9
  ## Contribute
10
 
11
  ## Get Help
12
- More will be added here soon.
13
  ## Security
14
 
15
  Need to report a security vulnerability? Go to [https://automattic.com/security/](https://automattic.com/security/) or directly to our security bug bounty site [https://hackerone.com/automattic](https://hackerone.com/automattic).
9
  ## Contribute
10
 
11
  ## Get Help
12
+ Support is handled via the .org support forums.
13
  ## Security
14
 
15
  Need to report a security vulnerability? Go to [https://automattic.com/security/](https://automattic.com/security/) or directly to our security bug bounty site [https://hackerone.com/automattic](https://hackerone.com/automattic).
assets/boost-performance-2x.png ADDED
Binary file
assets/boost-performance.png ADDED
Binary file
assets/jetpack-colors.svg ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width="513" height="400" viewBox="0 0 513 400" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g filter="url(#filter0_f_2285_9948)">
3
+ <path opacity="0.7" d="M505.462 -126.766C530.541 -119.966 549.288 -98.8259 572.421 -86.2516C600.401 -71.0427 638.717 -72.4006 656.759 -44.5276C674.393 -17.2838 665.913 20.8197 663.238 54.0552C660.751 84.9436 650.487 113.365 641.675 142.841C632.059 175.007 630.926 212.795 608.725 236.396C586.471 260.054 552.462 263.253 522.033 270.029C492.682 276.566 463.078 280.134 433.434 275.432C402.994 270.605 372.263 262.269 347.494 242.349C322.667 222.382 304.977 193.366 292.881 162.392C281.191 132.458 280.938 99.6507 279.082 67.1702C277.181 33.9036 268.485 -1.53342 281.799 -31.5256C295.088 -61.4623 324.768 -77.8611 350.985 -94.8026C374.635 -110.085 400.357 -119.998 427.357 -125.585C453.264 -130.946 479.871 -133.705 505.462 -126.766Z" fill="#F5E6B3"/>
4
+ <path opacity="0.7" d="M274.015 156.173C295.086 169.132 307.167 193.384 321.975 214.247C336.016 234.031 352.197 252.418 359.227 276.233C366.356 300.379 368.273 326.743 362.435 351.298C356.74 375.254 340.991 394.185 326.63 413.345C312.893 431.674 295.965 445.599 279.86 461.47C259.756 481.283 245.911 513.006 219.385 519.036C193.402 524.943 169.073 503.68 144.71 492.194C120.547 480.803 90.952 475.33 76.2142 451.541C61.3709 427.582 68.762 395.334 66.8348 366.495C65.2206 342.34 64.3226 318.928 65.737 294.759C67.2819 268.358 62.3709 239.32 75.5755 217.13C88.7931 194.918 115.438 188.59 136.618 175.644C157.993 162.579 177.206 143.602 201.505 140.158C226.271 136.649 252.261 142.795 274.015 156.173Z" fill="#CED9F2"/>
5
+ <path d="M549.377 206.234C594.702 223.625 610.9 283.303 639.95 325.028C666.696 363.443 704.795 395.077 713.74 442.307C722.685 489.54 697.844 534.7 688.591 581.863C678.121 635.231 687.426 696.612 655.585 738.726C623.071 781.732 567.997 793.298 518.428 806.93C467.16 821.029 413.471 836.097 362.916 819.213C311.973 802.2 266.336 763.635 239.174 713.667C213.549 666.525 223.51 608.177 218.559 553.647C214.133 504.904 202.281 457.338 211.548 409.411C221.467 358.118 235.699 302.891 273.35 270.285C310.684 237.954 363.969 247.851 410.604 237.03C457.576 226.13 504.076 188.853 549.377 206.234Z" fill="#069E08" fill-opacity="0.11"/>
6
+ </g>
7
+ <defs>
8
+ <filter id="filter0_f_2285_9948" x="-19.4263" y="-215.362" width="819.537" height="1126.51" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
9
+ <feFlood flood-opacity="0" result="BackgroundImageFix"/>
10
+ <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
11
+ <feGaussianBlur stdDeviation="42.2297" result="effect1_foregroundBlur_2285_9948"/>
12
+ </filter>
13
+ </defs>
14
+ </svg>
assets/jetpack-logo.svg ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg class="jitm-jp-logo" viewBox="0 0 176 32" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M16 32C24.8365 32 32 24.8362 32 15.9994C32 7.16259 24.8365 0 16 0C7.16351 0 0 7.16377 0 16.0006C0 24.8374 7.16351 32 16 32Z" fill="#069E08"/>
3
+ <path d="m16.794 13.313v15.511l8-15.511h-8z" fill="#fff"/>
4
+ <path d="m15.176 18.657v-15.482l-7.9692 15.482h7.9692z" fill="#fff"/>
5
+ <path d="m41.711 27.015c-0.4629-0.7159-0.8936-1.4307-1.3254-2.1152 2.2813-1.4004 3.0517-2.5196 3.0517-4.636v-12.227h-2.6821v-2.3325h5.7039v13.938c0 3.547-1.0169 5.5378-4.7481 7.3729z"/>
6
+ <path d="m65.603 18.677c0 1.1819 0.8326 1.3063 1.3876 1.3063 0.5551 0 1.3566-0.1871 1.9727-0.3731v2.178c-0.8637 0.2801-1.7573 0.4974-2.9907 0.4974-1.4798 0-3.206-0.5602-3.206-3.174v-6.4095h-1.5719v-2.2093h1.5719v-3.2657h2.8364v3.2669h3.5756v2.2093h-3.5756v5.9737z"/>
7
+ <path d="m71.523 28.104v-17.641h2.7132v1.0576c1.079-0.8402 2.2813-1.369 3.7611-1.369 2.5588 0 4.5937 1.8049 4.5937 5.6935 0 3.8585-2.2191 6.4095-5.8881 6.4095-0.8936 0-1.603-0.1243-2.3435-0.2801v6.098h-2.8364v0.0314zm5.7338-15.587c-0.8326 0-1.8805 0.4045-2.8675 1.2761v6.0051c0.6161 0.1243 1.2645 0.2173 2.127 0.2173 2.0038 0 3.145-1.2761 3.145-3.9515 0-2.458-0.8326-3.547-2.4045-3.547z"/>
8
+ <path d="m93.748 22.007h-2.651v-1.2761h-0.0622c-0.9247 0.716-2.066 1.4935-3.7611 1.4935-1.4798 0-3.0828-1.089-3.0828-3.2983 0-2.9555 2.4966-3.5157 4.254-3.7644l2.4966-0.3416v-0.3417c0-1.5562-0.6161-2.0536-2.066-2.0536-0.7094 0-2.3734 0.2173-3.73 0.7775l-0.2464-2.3023c1.2334-0.4358 2.9285-0.7461 4.3473-0.7461 2.7741 0 4.5626 1.1204 4.5626 4.4489v7.4042h-0.061zm-2.8364-5.382-2.3435 0.373c-0.7094 0.093-1.4487 0.5288-1.4487 1.5864 0 0.9332 0.524 1.462 1.2944 1.462 0.8326 0 1.7262-0.4974 2.4966-1.0576v-2.3638h0.0012z"/>
9
+ <path d="m105.46 21.633c-1.171 0.4044-2.219 0.6531-3.546 0.6531-4.2537 0-5.95-2.458-5.95-6.0352 0-3.7643 2.3435-6.098 6.135-6.098 1.417 0 2.281 0.2487 3.237 0.5602v2.4266c-0.833-0.3115-2.035-0.6531-3.206-0.6531-1.727 0-3.2064 0.9332-3.2064 3.6085 0 2.9555 1.4794 3.8585 3.3604 3.8585 0.894 0 1.88-0.1871 3.206-0.7159v2.3953h-0.03z"/>
10
+ <path d="m110.83 15.442c0.246-0.2801 0.432-0.5602 4.008-4.9474h3.698l-4.624 5.4762 5.055 6.0666h-3.699l-4.408-5.4762v5.4762h-2.835v-16.333h2.836v9.7379h-0.031z"/>
11
+ <path d="m59.066 21.632c-1.4798 0.4672-2.7443 0.6531-4.2241 0.6531-3.6378 0-5.888-1.8351-5.888-6.1294 0-3.1425 1.9116-6.005 5.5794-6.005 3.6379 0 4.9023 2.551 4.9023 4.9776 0 0.8089-0.0622 1.2447-0.0921 1.7107h-7.3367c0.0622 2.5197 1.4798 3.1112 3.6067 3.1112 1.1712 0 2.2191-0.2801 3.4226-0.7159v2.3953h0.0299v0.0024zm-2.5888-6.6896c0-1.4005-0.4629-2.6138-1.9726-2.6138-1.4176 0-2.2813 1.0262-2.4667 2.6138h4.4393z"/>
12
+ <path d="m131.97 10.894c0 0.6585-0.146 1.2617-0.439 1.8106-0.293 0.549-0.777 1.0038-1.452 1.3679v0.0454c0.375 0.1284 0.718 0.2933 1.03 0.4936 0.311 0.2003 0.577 0.4383 0.799 0.7149 0.22 0.2767 0.394 0.5888 0.518 0.9363 0.124 0.3486 0.185 0.7382 0.185 1.1687 0 0.3708-0.058 0.7681-0.174 1.192-0.117 0.4238-0.321 0.8344-0.614 1.2317s-0.683 0.7626-1.17 1.0946c-0.487 0.3331-1.103 0.5976-1.846 0.7946-0.188 0.0454-0.392 0.0874-0.614 0.1251-0.221 0.0376-0.467 0.0697-0.737 0.0962-0.27 0.0266-0.571 0.0454-0.9 0.0565-0.331 0.0111-0.702 0.0166-1.114 0.0166h-4.378v-15.184h5.234c1.117 0 2.018 0.114 2.701 0.34087 0.51 0.16601 0.953 0.38403 1.328 0.65297 0.375 0.26893 0.685 0.56774 0.929 0.89644 0.243 0.3287 0.423 0.67731 0.54 1.0436 0.116 0.36628 0.174 0.73598 0.174 1.1056zm-5.661 2.2135c0.749 0 1.309-0.0753 1.677-0.2269 0.413-0.1738 0.707-0.4139 0.883-0.7205 0.176-0.3065 0.265-0.6529 0.265-1.0381 0-0.4006-0.101-0.7581-0.304-1.0724-0.203-0.31431-0.548-0.54672-1.035-0.69834-0.203-0.06087-0.439-0.10403-0.709-0.13059s-0.604-0.03984-1.002-0.03984h-2.262v3.9267h2.487zm-2.487 2.3263v4.2786h1.801c0.479 0 0.892-0.0133 1.238-0.0399 0.344-0.0265 0.641-0.0697 0.889-0.1306 0.383-0.083 0.701-0.1948 0.957-0.3353 0.255-0.1395 0.461-0.2988 0.619-0.477 0.158-0.1771 0.27-0.3741 0.338-0.5899s0.101-0.4438 0.101-0.6861c0-0.4239-0.116-0.7947-0.349-1.1123s-0.596-0.5556-1.092-0.7149c-0.217-0.0687-0.473-0.1174-0.765-0.1472-0.293-0.0299-0.667-0.0454-1.125-0.0454h-2.612z" fill="#646970"/>
13
+ <path d="m145.21 16.368c0 0.8697-0.13 1.6634-0.391 2.3813-0.261 0.7178-0.635 1.3318-1.121 1.8432-0.487 0.5113-1.075 0.9065-1.765 1.1845-0.689 0.2791-1.459 0.4175-2.31 0.4175-0.873 0-1.657-0.1396-2.351-0.4175-0.694-0.278-1.281-0.6732-1.764-1.1845-0.484-0.5114-0.854-1.1254-1.109-1.8432-0.257-0.7168-0.386-1.5116-0.386-2.3813s0.13-1.6634 0.391-2.3813c0.261-0.7167 0.635-1.3319 1.121-1.8432 0.487-0.5113 1.076-0.9065 1.765-1.1845 0.689-0.2791 1.46-0.4175 2.31-0.4175 0.874 0 1.657 0.1396 2.351 0.4175 0.694 0.2791 1.282 0.6732 1.765 1.1845s0.852 1.1254 1.108 1.8432c0.257 0.7179 0.386 1.5116 0.386 2.3813zm-2.816 0c0-0.5872-0.07-1.1064-0.207-1.5574-0.138-0.4499-0.33-0.8284-0.575-1.1331-0.246-0.3048-0.541-0.5337-0.886-0.6866-0.345-0.153-0.721-0.2289-1.127-0.2289-0.399 0-0.768 0.0759-1.108 0.2289-0.341 0.1529-0.635 0.3818-0.879 0.6866-0.246 0.3059-0.438 0.6832-0.575 1.1331-0.138 0.4499-0.208 0.9691-0.208 1.5574 0 0.5872 0.07 1.1063 0.208 1.5574 0.137 0.4499 0.331 0.8261 0.58 1.1275 0.249 0.3015 0.544 0.5303 0.885 0.6866s0.714 0.2345 1.121 0.2345c0.406 0 0.778-0.0782 1.115-0.2345 0.338-0.1563 0.628-0.3851 0.874-0.6866 0.245-0.3014 0.437-0.6776 0.575-1.1275 0.137-0.4511 0.207-0.9702 0.207-1.5574z" fill="#646970"/>
14
+ <path d="m157.45 16.368c0 0.8697-0.126 1.6634-0.379 2.3813-0.253 0.7178-0.615 1.3318-1.086 1.8432-0.471 0.5113-1.042 0.9065-1.71 1.1845-0.667 0.2791-1.413 0.4175-2.238 0.4175-0.846 0-1.605-0.1396-2.277-0.4175-0.672-0.278-1.241-0.6732-1.709-1.1845-0.468-0.5114-0.827-1.1254-1.074-1.8432-0.249-0.7168-0.374-1.5116-0.374-2.3813s0.126-1.6634 0.379-2.3813c0.252-0.7167 0.615-1.3319 1.086-1.8432s1.041-0.9065 1.709-1.1845c0.668-0.2791 1.414-0.4175 2.239-0.4175 0.846 0 1.605 0.1396 2.277 0.4175 0.672 0.2791 1.241 0.6732 1.709 1.1845s0.826 1.1254 1.074 1.8432c0.249 0.7179 0.374 1.5116 0.374 2.3813zm-2.729 0c0-0.5872-0.068-1.1064-0.201-1.5574-0.134-0.4499-0.319-0.8284-0.557-1.1331-0.238-0.3048-0.524-0.5337-0.858-0.6866-0.335-0.153-0.699-0.2289-1.092-0.2289-0.386 0-0.744 0.0759-1.074 0.2289-0.33 0.1529-0.614 0.3818-0.851 0.6866-0.238 0.3059-0.424 0.6832-0.557 1.1331-0.134 0.4499-0.201 0.9691-0.201 1.5574 0 0.5872 0.067 1.1063 0.201 1.5574 0.133 0.4499 0.321 0.8261 0.562 1.1275 0.241 0.3015 0.527 0.5303 0.857 0.6866s0.692 0.2345 1.086 0.2345c0.393 0 0.754-0.0782 1.081-0.2345s0.608-0.3851 0.846-0.6866c0.238-0.3014 0.423-0.6776 0.557-1.1275 0.135-0.4511 0.201-0.9702 0.201-1.5574z" fill="#646970"/>
15
+ <path d="m164.24 18.692c0-0.2367-0.067-0.4309-0.199-0.5839-0.133-0.1529-0.309-0.2802-0.529-0.384-0.219-0.1027-0.471-0.192-0.756-0.269-0.283-0.0759-0.581-0.1529-0.892-0.2288-0.394-0.1072-0.772-0.2311-1.136-0.3718-0.364-0.1406-0.684-0.3259-0.96-0.5548-0.277-0.2288-0.497-0.5168-0.66-0.864-0.163-0.3471-0.245-0.7724-0.245-1.2759 0-0.6184 0.11-1.1542 0.33-1.6086 0.219-0.4543 0.517-0.8294 0.892-1.1274 0.375-0.2981 0.81-0.5191 1.307-0.6642s1.021-0.2177 1.574-0.2177c0.674 0 1.307 0.0558 1.898 0.1663s1.125 0.2534 1.603 0.4287v2.2102c-0.251-0.0837-0.514-0.1618-0.791-0.2344-0.277-0.0725-0.557-0.135-0.841-0.1886s-0.567-0.0971-0.847-0.1318c-0.28-0.0346-0.545-0.0513-0.796-0.0513-0.318 0-0.587 0.0301-0.807 0.0915-0.219 0.0614-0.398 0.1429-0.534 0.2456-0.137 0.1027-0.235 0.221-0.296 0.355s-0.091 0.2724-0.091 0.4175c0 0.2523 0.066 0.4577 0.198 0.6184 0.133 0.1608 0.316 0.2903 0.551 0.3896 0.235 0.0994 0.481 0.1808 0.74 0.2467 0.257 0.0648 0.507 0.1284 0.75 0.1887 0.379 0.0915 0.757 0.202 1.136 0.3315s0.72 0.3114 1.023 0.5436c0.303 0.2333 0.551 0.5347 0.745 0.9042 0.193 0.3706 0.29 0.8417 0.29 1.4133 0 0.6262-0.118 1.1709-0.353 1.6364s-0.563 0.8529-0.983 1.1621-0.925 0.5381-1.512 0.6865c-0.588 0.1485-1.233 0.2233-1.938 0.2233-0.697 0-1.324-0.0558-1.881-0.1663-0.556-0.1106-1.017-0.2501-1.381-0.4175v-2.1857c0.591 0.221 1.136 0.3717 1.637 0.4521 0.5 0.0803 0.967 0.1205 1.398 0.1205 0.334 0 0.644-0.0245 0.932-0.0748 0.289-0.0491 0.536-0.1272 0.745-0.2344s0.374-0.2422 0.495-0.4063c0.124-0.1641 0.184-0.3617 0.184-0.5905z" fill="#646970"/>
16
+ <path d="m176 21.896c-0.302 0.0916-0.661 0.1641-1.079 0.2177-0.417 0.0536-0.808 0.0804-1.169 0.0804-0.92 0-1.671-0.1507-2.256-0.4521-0.584-0.3014-0.996-0.7344-1.237-1.2992-0.173-0.4041-0.26-0.9532-0.26-1.6486v-5.745h-2.046v-2.2323h2.046v-3.1008h2.678v3.1019h3.165v2.2323h-3.165v5.3912c0 0.4275 0.064 0.7445 0.192 0.9498 0.226 0.3516 0.674 0.5269 1.345 0.5269 0.308 0 0.616-0.0246 0.921-0.0748 0.305-0.0491 0.593-0.1128 0.864-0.1887v2.2413h1e-3z" fill="#646970"/>
17
+ </svg>
composer.json CHANGED
@@ -3,9 +3,12 @@
3
  "description": "A very fast caching engine for WordPress that produces static html files.",
4
  "type": "wordpress-plugin",
5
  "license": "GPL-2.0-or-later",
 
 
 
6
  "require-dev": {
7
- "yoast/phpunit-polyfills": "1.0.3",
8
- "automattic/jetpack-changelogger": "^3.2.1"
9
  },
10
  "autoload": {
11
  "classmap": [
@@ -22,6 +25,9 @@
22
  "test-php": [
23
  "@composer phpunit"
24
  ],
 
 
 
25
  "build-production": "echo 'Add your build step to composer.json, please!'",
26
  "build-development": "echo 'Add your build step to composer.json, please!'"
27
  },
@@ -32,12 +38,14 @@
32
  "autorelease": true,
33
  "autotagger": true,
34
  "changelogger": {
35
- "link-template": "https://github.com/Automattic/wp-super-cache/compare/v${old}...v${new}",
36
- "versioning": "wordpress"
37
  },
38
  "mirror-repo": "Automattic/wp-super-cache",
39
  "release-branch-prefix": "super-cache",
40
  "wp-plugin-slug": "wp-super-cache",
41
  "wp-svn-autopublish": true
 
 
 
42
  }
43
  }
3
  "description": "A very fast caching engine for WordPress that produces static html files.",
4
  "type": "wordpress-plugin",
5
  "license": "GPL-2.0-or-later",
6
+ "require": {
7
+ "automattic/jetpack-device-detection": "^1.4.22"
8
+ },
9
  "require-dev": {
10
+ "yoast/phpunit-polyfills": "1.0.4",
11
+ "automattic/jetpack-changelogger": "^3.2.2"
12
  },
13
  "autoload": {
14
  "classmap": [
25
  "test-php": [
26
  "@composer phpunit"
27
  ],
28
+ "test-e2e": [
29
+ "cd tests/e2e && pnpm i && pnpm env:up && pnpm test:run"
30
+ ],
31
  "build-production": "echo 'Add your build step to composer.json, please!'",
32
  "build-development": "echo 'Add your build step to composer.json, please!'"
33
  },
38
  "autorelease": true,
39
  "autotagger": true,
40
  "changelogger": {
41
+ "link-template": "https://github.com/Automattic/wp-super-cache/compare/v${old}...v${new}"
 
42
  },
43
  "mirror-repo": "Automattic/wp-super-cache",
44
  "release-branch-prefix": "super-cache",
45
  "wp-plugin-slug": "wp-super-cache",
46
  "wp-svn-autopublish": true
47
+ },
48
+ "config": {
49
+ "autoloader-suffix": "6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_9_2_beta"
50
  }
51
  }
composer.lock CHANGED
@@ -4,21 +4,66 @@
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
- "content-hash": "79334316f1f331330f5c6a33cb56a227",
8
- "packages": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  "packages-dev": [
10
  {
11
  "name": "automattic/jetpack-changelogger",
12
- "version": "v3.2.1",
13
  "source": {
14
  "type": "git",
15
  "url": "https://github.com/Automattic/jetpack-changelogger.git",
16
- "reference": "f9bb6e3fd5ca2436637041578067875eba4c3d49"
17
  },
18
  "dist": {
19
  "type": "zip",
20
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/f9bb6e3fd5ca2436637041578067875eba4c3d49",
21
- "reference": "f9bb6e3fd5ca2436637041578067875eba4c3d49",
22
  "shasum": ""
23
  },
24
  "require": {
@@ -29,7 +74,7 @@
29
  },
30
  "require-dev": {
31
  "wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
32
- "yoast/phpunit-polyfills": "1.0.3"
33
  },
34
  "bin": [
35
  "bin/changelogger"
@@ -60,9 +105,9 @@
60
  ],
61
  "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
62
  "support": {
63
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.2.1"
64
  },
65
- "time": "2022-08-26T18:35:48+00:00"
66
  },
67
  {
68
  "name": "doctrine/instantiator",
@@ -195,16 +240,16 @@
195
  },
196
  {
197
  "name": "nikic/php-parser",
198
- "version": "v4.15.1",
199
  "source": {
200
  "type": "git",
201
  "url": "https://github.com/nikic/PHP-Parser.git",
202
- "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900"
203
  },
204
  "dist": {
205
  "type": "zip",
206
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
207
- "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
208
  "shasum": ""
209
  },
210
  "require": {
@@ -245,9 +290,9 @@
245
  ],
246
  "support": {
247
  "issues": "https://github.com/nikic/PHP-Parser/issues",
248
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1"
249
  },
250
- "time": "2022-09-04T07:30:47+00:00"
251
  },
252
  {
253
  "name": "phar-io/manifest",
@@ -362,16 +407,16 @@
362
  },
363
  {
364
  "name": "phpunit/php-code-coverage",
365
- "version": "9.2.17",
366
  "source": {
367
  "type": "git",
368
  "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
369
- "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8"
370
  },
371
  "dist": {
372
  "type": "zip",
373
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8",
374
- "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8",
375
  "shasum": ""
376
  },
377
  "require": {
@@ -427,7 +472,7 @@
427
  ],
428
  "support": {
429
  "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
430
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17"
431
  },
432
  "funding": [
433
  {
@@ -435,7 +480,7 @@
435
  "type": "github"
436
  }
437
  ],
438
- "time": "2022-08-30T12:24:04+00:00"
439
  },
440
  {
441
  "name": "phpunit/php-file-iterator",
@@ -680,16 +725,16 @@
680
  },
681
  {
682
  "name": "phpunit/phpunit",
683
- "version": "9.5.24",
684
  "source": {
685
  "type": "git",
686
  "url": "https://github.com/sebastianbergmann/phpunit.git",
687
- "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5"
688
  },
689
  "dist": {
690
  "type": "zip",
691
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5",
692
- "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5",
693
  "shasum": ""
694
  },
695
  "require": {
@@ -711,14 +756,14 @@
711
  "phpunit/php-timer": "^5.0.2",
712
  "sebastian/cli-parser": "^1.0.1",
713
  "sebastian/code-unit": "^1.0.6",
714
- "sebastian/comparator": "^4.0.5",
715
  "sebastian/diff": "^4.0.3",
716
  "sebastian/environment": "^5.1.3",
717
- "sebastian/exporter": "^4.0.3",
718
  "sebastian/global-state": "^5.0.1",
719
  "sebastian/object-enumerator": "^4.0.3",
720
  "sebastian/resource-operations": "^3.0.3",
721
- "sebastian/type": "^3.1",
722
  "sebastian/version": "^3.0.2"
723
  },
724
  "suggest": {
@@ -762,7 +807,7 @@
762
  ],
763
  "support": {
764
  "issues": "https://github.com/sebastianbergmann/phpunit/issues",
765
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24"
766
  },
767
  "funding": [
768
  {
@@ -772,9 +817,13 @@
772
  {
773
  "url": "https://github.com/sebastianbergmann",
774
  "type": "github"
 
 
 
 
775
  }
776
  ],
777
- "time": "2022-08-30T07:42:16+00:00"
778
  },
779
  {
780
  "name": "psr/container",
@@ -998,16 +1047,16 @@
998
  },
999
  {
1000
  "name": "sebastian/comparator",
1001
- "version": "4.0.6",
1002
  "source": {
1003
  "type": "git",
1004
  "url": "https://github.com/sebastianbergmann/comparator.git",
1005
- "reference": "55f4261989e546dc112258c7a75935a81a7ce382"
1006
  },
1007
  "dist": {
1008
  "type": "zip",
1009
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382",
1010
- "reference": "55f4261989e546dc112258c7a75935a81a7ce382",
1011
  "shasum": ""
1012
  },
1013
  "require": {
@@ -1060,7 +1109,7 @@
1060
  ],
1061
  "support": {
1062
  "issues": "https://github.com/sebastianbergmann/comparator/issues",
1063
- "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6"
1064
  },
1065
  "funding": [
1066
  {
@@ -1068,7 +1117,7 @@
1068
  "type": "github"
1069
  }
1070
  ],
1071
- "time": "2020-10-26T15:49:45+00:00"
1072
  },
1073
  {
1074
  "name": "sebastian/complexity",
@@ -1258,16 +1307,16 @@
1258
  },
1259
  {
1260
  "name": "sebastian/exporter",
1261
- "version": "4.0.4",
1262
  "source": {
1263
  "type": "git",
1264
  "url": "https://github.com/sebastianbergmann/exporter.git",
1265
- "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9"
1266
  },
1267
  "dist": {
1268
  "type": "zip",
1269
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9",
1270
- "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9",
1271
  "shasum": ""
1272
  },
1273
  "require": {
@@ -1323,7 +1372,7 @@
1323
  ],
1324
  "support": {
1325
  "issues": "https://github.com/sebastianbergmann/exporter/issues",
1326
- "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4"
1327
  },
1328
  "funding": [
1329
  {
@@ -1331,7 +1380,7 @@
1331
  "type": "github"
1332
  }
1333
  ],
1334
- "time": "2021-11-11T14:18:36+00:00"
1335
  },
1336
  {
1337
  "name": "sebastian/global-state",
@@ -1795,16 +1844,16 @@
1795
  },
1796
  {
1797
  "name": "symfony/console",
1798
- "version": "v6.0.12",
1799
  "source": {
1800
  "type": "git",
1801
  "url": "https://github.com/symfony/console.git",
1802
- "reference": "c5c2e313aa682530167c25077d6bdff36346251e"
1803
  },
1804
  "dist": {
1805
  "type": "zip",
1806
- "url": "https://api.github.com/repos/symfony/console/zipball/c5c2e313aa682530167c25077d6bdff36346251e",
1807
- "reference": "c5c2e313aa682530167c25077d6bdff36346251e",
1808
  "shasum": ""
1809
  },
1810
  "require": {
@@ -1870,7 +1919,7 @@
1870
  "terminal"
1871
  ],
1872
  "support": {
1873
- "source": "https://github.com/symfony/console/tree/v6.0.12"
1874
  },
1875
  "funding": [
1876
  {
@@ -1886,20 +1935,20 @@
1886
  "type": "tidelift"
1887
  }
1888
  ],
1889
- "time": "2022-08-23T20:52:30+00:00"
1890
  },
1891
  {
1892
  "name": "symfony/polyfill-ctype",
1893
- "version": "v1.26.0",
1894
  "source": {
1895
  "type": "git",
1896
  "url": "https://github.com/symfony/polyfill-ctype.git",
1897
- "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4"
1898
  },
1899
  "dist": {
1900
  "type": "zip",
1901
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
1902
- "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
1903
  "shasum": ""
1904
  },
1905
  "require": {
@@ -1914,7 +1963,7 @@
1914
  "type": "library",
1915
  "extra": {
1916
  "branch-alias": {
1917
- "dev-main": "1.26-dev"
1918
  },
1919
  "thanks": {
1920
  "name": "symfony/polyfill",
@@ -1952,7 +2001,7 @@
1952
  "portable"
1953
  ],
1954
  "support": {
1955
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0"
1956
  },
1957
  "funding": [
1958
  {
@@ -1968,7 +2017,7 @@
1968
  "type": "tidelift"
1969
  }
1970
  ],
1971
- "time": "2022-05-24T11:49:31+00:00"
1972
  },
1973
  {
1974
  "name": "symfony/polyfill-intl-grapheme",
@@ -2363,16 +2412,16 @@
2363
  },
2364
  {
2365
  "name": "symfony/string",
2366
- "version": "v6.0.12",
2367
  "source": {
2368
  "type": "git",
2369
  "url": "https://github.com/symfony/string.git",
2370
- "reference": "3a975ba1a1508ad97df45f4590f55b7cc4c1a0a0"
2371
  },
2372
  "dist": {
2373
  "type": "zip",
2374
- "url": "https://api.github.com/repos/symfony/string/zipball/3a975ba1a1508ad97df45f4590f55b7cc4c1a0a0",
2375
- "reference": "3a975ba1a1508ad97df45f4590f55b7cc4c1a0a0",
2376
  "shasum": ""
2377
  },
2378
  "require": {
@@ -2428,7 +2477,7 @@
2428
  "utf8"
2429
  ],
2430
  "support": {
2431
- "source": "https://github.com/symfony/string/tree/v6.0.12"
2432
  },
2433
  "funding": [
2434
  {
@@ -2444,7 +2493,7 @@
2444
  "type": "tidelift"
2445
  }
2446
  ],
2447
- "time": "2022-08-12T18:05:20+00:00"
2448
  },
2449
  {
2450
  "name": "theseer/tokenizer",
@@ -2553,16 +2602,16 @@
2553
  },
2554
  {
2555
  "name": "yoast/phpunit-polyfills",
2556
- "version": "1.0.3",
2557
  "source": {
2558
  "type": "git",
2559
  "url": "https://github.com/Yoast/PHPUnit-Polyfills.git",
2560
- "reference": "5ea3536428944955f969bc764bbe09738e151ada"
2561
  },
2562
  "dist": {
2563
  "type": "zip",
2564
- "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/5ea3536428944955f969bc764bbe09738e151ada",
2565
- "reference": "5ea3536428944955f969bc764bbe09738e151ada",
2566
  "shasum": ""
2567
  },
2568
  "require": {
@@ -2570,7 +2619,7 @@
2570
  "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
2571
  },
2572
  "require-dev": {
2573
- "yoast/yoastcs": "^2.2.0"
2574
  },
2575
  "type": "library",
2576
  "extra": {
@@ -2610,7 +2659,7 @@
2610
  "issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues",
2611
  "source": "https://github.com/Yoast/PHPUnit-Polyfills"
2612
  },
2613
- "time": "2021-11-23T01:37:03+00:00"
2614
  }
2615
  ],
2616
  "aliases": [],
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
+ "content-hash": "ad4795c70efdc06674e44403d472186f",
8
+ "packages": [
9
+ {
10
+ "name": "automattic/jetpack-device-detection",
11
+ "version": "v1.4.22",
12
+ "source": {
13
+ "type": "git",
14
+ "url": "https://github.com/Automattic/jetpack-device-detection.git",
15
+ "reference": "2da848bca9a3622885c05509f0a1dab8264067b2"
16
+ },
17
+ "dist": {
18
+ "type": "zip",
19
+ "url": "https://api.github.com/repos/Automattic/jetpack-device-detection/zipball/2da848bca9a3622885c05509f0a1dab8264067b2",
20
+ "reference": "2da848bca9a3622885c05509f0a1dab8264067b2",
21
+ "shasum": ""
22
+ },
23
+ "require-dev": {
24
+ "automattic/jetpack-changelogger": "^3.2.2",
25
+ "yoast/phpunit-polyfills": "1.0.4"
26
+ },
27
+ "type": "jetpack-library",
28
+ "extra": {
29
+ "autotagger": true,
30
+ "mirror-repo": "Automattic/jetpack-device-detection",
31
+ "changelogger": {
32
+ "link-template": "https://github.com/Automattic/jetpack-device-detection/compare/v${old}...v${new}"
33
+ },
34
+ "branch-alias": {
35
+ "dev-trunk": "1.4.x-dev"
36
+ }
37
+ },
38
+ "autoload": {
39
+ "classmap": [
40
+ "src/"
41
+ ]
42
+ },
43
+ "notification-url": "https://packagist.org/downloads/",
44
+ "license": [
45
+ "GPL-2.0-or-later"
46
+ ],
47
+ "description": "A way to detect device types based on User-Agent header.",
48
+ "support": {
49
+ "source": "https://github.com/Automattic/jetpack-device-detection/tree/v1.4.22"
50
+ },
51
+ "time": "2022-12-02T19:01:40+00:00"
52
+ }
53
+ ],
54
  "packages-dev": [
55
  {
56
  "name": "automattic/jetpack-changelogger",
57
+ "version": "v3.2.2",
58
  "source": {
59
  "type": "git",
60
  "url": "https://github.com/Automattic/jetpack-changelogger.git",
61
+ "reference": "06e5b74388cbfd228c3474496e63f0d5658fd684"
62
  },
63
  "dist": {
64
  "type": "zip",
65
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/06e5b74388cbfd228c3474496e63f0d5658fd684",
66
+ "reference": "06e5b74388cbfd228c3474496e63f0d5658fd684",
67
  "shasum": ""
68
  },
69
  "require": {
74
  },
75
  "require-dev": {
76
  "wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
77
+ "yoast/phpunit-polyfills": "1.0.4"
78
  },
79
  "bin": [
80
  "bin/changelogger"
105
  ],
106
  "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
107
  "support": {
108
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.2.2"
109
  },
110
+ "time": "2022-12-02T19:01:22+00:00"
111
  },
112
  {
113
  "name": "doctrine/instantiator",
240
  },
241
  {
242
  "name": "nikic/php-parser",
243
+ "version": "v4.15.2",
244
  "source": {
245
  "type": "git",
246
  "url": "https://github.com/nikic/PHP-Parser.git",
247
+ "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc"
248
  },
249
  "dist": {
250
  "type": "zip",
251
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
252
+ "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
253
  "shasum": ""
254
  },
255
  "require": {
290
  ],
291
  "support": {
292
  "issues": "https://github.com/nikic/PHP-Parser/issues",
293
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2"
294
  },
295
+ "time": "2022-11-12T15:38:23+00:00"
296
  },
297
  {
298
  "name": "phar-io/manifest",
407
  },
408
  {
409
  "name": "phpunit/php-code-coverage",
410
+ "version": "9.2.19",
411
  "source": {
412
  "type": "git",
413
  "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
414
+ "reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559"
415
  },
416
  "dist": {
417
  "type": "zip",
418
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c77b56b63e3d2031bd8997fcec43c1925ae46559",
419
+ "reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559",
420
  "shasum": ""
421
  },
422
  "require": {
472
  ],
473
  "support": {
474
  "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
475
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.19"
476
  },
477
  "funding": [
478
  {
480
  "type": "github"
481
  }
482
  ],
483
+ "time": "2022-11-18T07:47:47+00:00"
484
  },
485
  {
486
  "name": "phpunit/php-file-iterator",
725
  },
726
  {
727
  "name": "phpunit/phpunit",
728
+ "version": "9.5.26",
729
  "source": {
730
  "type": "git",
731
  "url": "https://github.com/sebastianbergmann/phpunit.git",
732
+ "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2"
733
  },
734
  "dist": {
735
  "type": "zip",
736
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/851867efcbb6a1b992ec515c71cdcf20d895e9d2",
737
+ "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2",
738
  "shasum": ""
739
  },
740
  "require": {
756
  "phpunit/php-timer": "^5.0.2",
757
  "sebastian/cli-parser": "^1.0.1",
758
  "sebastian/code-unit": "^1.0.6",
759
+ "sebastian/comparator": "^4.0.8",
760
  "sebastian/diff": "^4.0.3",
761
  "sebastian/environment": "^5.1.3",
762
+ "sebastian/exporter": "^4.0.5",
763
  "sebastian/global-state": "^5.0.1",
764
  "sebastian/object-enumerator": "^4.0.3",
765
  "sebastian/resource-operations": "^3.0.3",
766
+ "sebastian/type": "^3.2",
767
  "sebastian/version": "^3.0.2"
768
  },
769
  "suggest": {
807
  ],
808
  "support": {
809
  "issues": "https://github.com/sebastianbergmann/phpunit/issues",
810
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.26"
811
  },
812
  "funding": [
813
  {
817
  {
818
  "url": "https://github.com/sebastianbergmann",
819
  "type": "github"
820
+ },
821
+ {
822
+ "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
823
+ "type": "tidelift"
824
  }
825
  ],
826
+ "time": "2022-10-28T06:00:21+00:00"
827
  },
828
  {
829
  "name": "psr/container",
1047
  },
1048
  {
1049
  "name": "sebastian/comparator",
1050
+ "version": "4.0.8",
1051
  "source": {
1052
  "type": "git",
1053
  "url": "https://github.com/sebastianbergmann/comparator.git",
1054
+ "reference": "fa0f136dd2334583309d32b62544682ee972b51a"
1055
  },
1056
  "dist": {
1057
  "type": "zip",
1058
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
1059
+ "reference": "fa0f136dd2334583309d32b62544682ee972b51a",
1060
  "shasum": ""
1061
  },
1062
  "require": {
1109
  ],
1110
  "support": {
1111
  "issues": "https://github.com/sebastianbergmann/comparator/issues",
1112
+ "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
1113
  },
1114
  "funding": [
1115
  {
1117
  "type": "github"
1118
  }
1119
  ],
1120
+ "time": "2022-09-14T12:41:17+00:00"
1121
  },
1122
  {
1123
  "name": "sebastian/complexity",
1307
  },
1308
  {
1309
  "name": "sebastian/exporter",
1310
+ "version": "4.0.5",
1311
  "source": {
1312
  "type": "git",
1313
  "url": "https://github.com/sebastianbergmann/exporter.git",
1314
+ "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d"
1315
  },
1316
  "dist": {
1317
  "type": "zip",
1318
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
1319
+ "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
1320
  "shasum": ""
1321
  },
1322
  "require": {
1372
  ],
1373
  "support": {
1374
  "issues": "https://github.com/sebastianbergmann/exporter/issues",
1375
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
1376
  },
1377
  "funding": [
1378
  {
1380
  "type": "github"
1381
  }
1382
  ],
1383
+ "time": "2022-09-14T06:03:37+00:00"
1384
  },
1385
  {
1386
  "name": "sebastian/global-state",
1844
  },
1845
  {
1846
  "name": "symfony/console",
1847
+ "version": "v6.0.15",
1848
  "source": {
1849
  "type": "git",
1850
  "url": "https://github.com/symfony/console.git",
1851
+ "reference": "b0b910724a0a0326b4481e4f8a30abb2dd442efb"
1852
  },
1853
  "dist": {
1854
  "type": "zip",
1855
+ "url": "https://api.github.com/repos/symfony/console/zipball/b0b910724a0a0326b4481e4f8a30abb2dd442efb",
1856
+ "reference": "b0b910724a0a0326b4481e4f8a30abb2dd442efb",
1857
  "shasum": ""
1858
  },
1859
  "require": {
1919
  "terminal"
1920
  ],
1921
  "support": {
1922
+ "source": "https://github.com/symfony/console/tree/v6.0.15"
1923
  },
1924
  "funding": [
1925
  {
1935
  "type": "tidelift"
1936
  }
1937
  ],
1938
+ "time": "2022-10-26T21:42:20+00:00"
1939
  },
1940
  {
1941
  "name": "symfony/polyfill-ctype",
1942
+ "version": "v1.27.0",
1943
  "source": {
1944
  "type": "git",
1945
  "url": "https://github.com/symfony/polyfill-ctype.git",
1946
+ "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
1947
  },
1948
  "dist": {
1949
  "type": "zip",
1950
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
1951
+ "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
1952
  "shasum": ""
1953
  },
1954
  "require": {
1963
  "type": "library",
1964
  "extra": {
1965
  "branch-alias": {
1966
+ "dev-main": "1.27-dev"
1967
  },
1968
  "thanks": {
1969
  "name": "symfony/polyfill",
2001
  "portable"
2002
  ],
2003
  "support": {
2004
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
2005
  },
2006
  "funding": [
2007
  {
2017
  "type": "tidelift"
2018
  }
2019
  ],
2020
+ "time": "2022-11-03T14:55:06+00:00"
2021
  },
2022
  {
2023
  "name": "symfony/polyfill-intl-grapheme",
2412
  },
2413
  {
2414
  "name": "symfony/string",
2415
+ "version": "v6.0.15",
2416
  "source": {
2417
  "type": "git",
2418
  "url": "https://github.com/symfony/string.git",
2419
+ "reference": "51ac0fa0ccf132a00519b87c97e8f775fa14e771"
2420
  },
2421
  "dist": {
2422
  "type": "zip",
2423
+ "url": "https://api.github.com/repos/symfony/string/zipball/51ac0fa0ccf132a00519b87c97e8f775fa14e771",
2424
+ "reference": "51ac0fa0ccf132a00519b87c97e8f775fa14e771",
2425
  "shasum": ""
2426
  },
2427
  "require": {
2477
  "utf8"
2478
  ],
2479
  "support": {
2480
+ "source": "https://github.com/symfony/string/tree/v6.0.15"
2481
  },
2482
  "funding": [
2483
  {
2493
  "type": "tidelift"
2494
  }
2495
  ],
2496
+ "time": "2022-10-10T09:34:08+00:00"
2497
  },
2498
  {
2499
  "name": "theseer/tokenizer",
2602
  },
2603
  {
2604
  "name": "yoast/phpunit-polyfills",
2605
+ "version": "1.0.4",
2606
  "source": {
2607
  "type": "git",
2608
  "url": "https://github.com/Yoast/PHPUnit-Polyfills.git",
2609
+ "reference": "3c621ff5429d2b1ff96dc5808ad6cde99d31ea4c"
2610
  },
2611
  "dist": {
2612
  "type": "zip",
2613
+ "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/3c621ff5429d2b1ff96dc5808ad6cde99d31ea4c",
2614
+ "reference": "3c621ff5429d2b1ff96dc5808ad6cde99d31ea4c",
2615
  "shasum": ""
2616
  },
2617
  "require": {
2619
  "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
2620
  },
2621
  "require-dev": {
2622
+ "yoast/yoastcs": "^2.2.1"
2623
  },
2624
  "type": "library",
2625
  "extra": {
2659
  "issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues",
2660
  "source": "https://github.com/Yoast/PHPUnit-Polyfills"
2661
  },
2662
+ "time": "2022-11-16T09:07:52+00:00"
2663
  }
2664
  ],
2665
  "aliases": [],
js/admin.js ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery( document ).ready( () => {
2
+ // Don't run on versions of WordPress too old for the block editor and the translation methods it brings.
3
+ // All the install / activate options are plain links with meaningful destinations anyway.
4
+ if ( ! window.wp || ! window.wp.i18n ) {
5
+ return;
6
+ }
7
+
8
+ const { __, sprintf } = window.wp.i18n;
9
+ const ajaxurl = window.ajaxurl;
10
+ const wpscAdmin = window.wpscAdmin;
11
+
12
+ const link = jQuery( '.wpsc-install-action-button' );
13
+ const label = link.find( 'label' );
14
+ const spinner = link.find( '.spinner' );
15
+
16
+ // Dismiss Boost banner.
17
+ jQuery( '.wpsc-boost-dismiss' ).on( 'click', function () {
18
+ jQuery( '.wpsc-boost-banner' ).fadeOut( 'slow' );
19
+
20
+ jQuery.post( ajaxurl, {
21
+ action: 'wpsc-hide-boost-banner',
22
+ nonce: wpscAdmin.boostDismissNonce,
23
+ } );
24
+ } );
25
+
26
+ // One-click install for Boost.
27
+ jQuery( '#wpsc-install-boost-button' ).on( 'click', event => {
28
+ event.preventDefault();
29
+ showBoostBannerBusy( __( 'Installing…', 'wp-super-cache' ) );
30
+
31
+ jQuery
32
+ .post( ajaxurl, {
33
+ action: 'wpsc_install_plugin',
34
+ _ajax_nonce: wpscAdmin.boostInstallNonce,
35
+ slug: 'jetpack-boost',
36
+ } )
37
+ .done( response => {
38
+ if ( response.success ) {
39
+ activateBoost();
40
+ } else {
41
+ showBoostBannerError( response.data );
42
+ }
43
+ } )
44
+ .fail( response => {
45
+ showBoostBannerError(
46
+ sprintf(
47
+ /* translators: %d is an HTTP error code */
48
+ __( 'Failed to install Jetpack Boost: HTTP %d error received', 'wp-super-cache' ),
49
+ response.status
50
+ )
51
+ );
52
+ } );
53
+ } );
54
+
55
+ // Handle activate button click.
56
+ jQuery( '#wpsc-activate-boost-button' ).on( 'click', event => {
57
+ event.preventDefault();
58
+ activateBoost();
59
+ } );
60
+
61
+ // Helper function to show Boost Banner work in progress.
62
+ const showBoostBannerBusy = action => {
63
+ link.attr( 'disabled', true );
64
+ label.text( action );
65
+ spinner.addClass( 'is-active' ).show();
66
+ };
67
+
68
+ // Helper function to reset Boost Banner button.
69
+ const resetBoostBannerButton = () => {
70
+ link.attr( 'disabled', false );
71
+ jQuery( '#wpsc-activate-boost-button' )
72
+ .find( 'label' )
73
+ .text( __( 'Activate Jetpack Boost', 'wp-super-cache' ) );
74
+ jQuery( '#wpsc-install-boost-button' )
75
+ .find( 'label' )
76
+ .text( __( 'Install Jetpack Boost', 'wp-super-cache' ) );
77
+ spinner.removeClass( 'is-active' ).hide();
78
+ };
79
+
80
+ // Helper function to show an error.
81
+ const showBoostBannerError = err => {
82
+ resetBoostBannerButton();
83
+
84
+ jQuery( '#wpsc-boost-banner-error' )
85
+ .text(
86
+ err || __( 'An error occurred while trying to activate Jetpack Boost', 'wp-super-cache' )
87
+ )
88
+ .show();
89
+ };
90
+
91
+ // Activate Jetpack Boost.
92
+ const activateBoost = () => {
93
+ showBoostBannerBusy( __( 'Activating…', 'wp-super-cache' ) );
94
+
95
+ jQuery
96
+ .post( ajaxurl, {
97
+ action: 'wpsc_activate_boost',
98
+ _ajax_nonce: wpscAdmin.boostActivateNonce,
99
+ } )
100
+ .done( response => {
101
+ if ( response.success ) {
102
+ label.text( 'Success! Sending you to Jetpack Boost...' );
103
+ spinner.hide();
104
+ window.location.href = 'admin.php?page=jetpack-boost';
105
+ } else {
106
+ showBoostBannerError( response.data );
107
+ }
108
+ } )
109
+ .fail( response => {
110
+ showBoostBannerError(
111
+ sprintf(
112
+ /* translators: %d is an HTTP error code */
113
+ __( 'Failed to activate Jetpack Boost: HTTP %d error received', 'wp-super-cache' ),
114
+ response.status
115
+ )
116
+ );
117
+ } );
118
+ };
119
+ } );
package.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "private": true,
3
  "name": "@automattic/jetpack-super-cache",
4
- "version": "1.9.0",
5
  "description": "A very fast caching engine for WordPress that produces static html files.",
6
  "homepage": "https://jetpack.com",
7
  "bugs": {
1
  {
2
  "private": true,
3
  "name": "@automattic/jetpack-super-cache",
4
+ "version": "1.9.2-beta",
5
  "description": "A very fast caching engine for WordPress that produces static html files.",
6
  "homepage": "https://jetpack.com",
7
  "bugs": {
partials/easy.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  echo '<form name="wp_manager" action="' . esc_url_raw( add_query_arg( 'tab', 'easy', $admin_url ) ) . '" method="post">';
3
  echo '<input type="hidden" name="action" value="easysetup" />';
4
  wp_nonce_field( 'wp-cache' );
@@ -124,9 +125,34 @@ if ( is_multisite() && wpsupercache_site_admin() ) {
124
  ?>
125
  <h4 class="clear"><?php esc_html_e( 'Recommended Links and Plugins', 'wp-super-cache' ); ?></h4>
126
  <p><?php esc_html_e( 'Caching is only one part of making a website faster. Here are some other plugins that will help:', 'wp-super-cache' ); ?></p>
 
127
  <ul style="list-style: square; margin-left: 2em;">
128
- <li><?php printf( __( '<a href="%s">Jetpack Boost</a> helps speed up your website by generating critical CSS, defering Javascript and much more.', 'wp-super-cache' ), 'https://jetpack.com/redirect/?source=wp-super-cache-boost-rec' ); ?></li>
129
- <li><?php printf( __( '<a href="%s">Jetpack</a> provides everything you need to build a successful WordPress website including an image/photo CDN (free) and a video hosting service (paid).', 'wp-super-cache' ), 'https://jetpack.com/redirect/?source=jitm-wpsc-recommended' ); ?></li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  <li><?php printf( __( '<a href="%s">Yahoo! Yslow</a> analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. Also try the performance tools online at <a href="%s">GTMetrix</a>.', 'wp-super-cache' ), 'http://yslow.org/', 'https://gtmetrix.com/' ); ?></li>
131
  <li><?php printf( __( '<a href="%s">Use Google Libraries</a> allows you to load some commonly used Javascript libraries from Google webservers. Ironically, it may reduce your Yslow score.', 'wp-super-cache' ), 'https://wordpress.org/plugins/use-google-libraries/' ); ?></li>
132
  <li><?php printf( __( '<a href="%s">commonWP</a> does the same job as "Use Google Libraries" and offloads some commonly used static files to an external CDN.', 'wp-super-cache' ), 'https://wordpress.org/plugins/commonwp/' ); ?></li>
1
  <?php
2
+ global $wpsc_promo_links;
3
  echo '<form name="wp_manager" action="' . esc_url_raw( add_query_arg( 'tab', 'easy', $admin_url ) ) . '" method="post">';
4
  echo '<input type="hidden" name="action" value="easysetup" />';
5
  wp_nonce_field( 'wp-cache' );
125
  ?>
126
  <h4 class="clear"><?php esc_html_e( 'Recommended Links and Plugins', 'wp-super-cache' ); ?></h4>
127
  <p><?php esc_html_e( 'Caching is only one part of making a website faster. Here are some other plugins that will help:', 'wp-super-cache' ); ?></p>
128
+
129
  <ul style="list-style: square; margin-left: 2em;">
130
+ <li>
131
+ <?php
132
+ echo \wp_kses(
133
+ \sprintf(
134
+ /* translators: %s: Link URL for Jetpack Boost. */
135
+ __( '<a href="%s">Jetpack Boost</a> helps speed up your website by generating critical CSS, defering Javascript and much more.', 'wp-super-cache' ),
136
+ $wpsc_promo_links['boost']
137
+ ),
138
+ 'a'
139
+ );
140
+ ?>
141
+ </li>
142
+
143
+ <li>
144
+ <?php
145
+ echo \wp_kses(
146
+ \printf(
147
+ /* translators: %s: Link URL for Jetpack. */
148
+ __( '<a href="%s">Jetpack</a> provides everything you need to build a successful WordPress website including an image/photo CDN (free) and a video hosting service (paid).', 'wp-super-cache' ),
149
+ $wpsc_promo_links['jetpack']
150
+ ),
151
+ 'a'
152
+ );
153
+ ?>
154
+ </li>
155
+
156
  <li><?php printf( __( '<a href="%s">Yahoo! Yslow</a> analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. Also try the performance tools online at <a href="%s">GTMetrix</a>.', 'wp-super-cache' ), 'http://yslow.org/', 'https://gtmetrix.com/' ); ?></li>
157
  <li><?php printf( __( '<a href="%s">Use Google Libraries</a> allows you to load some commonly used Javascript libraries from Google webservers. Ironically, it may reduce your Yslow score.', 'wp-super-cache' ), 'https://wordpress.org/plugins/use-google-libraries/' ); ?></li>
158
  <li><?php printf( __( '<a href="%s">commonWP</a> does the same job as "Use Google Libraries" and offloads some commonly used static files to an external CDN.', 'wp-super-cache' ), 'https://wordpress.org/plugins/commonwp/' ); ?></li>
readme.txt CHANGED
@@ -268,16 +268,18 @@ Your theme is probably responsive which means it resizes the page to suit whatev
268
 
269
 
270
  == Changelog ==
271
- ### 1.9.1 - 2022-11-02
272
- #### Fixed
273
- - Fixes crash when using the "Jetpack Mobile Theme" plugin alongside Jetpack 11.5.
274
-
275
- ### 1.9 - 2022-09-16
276
  #### Added
277
- - Cache deletion: add new hook to trigger actions after a successful cache deletion from the admin bar.
 
 
 
 
 
278
 
279
  #### Fixed
280
- - Fixes to URL parsing to prevent cache pollution issues around URLs with double-slashes.
 
281
 
282
  --------
283
 
268
 
269
 
270
  == Changelog ==
271
+ ### 1.9.1-beta - 2022-12-09
 
 
 
 
272
  #### Added
273
+ - Added a dismissable option to install Jetpack Boost.
274
+ - Improved stability with the start of an end-to-end test suite.
275
+ - Tested with v6.1 of WordPress.
276
+
277
+ #### Changed
278
+ - Updated package dependencies.
279
 
280
  #### Fixed
281
+ - Compatibility: Avoid use of QUERY_STRING value, which is not available in all environments.
282
+ - Updated links to related plugins to remove click-tracking redirects.
283
 
284
  --------
285
 
vendor/autoload.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload.php @generated by Composer
4
+
5
+ if (PHP_VERSION_ID < 50600) {
6
+ if (!headers_sent()) {
7
+ header('HTTP/1.1 500 Internal Server Error');
8
+ }
9
+ $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
10
+ if (!ini_get('display_errors')) {
11
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
12
+ fwrite(STDERR, $err);
13
+ } elseif (!headers_sent()) {
14
+ echo $err;
15
+ }
16
+ }
17
+ trigger_error(
18
+ $err,
19
+ E_USER_ERROR
20
+ );
21
+ }
22
+
23
+ require_once __DIR__ . '/composer/autoload_real.php';
24
+
25
+ return ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_9_2_beta::getLoader();
vendor/automattic/jetpack-device-detection/CHANGELOG.md ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.4.22] - 2022-12-02
9
+ ### Changed
10
+ - Updated package dependencies. [#27688]
11
+
12
+ ## [1.4.21] - 2022-11-22
13
+ ### Added
14
+ - Add a guard in `functions.php` against being loaded twice from different copies of the package. [#27475]
15
+
16
+ ### Changed
17
+ - Updated package dependencies. [#27043]
18
+
19
+ ## [1.4.20] - 2022-11-07
20
+ ### Fixed
21
+ - Ensure that User_Agent is loaded in environments without autoload enabled. (e.g.: WordPress.com and Super Cache) [#27223]
22
+
23
+ ## [1.4.19] - 2022-10-25
24
+ ### Changed
25
+ - Update `wp_unslash` wrapper to possibly run on wpcom before WordPress is loaded. [#26971]
26
+
27
+ ## [1.4.18] - 2022-07-26
28
+ ### Changed
29
+ - Updated package dependencies. [#25158]
30
+
31
+ ## [1.4.17] - 2022-06-21
32
+ ### Changed
33
+ - Renaming master to trunk.
34
+
35
+ ## [1.4.16] - 2022-04-26
36
+ ### Changed
37
+ - Updated package dependencies.
38
+
39
+ ## [1.4.15] - 2022-04-19
40
+ ### Changed
41
+ - PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput`
42
+
43
+ ## [1.4.14] - 2022-03-29
44
+ ### Changed
45
+ - Microperformance: Use === null instead of is_null
46
+
47
+ ## [1.4.13] - 2022-02-09
48
+ ### Fixed
49
+ - Fixed some new PHPCS warnings.
50
+
51
+ ## [1.4.12] - 2022-01-25
52
+ ### Changed
53
+ - Updated package dependencies.
54
+
55
+ ## [1.4.11] - 2022-01-04
56
+ ### Changed
57
+ - Switch to pcov for code coverage.
58
+ - Updated package dependencies
59
+
60
+ ## [1.4.10] - 2021-12-14
61
+ ### Changed
62
+ - Updated package dependencies.
63
+
64
+ ## [1.4.9] - 2021-11-16
65
+ ### Fixed
66
+ - Verify $_SERVER['HTTP_USER_AGENT'] exists before use.
67
+
68
+ ## [1.4.8] - 2021-11-02
69
+ ### Changed
70
+ - Set `convertDeprecationsToExceptions` true in PHPUnit config.
71
+ - Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't.
72
+
73
+ ## [1.4.7] - 2021-10-19
74
+ ### Deprecated
75
+ - General: remove numerous long-deprecated functions.
76
+
77
+ ## [1.4.6] - 2021-10-13
78
+ ### Changed
79
+ - Updated package dependencies.
80
+
81
+ ## [1.4.5] - 2021-10-12
82
+ ### Changed
83
+ - Updated package dependencies
84
+
85
+ ## [1.4.4] - 2021-09-28
86
+ ### Changed
87
+ - Updated package dependencies.
88
+
89
+ ## [1.4.3] - 2021-08-31
90
+ ### Changed
91
+ - Run composer update on test-php command instead of phpunit.
92
+ - Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills).
93
+ - Updated versions in annotations.
94
+
95
+ ## [1.4.2] - 2021-05-25
96
+ ### Changed
97
+ - Updated package dependencies.
98
+
99
+ ## [1.4.1] - 2021-04-27
100
+ ### Changed
101
+ - Updated package dependencies.
102
+
103
+ ## [1.4.0] - 2021-03-30
104
+ ### Added
105
+ - Added Opera Desktop detection
106
+ - Composer alias for dev-master, to improve dependencies
107
+
108
+ ### Changed
109
+ - Update package dependencies.
110
+
111
+ ### Fixed
112
+ - Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in.
113
+
114
+ ## [1.3.2] - 2021-02-05
115
+
116
+ - CI: Make tests more generic
117
+
118
+ ## [1.3.1] - 2021-01-19
119
+
120
+ - Add mirror-repo information to all current composer packages
121
+ - Monorepo: Reorganize all projects
122
+
123
+ ## [1.3.0] - 2020-12-09
124
+
125
+ - Codesniffer: Update mediawiki/mediawiki-codesniffer dependency
126
+ - Pin dependencies
127
+ - Packages: Update for PHP 8 testing
128
+
129
+ ## [1.2.1] - 2020-11-10
130
+
131
+ - Improve PHP 8 compatibility
132
+ - Updated PHPCS: Packages and Debugger
133
+
134
+ ## [1.2.0] - 2020-10-19
135
+
136
+ - Replaced intval() with (int) as part of issue #17432.
137
+
138
+ ## [1.1.0] - 2020-08-13
139
+
140
+ - CI: Try collect js coverage
141
+
142
+ ## 1.0.0 - 2020-06-25
143
+
144
+ - Moving jetpack_is_mobile into a package
145
+
146
+ [1.4.22]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.21...v1.4.22
147
+ [1.4.21]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.20...v1.4.21
148
+ [1.4.20]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.19...v1.4.20
149
+ [1.4.19]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.18...v1.4.19
150
+ [1.4.18]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.17...v1.4.18
151
+ [1.4.17]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.16...v1.4.17
152
+ [1.4.16]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.15...v1.4.16
153
+ [1.4.15]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.14...v1.4.15
154
+ [1.4.14]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.13...v1.4.14
155
+ [1.4.13]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.12...v1.4.13
156
+ [1.4.12]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.11...v1.4.12
157
+ [1.4.11]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.10...v1.4.11
158
+ [1.4.10]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.9...v1.4.10
159
+ [1.4.9]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.8...v1.4.9
160
+ [1.4.8]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.7...v1.4.8
161
+ [1.4.7]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.6...v1.4.7
162
+ [1.4.6]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.5...v1.4.6
163
+ [1.4.5]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.4...v1.4.5
164
+ [1.4.4]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.3...v1.4.4
165
+ [1.4.3]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.2...v1.4.3
166
+ [1.4.2]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.1...v1.4.2
167
+ [1.4.1]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.0...v1.4.1
168
+ [1.4.0]: https://github.com/Automattic/jetpack-device-detection/compare/v1.3.2...v1.4.0
169
+ [1.3.2]: https://github.com/Automattic/jetpack-device-detection/compare/v1.3.1...v1.3.2
170
+ [1.3.1]: https://github.com/Automattic/jetpack-device-detection/compare/v1.3.0...v1.3.1
171
+ [1.3.0]: https://github.com/Automattic/jetpack-device-detection/compare/v1.2.1...v1.3.0
172
+ [1.2.1]: https://github.com/Automattic/jetpack-device-detection/compare/v1.2.0...v1.2.1
173
+ [1.2.0]: https://github.com/Automattic/jetpack-device-detection/compare/v1.1.0...v1.2.0
174
+ [1.1.0]: https://github.com/Automattic/jetpack-device-detection/compare/v1.0.0...v1.1.0
vendor/automattic/jetpack-device-detection/LICENSE.txt ADDED
@@ -0,0 +1,357 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ This program is free software; you can redistribute it and/or modify
2
+ it under the terms of the GNU General Public License as published by
3
+ the Free Software Foundation; either version 2 of the License, or
4
+ (at your option) any later version.
5
+
6
+ This program is distributed in the hope that it will be useful,
7
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
8
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
+ GNU General Public License for more details.
10
+
11
+ You should have received a copy of the GNU General Public License
12
+ along with this program; if not, write to the Free Software
13
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14
+
15
+
16
+ ===================================
17
+
18
+
19
+ GNU GENERAL PUBLIC LICENSE
20
+ Version 2, June 1991
21
+
22
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
23
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24
+ Everyone is permitted to copy and distribute verbatim copies
25
+ of this license document, but changing it is not allowed.
26
+
27
+ Preamble
28
+
29
+ The licenses for most software are designed to take away your
30
+ freedom to share and change it. By contrast, the GNU General Public
31
+ License is intended to guarantee your freedom to share and change free
32
+ software--to make sure the software is free for all its users. This
33
+ General Public License applies to most of the Free Software
34
+ Foundation's software and to any other program whose authors commit to
35
+ using it. (Some other Free Software Foundation software is covered by
36
+ the GNU Lesser General Public License instead.) You can apply it to
37
+ your programs, too.
38
+
39
+ When we speak of free software, we are referring to freedom, not
40
+ price. Our General Public Licenses are designed to make sure that you
41
+ have the freedom to distribute copies of free software (and charge for
42
+ this service if you wish), that you receive source code or can get it
43
+ if you want it, that you can change the software or use pieces of it
44
+ in new free programs; and that you know you can do these things.
45
+
46
+ To protect your rights, we need to make restrictions that forbid
47
+ anyone to deny you these rights or to ask you to surrender the rights.
48
+ These restrictions translate to certain responsibilities for you if you
49
+ distribute copies of the software, or if you modify it.
50
+
51
+ For example, if you distribute copies of such a program, whether
52
+ gratis or for a fee, you must give the recipients all the rights that
53
+ you have. You must make sure that they, too, receive or can get the
54
+ source code. And you must show them these terms so they know their
55
+ rights.
56
+
57
+ We protect your rights with two steps: (1) copyright the software, and
58
+ (2) offer you this license which gives you legal permission to copy,
59
+ distribute and/or modify the software.
60
+
61
+ Also, for each author's protection and ours, we want to make certain
62
+ that everyone understands that there is no warranty for this free
63
+ software. If the software is modified by someone else and passed on, we
64
+ want its recipients to know that what they have is not the original, so
65
+ that any problems introduced by others will not reflect on the original
66
+ authors' reputations.
67
+
68
+ Finally, any free program is threatened constantly by software
69
+ patents. We wish to avoid the danger that redistributors of a free
70
+ program will individually obtain patent licenses, in effect making the
71
+ program proprietary. To prevent this, we have made it clear that any
72
+ patent must be licensed for everyone's free use or not licensed at all.
73
+
74
+ The precise terms and conditions for copying, distribution and
75
+ modification follow.
76
+
77
+ GNU GENERAL PUBLIC LICENSE
78
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
79
+
80
+ 0. This License applies to any program or other work which contains
81
+ a notice placed by the copyright holder saying it may be distributed
82
+ under the terms of this General Public License. The "Program", below,
83
+ refers to any such program or work, and a "work based on the Program"
84
+ means either the Program or any derivative work under copyright law:
85
+ that is to say, a work containing the Program or a portion of it,
86
+ either verbatim or with modifications and/or translated into another
87
+ language. (Hereinafter, translation is included without limitation in
88
+ the term "modification".) Each licensee is addressed as "you".
89
+
90
+ Activities other than copying, distribution and modification are not
91
+ covered by this License; they are outside its scope. The act of
92
+ running the Program is not restricted, and the output from the Program
93
+ is covered only if its contents constitute a work based on the
94
+ Program (independent of having been made by running the Program).
95
+ Whether that is true depends on what the Program does.
96
+
97
+ 1. You may copy and distribute verbatim copies of the Program's
98
+ source code as you receive it, in any medium, provided that you
99
+ conspicuously and appropriately publish on each copy an appropriate
100
+ copyright notice and disclaimer of warranty; keep intact all the
101
+ notices that refer to this License and to the absence of any warranty;
102
+ and give any other recipients of the Program a copy of this License
103
+ along with the Program.
104
+
105
+ You may charge a fee for the physical act of transferring a copy, and
106
+ you may at your option offer warranty protection in exchange for a fee.
107
+
108
+ 2. You may modify your copy or copies of the Program or any portion
109
+ of it, thus forming a work based on the Program, and copy and
110
+ distribute such modifications or work under the terms of Section 1
111
+ above, provided that you also meet all of these conditions:
112
+
113
+ a) You must cause the modified files to carry prominent notices
114
+ stating that you changed the files and the date of any change.
115
+
116
+ b) You must cause any work that you distribute or publish, that in
117
+ whole or in part contains or is derived from the Program or any
118
+ part thereof, to be licensed as a whole at no charge to all third
119
+ parties under the terms of this License.
120
+
121
+ c) If the modified program normally reads commands interactively
122
+ when run, you must cause it, when started running for such
123
+ interactive use in the most ordinary way, to print or display an
124
+ announcement including an appropriate copyright notice and a
125
+ notice that there is no warranty (or else, saying that you provide
126
+ a warranty) and that users may redistribute the program under
127
+ these conditions, and telling the user how to view a copy of this
128
+ License. (Exception: if the Program itself is interactive but
129
+ does not normally print such an announcement, your work based on
130
+ the Program is not required to print an announcement.)
131
+
132
+ These requirements apply to the modified work as a whole. If
133
+ identifiable sections of that work are not derived from the Program,
134
+ and can be reasonably considered independent and separate works in
135
+ themselves, then this License, and its terms, do not apply to those
136
+ sections when you distribute them as separate works. But when you
137
+ distribute the same sections as part of a whole which is a work based
138
+ on the Program, the distribution of the whole must be on the terms of
139
+ this License, whose permissions for other licensees extend to the
140
+ entire whole, and thus to each and every part regardless of who wrote it.
141
+
142
+ Thus, it is not the intent of this section to claim rights or contest
143
+ your rights to work written entirely by you; rather, the intent is to
144
+ exercise the right to control the distribution of derivative or
145
+ collective works based on the Program.
146
+
147
+ In addition, mere aggregation of another work not based on the Program
148
+ with the Program (or with a work based on the Program) on a volume of
149
+ a storage or distribution medium does not bring the other work under
150
+ the scope of this License.
151
+
152
+ 3. You may copy and distribute the Program (or a work based on it,
153
+ under Section 2) in object code or executable form under the terms of
154
+ Sections 1 and 2 above provided that you also do one of the following:
155
+
156
+ a) Accompany it with the complete corresponding machine-readable
157
+ source code, which must be distributed under the terms of Sections
158
+ 1 and 2 above on a medium customarily used for software interchange; or,
159
+
160
+ b) Accompany it with a written offer, valid for at least three
161
+ years, to give any third party, for a charge no more than your
162
+ cost of physically performing source distribution, a complete
163
+ machine-readable copy of the corresponding source code, to be
164
+ distributed under the terms of Sections 1 and 2 above on a medium
165
+ customarily used for software interchange; or,
166
+
167
+ c) Accompany it with the information you received as to the offer
168
+ to distribute corresponding source code. (This alternative is
169
+ allowed only for noncommercial distribution and only if you
170
+ received the program in object code or executable form with such
171
+ an offer, in accord with Subsection b above.)
172
+
173
+ The source code for a work means the preferred form of the work for
174
+ making modifications to it. For an executable work, complete source
175
+ code means all the source code for all modules it contains, plus any
176
+ associated interface definition files, plus the scripts used to
177
+ control compilation and installation of the executable. However, as a
178
+ special exception, the source code distributed need not include
179
+ anything that is normally distributed (in either source or binary
180
+ form) with the major components (compiler, kernel, and so on) of the
181
+ operating system on which the executable runs, unless that component
182
+ itself accompanies the executable.
183
+
184
+ If distribution of executable or object code is made by offering
185
+ access to copy from a designated place, then offering equivalent
186
+ access to copy the source code from the same place counts as
187
+ distribution of the source code, even though third parties are not
188
+ compelled to copy the source along with the object code.
189
+
190
+ 4. You may not copy, modify, sublicense, or distribute the Program
191
+ except as expressly provided under this License. Any attempt
192
+ otherwise to copy, modify, sublicense or distribute the Program is
193
+ void, and will automatically terminate your rights under this License.
194
+ However, parties who have received copies, or rights, from you under
195
+ this License will not have their licenses terminated so long as such
196
+ parties remain in full compliance.
197
+
198
+ 5. You are not required to accept this License, since you have not
199
+ signed it. However, nothing else grants you permission to modify or
200
+ distribute the Program or its derivative works. These actions are
201
+ prohibited by law if you do not accept this License. Therefore, by
202
+ modifying or distributing the Program (or any work based on the
203
+ Program), you indicate your acceptance of this License to do so, and
204
+ all its terms and conditions for copying, distributing or modifying
205
+ the Program or works based on it.
206
+
207
+ 6. Each time you redistribute the Program (or any work based on the
208
+ Program), the recipient automatically receives a license from the
209
+ original licensor to copy, distribute or modify the Program subject to
210
+ these terms and conditions. You may not impose any further
211
+ restrictions on the recipients' exercise of the rights granted herein.
212
+ You are not responsible for enforcing compliance by third parties to
213
+ this License.
214
+
215
+ 7. If, as a consequence of a court judgment or allegation of patent
216
+ infringement or for any other reason (not limited to patent issues),
217
+ conditions are imposed on you (whether by court order, agreement or
218
+ otherwise) that contradict the conditions of this License, they do not
219
+ excuse you from the conditions of this License. If you cannot
220
+ distribute so as to satisfy simultaneously your obligations under this
221
+ License and any other pertinent obligations, then as a consequence you
222
+ may not distribute the Program at all. For example, if a patent
223
+ license would not permit royalty-free redistribution of the Program by
224
+ all those who receive copies directly or indirectly through you, then
225
+ the only way you could satisfy both it and this License would be to
226
+ refrain entirely from distribution of the Program.
227
+
228
+ If any portion of this section is held invalid or unenforceable under
229
+ any particular circumstance, the balance of the section is intended to
230
+ apply and the section as a whole is intended to apply in other
231
+ circumstances.
232
+
233
+ It is not the purpose of this section to induce you to infringe any
234
+ patents or other property right claims or to contest validity of any
235
+ such claims; this section has the sole purpose of protecting the
236
+ integrity of the free software distribution system, which is
237
+ implemented by public license practices. Many people have made
238
+ generous contributions to the wide range of software distributed
239
+ through that system in reliance on consistent application of that
240
+ system; it is up to the author/donor to decide if he or she is willing
241
+ to distribute software through any other system and a licensee cannot
242
+ impose that choice.
243
+
244
+ This section is intended to make thoroughly clear what is believed to
245
+ be a consequence of the rest of this License.
246
+
247
+ 8. If the distribution and/or use of the Program is restricted in
248
+ certain countries either by patents or by copyrighted interfaces, the
249
+ original copyright holder who places the Program under this License
250
+ may add an explicit geographical distribution limitation excluding
251
+ those countries, so that distribution is permitted only in or among
252
+ countries not thus excluded. In such case, this License incorporates
253
+ the limitation as if written in the body of this License.
254
+
255
+ 9. The Free Software Foundation may publish revised and/or new versions
256
+ of the General Public License from time to time. Such new versions will
257
+ be similar in spirit to the present version, but may differ in detail to
258
+ address new problems or concerns.
259
+
260
+ Each version is given a distinguishing version number. If the Program
261
+ specifies a version number of this License which applies to it and "any
262
+ later version", you have the option of following the terms and conditions
263
+ either of that version or of any later version published by the Free
264
+ Software Foundation. If the Program does not specify a version number of
265
+ this License, you may choose any version ever published by the Free Software
266
+ Foundation.
267
+
268
+ 10. If you wish to incorporate parts of the Program into other free
269
+ programs whose distribution conditions are different, write to the author
270
+ to ask for permission. For software which is copyrighted by the Free
271
+ Software Foundation, write to the Free Software Foundation; we sometimes
272
+ make exceptions for this. Our decision will be guided by the two goals
273
+ of preserving the free status of all derivatives of our free software and
274
+ of promoting the sharing and reuse of software generally.
275
+
276
+ NO WARRANTY
277
+
278
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
279
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
280
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
281
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
282
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
283
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
284
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
285
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
286
+ REPAIR OR CORRECTION.
287
+
288
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
289
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
290
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
291
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
292
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
293
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
294
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
295
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
296
+ POSSIBILITY OF SUCH DAMAGES.
297
+
298
+ END OF TERMS AND CONDITIONS
299
+
300
+ How to Apply These Terms to Your New Programs
301
+
302
+ If you develop a new program, and you want it to be of the greatest
303
+ possible use to the public, the best way to achieve this is to make it
304
+ free software which everyone can redistribute and change under these terms.
305
+
306
+ To do so, attach the following notices to the program. It is safest
307
+ to attach them to the start of each source file to most effectively
308
+ convey the exclusion of warranty; and each file should have at least
309
+ the "copyright" line and a pointer to where the full notice is found.
310
+
311
+ <one line to give the program's name and a brief idea of what it does.>
312
+ Copyright (C) <year> <name of author>
313
+
314
+ This program is free software; you can redistribute it and/or modify
315
+ it under the terms of the GNU General Public License as published by
316
+ the Free Software Foundation; either version 2 of the License, or
317
+ (at your option) any later version.
318
+
319
+ This program is distributed in the hope that it will be useful,
320
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
321
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
322
+ GNU General Public License for more details.
323
+
324
+ You should have received a copy of the GNU General Public License along
325
+ with this program; if not, write to the Free Software Foundation, Inc.,
326
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
327
+
328
+ Also add information on how to contact you by electronic and paper mail.
329
+
330
+ If the program is interactive, make it output a short notice like this
331
+ when it starts in an interactive mode:
332
+
333
+ Gnomovision version 69, Copyright (C) year name of author
334
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
335
+ This is free software, and you are welcome to redistribute it
336
+ under certain conditions; type `show c' for details.
337
+
338
+ The hypothetical commands `show w' and `show c' should show the appropriate
339
+ parts of the General Public License. Of course, the commands you use may
340
+ be called something other than `show w' and `show c'; they could even be
341
+ mouse-clicks or menu items--whatever suits your program.
342
+
343
+ You should also get your employer (if you work as a programmer) or your
344
+ school, if any, to sign a "copyright disclaimer" for the program, if
345
+ necessary. Here is a sample; alter the names:
346
+
347
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
348
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
349
+
350
+ <signature of Ty Coon>, 1 April 1989
351
+ Ty Coon, President of Vice
352
+
353
+ This General Public License does not permit incorporating your program into
354
+ proprietary programs. If your program is a subroutine library, you may
355
+ consider it more useful to permit linking proprietary applications with the
356
+ library. If this is what you want to do, use the GNU Lesser General
357
+ Public License instead of this License.
vendor/automattic/jetpack-device-detection/README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Jetpack Device Detection
2
+
3
+ A method to detect device types, originates from `jetpack_is_mobile`.
4
+
5
+
6
+
7
+ ### Usage
8
+
9
+ Retrieve device information.
10
+
11
+ ```php
12
+ use Automattic\Jetpack\Device_Detection;
13
+
14
+ $device_info = Device_Detection::get_info();
15
+
16
+ /**
17
+ * array(
18
+ * 'is_phone' => (bool) Whether the current device is a mobile phone.
19
+ * 'is_smartphone' => (bool) Whether the current device is a smartphone.
20
+ * 'is_tablet' => (bool) Whether the current device is a tablet device.
21
+ * 'is_handheld' => (bool) Whether the current device is a handheld device.
22
+ * 'is_desktop' => (bool) Whether the current device is a laptop / desktop device.
23
+ * 'platform' => (string) Detected platform.
24
+ * 'is_phone_matched_ua' => (string) Matched UA.
25
+ * );
26
+ */
27
+ ```
28
+
29
+ Detect any mobile phone.
30
+
31
+ ```php
32
+ use Automattic\Jetpack\Device_Detection;
33
+
34
+ $is_phone = Device_Detection::is_phone();
35
+ ```
36
+
37
+ Detect a smartphone.
38
+
39
+ ```php
40
+ use Automattic\Jetpack\Device_Detection;
41
+
42
+ $is_smartphone = Device_Detection::is_smartphone();
43
+ ```
44
+
45
+ Detect a dumbphone.
46
+
47
+ ```php
48
+ use Automattic\Jetpack\Device_Detection;
49
+
50
+ $is_dumbphone = Device_Detection::is_phone() && ! Device_Detection::is_smartphone();
51
+ ```
52
+
53
+ Detect a tablet.
54
+
55
+ ```php
56
+ use Automattic\Jetpack\Device_Detection;
57
+
58
+ $is_tablet = Device_Detection::is_tablet();
59
+ ```
60
+
61
+ Detect a desktop device.
62
+
63
+ ```php
64
+ use Automattic\Jetpack\Device_Detection;
65
+
66
+ $is_desktop = Device_Detection::is_desktop();
67
+ ```
68
+
69
+ Detect any handheld device.
70
+
71
+ ```php
72
+ use Automattic\Jetpack\Device_Detection;
73
+
74
+ $is_handheld = Device_Detection::is_handheld();
75
+ ```
vendor/automattic/jetpack-device-detection/SECURITY.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Security Policy
2
+
3
+ Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/).
4
+
5
+ ## Supported Versions
6
+
7
+ Generally, only the latest version of Jetpack has continued support. If a critical vulnerability is found in the current version of Jetpack, we may opt to backport any patches to previous versions.
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ [Jetpack](https://jetpack.com/) is an open-source plugin for WordPress. Our HackerOne program covers the plugin software, as well as a variety of related projects and infrastructure.
12
+
13
+ **For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.**
14
+
15
+ Our most critical targets are:
16
+
17
+ * Jetpack and the Jetpack composer packages (all within this repo)
18
+ * Jetpack.com -- the primary marketing site.
19
+ * cloud.jetpack.com -- a management site.
20
+ * wordpress.com -- the shared management site for both Jetpack and WordPress.com sites.
21
+
22
+ For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic).
23
+
24
+ _Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._
25
+
26
+ ## Guidelines
27
+
28
+ We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines:
29
+
30
+ * Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines).
31
+ * Pen-testing Production:
32
+ * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above).
33
+ * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC.
34
+ * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels.
35
+ * To be eligible for a bounty, all of these guidelines must be followed.
36
+ * Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability.
37
+
38
+ We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties.
vendor/automattic/jetpack-device-detection/composer.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "automattic/jetpack-device-detection",
3
+ "description": "A way to detect device types based on User-Agent header.",
4
+ "type": "jetpack-library",
5
+ "license": "GPL-2.0-or-later",
6
+ "require": {},
7
+ "require-dev": {
8
+ "yoast/phpunit-polyfills": "1.0.4",
9
+ "automattic/jetpack-changelogger": "^3.2.2"
10
+ },
11
+ "autoload": {
12
+ "classmap": [
13
+ "src/"
14
+ ]
15
+ },
16
+ "scripts": {
17
+ "phpunit": [
18
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
19
+ ],
20
+ "test-coverage": [
21
+ "php -dpcov.directory=. ./vendor/bin/phpunit --coverage-clover \"$COVERAGE_DIR/clover.xml\""
22
+ ],
23
+ "test-php": [
24
+ "@composer phpunit"
25
+ ]
26
+ },
27
+ "minimum-stability": "dev",
28
+ "prefer-stable": true,
29
+ "extra": {
30
+ "autotagger": true,
31
+ "mirror-repo": "Automattic/jetpack-device-detection",
32
+ "changelogger": {
33
+ "link-template": "https://github.com/Automattic/jetpack-device-detection/compare/v${old}...v${new}"
34
+ },
35
+ "branch-alias": {
36
+ "dev-trunk": "1.4.x-dev"
37
+ }
38
+ }
39
+ }
vendor/automattic/jetpack-device-detection/src/functions.php CHANGED
@@ -7,25 +7,30 @@
7
 
8
  namespace Automattic\Jetpack\Device_Detection;
9
 
10
- /**
11
- * A wrapper for WordPress's `wp_unslash()`.
12
- *
13
- * Even though PHP itself dropped the option to add slashes to superglobals a decade ago,
14
- * WordPress still does it through some misguided extreme backwards compatibility. 🙄
15
- *
16
- * If WordPress's function exists, assume it needs to be called.
17
- * Else if on WordPress.com, do a simplified version because we're running really early.
18
- * Else, assume it's not needed.
19
- *
20
- * @param string $value String of data to unslash.
21
- * @return string Possibly unslashed $value.
22
- */
23
- function wp_unslash( $value ) {
24
- if ( function_exists( '\\wp_unslash' ) ) {
25
- return \wp_unslash( $value );
26
- } elseif ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
27
- return stripslashes( $value );
28
- } else {
29
- return $value;
 
 
 
 
 
30
  }
31
  }
7
 
8
  namespace Automattic\Jetpack\Device_Detection;
9
 
10
+ // Check if the function is already defined, in case someone bypassed the autoloader or something
11
+ // to get the two classes from different copies of the package.
12
+ if ( ! function_exists( __NAMESPACE__ . '\\wp_unslash' ) ) {
13
+
14
+ /**
15
+ * A wrapper for WordPress's `wp_unslash()`.
16
+ *
17
+ * Even though PHP itself dropped the option to add slashes to superglobals a decade ago,
18
+ * WordPress still does it through some misguided extreme backwards compatibility. 🙄
19
+ *
20
+ * If WordPress's function exists, assume it needs to be called.
21
+ * Else if on WordPress.com, do a simplified version because we're running really early.
22
+ * Else, assume it's not needed.
23
+ *
24
+ * @param string $value String of data to unslash.
25
+ * @return string Possibly unslashed $value.
26
+ */
27
+ function wp_unslash( $value ) {
28
+ if ( function_exists( '\\wp_unslash' ) ) {
29
+ return \wp_unslash( $value );
30
+ } elseif ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
31
+ return stripslashes( $value );
32
+ } else {
33
+ return $value;
34
+ }
35
  }
36
  }
vendor/composer/ClassLoader.php ADDED
@@ -0,0 +1,572 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer\Autoload;
14
+
15
+ /**
16
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
+ *
18
+ * $loader = new \Composer\Autoload\ClassLoader();
19
+ *
20
+ * // register classes with namespaces
21
+ * $loader->add('Symfony\Component', __DIR__.'/component');
22
+ * $loader->add('Symfony', __DIR__.'/framework');
23
+ *
24
+ * // activate the autoloader
25
+ * $loader->register();
26
+ *
27
+ * // to enable searching the include path (eg. for PEAR packages)
28
+ * $loader->setUseIncludePath(true);
29
+ *
30
+ * In this example, if you try to use a class in the Symfony\Component
31
+ * namespace or one of its children (Symfony\Component\Console for instance),
32
+ * the autoloader will first look for the class under the component/
33
+ * directory, and it will then fallback to the framework/ directory if not
34
+ * found before giving up.
35
+ *
36
+ * This class is loosely based on the Symfony UniversalClassLoader.
37
+ *
38
+ * @author Fabien Potencier <fabien@symfony.com>
39
+ * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see https://www.php-fig.org/psr/psr-0/
41
+ * @see https://www.php-fig.org/psr/psr-4/
42
+ */
43
+ class ClassLoader
44
+ {
45
+ /** @var ?string */
46
+ private $vendorDir;
47
+
48
+ // PSR-4
49
+ /**
50
+ * @var array[]
51
+ * @psalm-var array<string, array<string, int>>
52
+ */
53
+ private $prefixLengthsPsr4 = array();
54
+ /**
55
+ * @var array[]
56
+ * @psalm-var array<string, array<int, string>>
57
+ */
58
+ private $prefixDirsPsr4 = array();
59
+ /**
60
+ * @var array[]
61
+ * @psalm-var array<string, string>
62
+ */
63
+ private $fallbackDirsPsr4 = array();
64
+
65
+ // PSR-0
66
+ /**
67
+ * @var array[]
68
+ * @psalm-var array<string, array<string, string[]>>
69
+ */
70
+ private $prefixesPsr0 = array();
71
+ /**
72
+ * @var array[]
73
+ * @psalm-var array<string, string>
74
+ */
75
+ private $fallbackDirsPsr0 = array();
76
+
77
+ /** @var bool */
78
+ private $useIncludePath = false;
79
+
80
+ /**
81
+ * @var string[]
82
+ * @psalm-var array<string, string>
83
+ */
84
+ private $classMap = array();
85
+
86
+ /** @var bool */
87
+ private $classMapAuthoritative = false;
88
+
89
+ /**
90
+ * @var bool[]
91
+ * @psalm-var array<string, bool>
92
+ */
93
+ private $missingClasses = array();
94
+
95
+ /** @var ?string */
96
+ private $apcuPrefix;
97
+
98
+ /**
99
+ * @var self[]
100
+ */
101
+ private static $registeredLoaders = array();
102
+
103
+ /**
104
+ * @param ?string $vendorDir
105
+ */
106
+ public function __construct($vendorDir = null)
107
+ {
108
+ $this->vendorDir = $vendorDir;
109
+ }
110
+
111
+ /**
112
+ * @return string[]
113
+ */
114
+ public function getPrefixes()
115
+ {
116
+ if (!empty($this->prefixesPsr0)) {
117
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
118
+ }
119
+
120
+ return array();
121
+ }
122
+
123
+ /**
124
+ * @return array[]
125
+ * @psalm-return array<string, array<int, string>>
126
+ */
127
+ public function getPrefixesPsr4()
128
+ {
129
+ return $this->prefixDirsPsr4;
130
+ }
131
+
132
+ /**
133
+ * @return array[]
134
+ * @psalm-return array<string, string>
135
+ */
136
+ public function getFallbackDirs()
137
+ {
138
+ return $this->fallbackDirsPsr0;
139
+ }
140
+
141
+ /**
142
+ * @return array[]
143
+ * @psalm-return array<string, string>
144
+ */
145
+ public function getFallbackDirsPsr4()
146
+ {
147
+ return $this->fallbackDirsPsr4;
148
+ }
149
+
150
+ /**
151
+ * @return string[] Array of classname => path
152
+ * @psalm-return array<string, string>
153
+ */
154
+ public function getClassMap()
155
+ {
156
+ return $this->classMap;
157
+ }
158
+
159
+ /**
160
+ * @param string[] $classMap Class to filename map
161
+ * @psalm-param array<string, string> $classMap
162
+ *
163
+ * @return void
164
+ */
165
+ public function addClassMap(array $classMap)
166
+ {
167
+ if ($this->classMap) {
168
+ $this->classMap = array_merge($this->classMap, $classMap);
169
+ } else {
170
+ $this->classMap = $classMap;
171
+ }
172
+ }
173
+
174
+ /**
175
+ * Registers a set of PSR-0 directories for a given prefix, either
176
+ * appending or prepending to the ones previously set for this prefix.
177
+ *
178
+ * @param string $prefix The prefix
179
+ * @param string[]|string $paths The PSR-0 root directories
180
+ * @param bool $prepend Whether to prepend the directories
181
+ *
182
+ * @return void
183
+ */
184
+ public function add($prefix, $paths, $prepend = false)
185
+ {
186
+ if (!$prefix) {
187
+ if ($prepend) {
188
+ $this->fallbackDirsPsr0 = array_merge(
189
+ (array) $paths,
190
+ $this->fallbackDirsPsr0
191
+ );
192
+ } else {
193
+ $this->fallbackDirsPsr0 = array_merge(
194
+ $this->fallbackDirsPsr0,
195
+ (array) $paths
196
+ );
197
+ }
198
+
199
+ return;
200
+ }
201
+
202
+ $first = $prefix[0];
203
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
204
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
205
+
206
+ return;
207
+ }
208
+ if ($prepend) {
209
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
210
+ (array) $paths,
211
+ $this->prefixesPsr0[$first][$prefix]
212
+ );
213
+ } else {
214
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
215
+ $this->prefixesPsr0[$first][$prefix],
216
+ (array) $paths
217
+ );
218
+ }
219
+ }
220
+
221
+ /**
222
+ * Registers a set of PSR-4 directories for a given namespace, either
223
+ * appending or prepending to the ones previously set for this namespace.
224
+ *
225
+ * @param string $prefix The prefix/namespace, with trailing '\\'
226
+ * @param string[]|string $paths The PSR-4 base directories
227
+ * @param bool $prepend Whether to prepend the directories
228
+ *
229
+ * @throws \InvalidArgumentException
230
+ *
231
+ * @return void
232
+ */
233
+ public function addPsr4($prefix, $paths, $prepend = false)
234
+ {
235
+ if (!$prefix) {
236
+ // Register directories for the root namespace.
237
+ if ($prepend) {
238
+ $this->fallbackDirsPsr4 = array_merge(
239
+ (array) $paths,
240
+ $this->fallbackDirsPsr4
241
+ );
242
+ } else {
243
+ $this->fallbackDirsPsr4 = array_merge(
244
+ $this->fallbackDirsPsr4,
245
+ (array) $paths
246
+ );
247
+ }
248
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
249
+ // Register directories for a new namespace.
250
+ $length = strlen($prefix);
251
+ if ('\\' !== $prefix[$length - 1]) {
252
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
253
+ }
254
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
255
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
256
+ } elseif ($prepend) {
257
+ // Prepend directories for an already registered namespace.
258
+ $this->prefixDirsPsr4[$prefix] = array_merge(
259
+ (array) $paths,
260
+ $this->prefixDirsPsr4[$prefix]
261
+ );
262
+ } else {
263
+ // Append directories for an already registered namespace.
264
+ $this->prefixDirsPsr4[$prefix] = array_merge(
265
+ $this->prefixDirsPsr4[$prefix],
266
+ (array) $paths
267
+ );
268
+ }
269
+ }
270
+
271
+ /**
272
+ * Registers a set of PSR-0 directories for a given prefix,
273
+ * replacing any others previously set for this prefix.
274
+ *
275
+ * @param string $prefix The prefix
276
+ * @param string[]|string $paths The PSR-0 base directories
277
+ *
278
+ * @return void
279
+ */
280
+ public function set($prefix, $paths)
281
+ {
282
+ if (!$prefix) {
283
+ $this->fallbackDirsPsr0 = (array) $paths;
284
+ } else {
285
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
286
+ }
287
+ }
288
+
289
+ /**
290
+ * Registers a set of PSR-4 directories for a given namespace,
291
+ * replacing any others previously set for this namespace.
292
+ *
293
+ * @param string $prefix The prefix/namespace, with trailing '\\'
294
+ * @param string[]|string $paths The PSR-4 base directories
295
+ *
296
+ * @throws \InvalidArgumentException
297
+ *
298
+ * @return void
299
+ */
300
+ public function setPsr4($prefix, $paths)
301
+ {
302
+ if (!$prefix) {
303
+ $this->fallbackDirsPsr4 = (array) $paths;
304
+ } else {
305
+ $length = strlen($prefix);
306
+ if ('\\' !== $prefix[$length - 1]) {
307
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
308
+ }
309
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
310
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
311
+ }
312
+ }
313
+
314
+ /**
315
+ * Turns on searching the include path for class files.
316
+ *
317
+ * @param bool $useIncludePath
318
+ *
319
+ * @return void
320
+ */
321
+ public function setUseIncludePath($useIncludePath)
322
+ {
323
+ $this->useIncludePath = $useIncludePath;
324
+ }
325
+
326
+ /**
327
+ * Can be used to check if the autoloader uses the include path to check
328
+ * for classes.
329
+ *
330
+ * @return bool
331
+ */
332
+ public function getUseIncludePath()
333
+ {
334
+ return $this->useIncludePath;
335
+ }
336
+
337
+ /**
338
+ * Turns off searching the prefix and fallback directories for classes
339
+ * that have not been registered with the class map.
340
+ *
341
+ * @param bool $classMapAuthoritative
342
+ *
343
+ * @return void
344
+ */
345
+ public function setClassMapAuthoritative($classMapAuthoritative)
346
+ {
347
+ $this->classMapAuthoritative = $classMapAuthoritative;
348
+ }
349
+
350
+ /**
351
+ * Should class lookup fail if not found in the current class map?
352
+ *
353
+ * @return bool
354
+ */
355
+ public function isClassMapAuthoritative()
356
+ {
357
+ return $this->classMapAuthoritative;
358
+ }
359
+
360
+ /**
361
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
362
+ *
363
+ * @param string|null $apcuPrefix
364
+ *
365
+ * @return void
366
+ */
367
+ public function setApcuPrefix($apcuPrefix)
368
+ {
369
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
370
+ }
371
+
372
+ /**
373
+ * The APCu prefix in use, or null if APCu caching is not enabled.
374
+ *
375
+ * @return string|null
376
+ */
377
+ public function getApcuPrefix()
378
+ {
379
+ return $this->apcuPrefix;
380
+ }
381
+
382
+ /**
383
+ * Registers this instance as an autoloader.
384
+ *
385
+ * @param bool $prepend Whether to prepend the autoloader or not
386
+ *
387
+ * @return void
388
+ */
389
+ public function register($prepend = false)
390
+ {
391
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
392
+
393
+ if (null === $this->vendorDir) {
394
+ return;
395
+ }
396
+
397
+ if ($prepend) {
398
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
399
+ } else {
400
+ unset(self::$registeredLoaders[$this->vendorDir]);
401
+ self::$registeredLoaders[$this->vendorDir] = $this;
402
+ }
403
+ }
404
+
405
+ /**
406
+ * Unregisters this instance as an autoloader.
407
+ *
408
+ * @return void
409
+ */
410
+ public function unregister()
411
+ {
412
+ spl_autoload_unregister(array($this, 'loadClass'));
413
+
414
+ if (null !== $this->vendorDir) {
415
+ unset(self::$registeredLoaders[$this->vendorDir]);
416
+ }
417
+ }
418
+
419
+ /**
420
+ * Loads the given class or interface.
421
+ *
422
+ * @param string $class The name of the class
423
+ * @return true|null True if loaded, null otherwise
424
+ */
425
+ public function loadClass($class)
426
+ {
427
+ if ($file = $this->findFile($class)) {
428
+ includeFile($file);
429
+
430
+ return true;
431
+ }
432
+
433
+ return null;
434
+ }
435
+
436
+ /**
437
+ * Finds the path to the file where the class is defined.
438
+ *
439
+ * @param string $class The name of the class
440
+ *
441
+ * @return string|false The path if found, false otherwise
442
+ */
443
+ public function findFile($class)
444
+ {
445
+ // class map lookup
446
+ if (isset($this->classMap[$class])) {
447
+ return $this->classMap[$class];
448
+ }
449
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
450
+ return false;
451
+ }
452
+ if (null !== $this->apcuPrefix) {
453
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
454
+ if ($hit) {
455
+ return $file;
456
+ }
457
+ }
458
+
459
+ $file = $this->findFileWithExtension($class, '.php');
460
+
461
+ // Search for Hack files if we are running on HHVM
462
+ if (false === $file && defined('HHVM_VERSION')) {
463
+ $file = $this->findFileWithExtension($class, '.hh');
464
+ }
465
+
466
+ if (null !== $this->apcuPrefix) {
467
+ apcu_add($this->apcuPrefix.$class, $file);
468
+ }
469
+
470
+ if (false === $file) {
471
+ // Remember that this class does not exist.
472
+ $this->missingClasses[$class] = true;
473
+ }
474
+
475
+ return $file;
476
+ }
477
+
478
+ /**
479
+ * Returns the currently registered loaders indexed by their corresponding vendor directories.
480
+ *
481
+ * @return self[]
482
+ */
483
+ public static function getRegisteredLoaders()
484
+ {
485
+ return self::$registeredLoaders;
486
+ }
487
+
488
+ /**
489
+ * @param string $class
490
+ * @param string $ext
491
+ * @return string|false
492
+ */
493
+ private function findFileWithExtension($class, $ext)
494
+ {
495
+ // PSR-4 lookup
496
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
497
+
498
+ $first = $class[0];
499
+ if (isset($this->prefixLengthsPsr4[$first])) {
500
+ $subPath = $class;
501
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
502
+ $subPath = substr($subPath, 0, $lastPos);
503
+ $search = $subPath . '\\';
504
+ if (isset($this->prefixDirsPsr4[$search])) {
505
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
506
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
507
+ if (file_exists($file = $dir . $pathEnd)) {
508
+ return $file;
509
+ }
510
+ }
511
+ }
512
+ }
513
+ }
514
+
515
+ // PSR-4 fallback dirs
516
+ foreach ($this->fallbackDirsPsr4 as $dir) {
517
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
518
+ return $file;
519
+ }
520
+ }
521
+
522
+ // PSR-0 lookup
523
+ if (false !== $pos = strrpos($class, '\\')) {
524
+ // namespaced class name
525
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
526
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
527
+ } else {
528
+ // PEAR-like class name
529
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
530
+ }
531
+
532
+ if (isset($this->prefixesPsr0[$first])) {
533
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
534
+ if (0 === strpos($class, $prefix)) {
535
+ foreach ($dirs as $dir) {
536
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
537
+ return $file;
538
+ }
539
+ }
540
+ }
541
+ }
542
+ }
543
+
544
+ // PSR-0 fallback dirs
545
+ foreach ($this->fallbackDirsPsr0 as $dir) {
546
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
547
+ return $file;
548
+ }
549
+ }
550
+
551
+ // PSR-0 include paths.
552
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
553
+ return $file;
554
+ }
555
+
556
+ return false;
557
+ }
558
+ }
559
+
560
+ /**
561
+ * Scope isolated include.
562
+ *
563
+ * Prevents access to $this/self from included files.
564
+ *
565
+ * @param string $file
566
+ * @return void
567
+ * @private
568
+ */
569
+ function includeFile($file)
570
+ {
571
+ include $file;
572
+ }
vendor/composer/InstalledVersions.php ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer;
14
+
15
+ use Composer\Autoload\ClassLoader;
16
+ use Composer\Semver\VersionParser;
17
+
18
+ /**
19
+ * This class is copied in every Composer installed project and available to all
20
+ *
21
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
+ *
23
+ * To require its presence, you can require `composer-runtime-api ^2.0`
24
+ *
25
+ * @final
26
+ */
27
+ class InstalledVersions
28
+ {
29
+ /**
30
+ * @var mixed[]|null
31
+ * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
32
+ */
33
+ private static $installed;
34
+
35
+ /**
36
+ * @var bool|null
37
+ */
38
+ private static $canGetVendors;
39
+
40
+ /**
41
+ * @var array[]
42
+ * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
43
+ */
44
+ private static $installedByVendor = array();
45
+
46
+ /**
47
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
48
+ *
49
+ * @return string[]
50
+ * @psalm-return list<string>
51
+ */
52
+ public static function getInstalledPackages()
53
+ {
54
+ $packages = array();
55
+ foreach (self::getInstalled() as $installed) {
56
+ $packages[] = array_keys($installed['versions']);
57
+ }
58
+
59
+ if (1 === \count($packages)) {
60
+ return $packages[0];
61
+ }
62
+
63
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
64
+ }
65
+
66
+ /**
67
+ * Returns a list of all package names with a specific type e.g. 'library'
68
+ *
69
+ * @param string $type
70
+ * @return string[]
71
+ * @psalm-return list<string>
72
+ */
73
+ public static function getInstalledPackagesByType($type)
74
+ {
75
+ $packagesByType = array();
76
+
77
+ foreach (self::getInstalled() as $installed) {
78
+ foreach ($installed['versions'] as $name => $package) {
79
+ if (isset($package['type']) && $package['type'] === $type) {
80
+ $packagesByType[] = $name;
81
+ }
82
+ }
83
+ }
84
+
85
+ return $packagesByType;
86
+ }
87
+
88
+ /**
89
+ * Checks whether the given package is installed
90
+ *
91
+ * This also returns true if the package name is provided or replaced by another package
92
+ *
93
+ * @param string $packageName
94
+ * @param bool $includeDevRequirements
95
+ * @return bool
96
+ */
97
+ public static function isInstalled($packageName, $includeDevRequirements = true)
98
+ {
99
+ foreach (self::getInstalled() as $installed) {
100
+ if (isset($installed['versions'][$packageName])) {
101
+ return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
102
+ }
103
+ }
104
+
105
+ return false;
106
+ }
107
+
108
+ /**
109
+ * Checks whether the given package satisfies a version constraint
110
+ *
111
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
112
+ *
113
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
114
+ *
115
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
116
+ * @param string $packageName
117
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
118
+ * @return bool
119
+ */
120
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
121
+ {
122
+ $constraint = $parser->parseConstraints($constraint);
123
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
124
+
125
+ return $provided->matches($constraint);
126
+ }
127
+
128
+ /**
129
+ * Returns a version constraint representing all the range(s) which are installed for a given package
130
+ *
131
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
132
+ * whether a given version of a package is installed, and not just whether it exists
133
+ *
134
+ * @param string $packageName
135
+ * @return string Version constraint usable with composer/semver
136
+ */
137
+ public static function getVersionRanges($packageName)
138
+ {
139
+ foreach (self::getInstalled() as $installed) {
140
+ if (!isset($installed['versions'][$packageName])) {
141
+ continue;
142
+ }
143
+
144
+ $ranges = array();
145
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
146
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
147
+ }
148
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
149
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
150
+ }
151
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
152
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
153
+ }
154
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
155
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
156
+ }
157
+
158
+ return implode(' || ', $ranges);
159
+ }
160
+
161
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
162
+ }
163
+
164
+ /**
165
+ * @param string $packageName
166
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
167
+ */
168
+ public static function getVersion($packageName)
169
+ {
170
+ foreach (self::getInstalled() as $installed) {
171
+ if (!isset($installed['versions'][$packageName])) {
172
+ continue;
173
+ }
174
+
175
+ if (!isset($installed['versions'][$packageName]['version'])) {
176
+ return null;
177
+ }
178
+
179
+ return $installed['versions'][$packageName]['version'];
180
+ }
181
+
182
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
183
+ }
184
+
185
+ /**
186
+ * @param string $packageName
187
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
188
+ */
189
+ public static function getPrettyVersion($packageName)
190
+ {
191
+ foreach (self::getInstalled() as $installed) {
192
+ if (!isset($installed['versions'][$packageName])) {
193
+ continue;
194
+ }
195
+
196
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
197
+ return null;
198
+ }
199
+
200
+ return $installed['versions'][$packageName]['pretty_version'];
201
+ }
202
+
203
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
204
+ }
205
+
206
+ /**
207
+ * @param string $packageName
208
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
209
+ */
210
+ public static function getReference($packageName)
211
+ {
212
+ foreach (self::getInstalled() as $installed) {
213
+ if (!isset($installed['versions'][$packageName])) {
214
+ continue;
215
+ }
216
+
217
+ if (!isset($installed['versions'][$packageName]['reference'])) {
218
+ return null;
219
+ }
220
+
221
+ return $installed['versions'][$packageName]['reference'];
222
+ }
223
+
224
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
225
+ }
226
+
227
+ /**
228
+ * @param string $packageName
229
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
230
+ */
231
+ public static function getInstallPath($packageName)
232
+ {
233
+ foreach (self::getInstalled() as $installed) {
234
+ if (!isset($installed['versions'][$packageName])) {
235
+ continue;
236
+ }
237
+
238
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
239
+ }
240
+
241
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
242
+ }
243
+
244
+ /**
245
+ * @return array
246
+ * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
247
+ */
248
+ public static function getRootPackage()
249
+ {
250
+ $installed = self::getInstalled();
251
+
252
+ return $installed[0]['root'];
253
+ }
254
+
255
+ /**
256
+ * Returns the raw installed.php data for custom implementations
257
+ *
258
+ * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
259
+ * @return array[]
260
+ * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
261
+ */
262
+ public static function getRawData()
263
+ {
264
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
265
+
266
+ if (null === self::$installed) {
267
+ // only require the installed.php file if this file is loaded from its dumped location,
268
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
269
+ if (substr(__DIR__, -8, 1) !== 'C') {
270
+ self::$installed = include __DIR__ . '/installed.php';
271
+ } else {
272
+ self::$installed = array();
273
+ }
274
+ }
275
+
276
+ return self::$installed;
277
+ }
278
+
279
+ /**
280
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
281
+ *
282
+ * @return array[]
283
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
284
+ */
285
+ public static function getAllRawData()
286
+ {
287
+ return self::getInstalled();
288
+ }
289
+
290
+ /**
291
+ * Lets you reload the static array from another file
292
+ *
293
+ * This is only useful for complex integrations in which a project needs to use
294
+ * this class but then also needs to execute another project's autoloader in process,
295
+ * and wants to ensure both projects have access to their version of installed.php.
296
+ *
297
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
298
+ * the data it needs from this class, then call reload() with
299
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
300
+ * the project in which it runs can then also use this class safely, without
301
+ * interference between PHPUnit's dependencies and the project's dependencies.
302
+ *
303
+ * @param array[] $data A vendor/composer/installed.php data set
304
+ * @return void
305
+ *
306
+ * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
307
+ */
308
+ public static function reload($data)
309
+ {
310
+ self::$installed = $data;
311
+ self::$installedByVendor = array();
312
+ }
313
+
314
+ /**
315
+ * @return array[]
316
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
317
+ */
318
+ private static function getInstalled()
319
+ {
320
+ if (null === self::$canGetVendors) {
321
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
322
+ }
323
+
324
+ $installed = array();
325
+
326
+ if (self::$canGetVendors) {
327
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
328
+ if (isset(self::$installedByVendor[$vendorDir])) {
329
+ $installed[] = self::$installedByVendor[$vendorDir];
330
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
331
+ $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
332
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
333
+ self::$installed = $installed[count($installed) - 1];
334
+ }
335
+ }
336
+ }
337
+ }
338
+
339
+ if (null === self::$installed) {
340
+ // only require the installed.php file if this file is loaded from its dumped location,
341
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
342
+ if (substr(__DIR__, -8, 1) !== 'C') {
343
+ self::$installed = require __DIR__ . '/installed.php';
344
+ } else {
345
+ self::$installed = array();
346
+ }
347
+ }
348
+ $installed[] = self::$installed;
349
+
350
+ return $installed;
351
+ }
352
+ }
vendor/composer/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Copyright (c) Nils Adermann, Jordi Boggiano
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished
9
+ to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
21
+
vendor/composer/autoload_classmap.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_classmap.php @generated by Composer
4
+
5
+ $vendorDir = dirname(__DIR__);
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'Automattic\\Jetpack\\Device_Detection' => $vendorDir . '/automattic/jetpack-device-detection/src/class-device-detection.php',
10
+ 'Automattic\\Jetpack\\Device_Detection\\User_Agent_Info' => $vendorDir . '/automattic/jetpack-device-detection/src/class-user-agent-info.php',
11
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
12
+ );
vendor/composer/autoload_namespaces.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_namespaces.php @generated by Composer
4
+
5
+ $vendorDir = dirname(__DIR__);
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ );
vendor/composer/autoload_psr4.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_psr4.php @generated by Composer
4
+
5
+ $vendorDir = dirname(__DIR__);
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ );
vendor/composer/autoload_real.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_real.php @generated by Composer
4
+
5
+ class ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_9_2_beta
6
+ {
7
+ private static $loader;
8
+
9
+ public static function loadClassLoader($class)
10
+ {
11
+ if ('Composer\Autoload\ClassLoader' === $class) {
12
+ require __DIR__ . '/ClassLoader.php';
13
+ }
14
+ }
15
+
16
+ /**
17
+ * @return \Composer\Autoload\ClassLoader
18
+ */
19
+ public static function getLoader()
20
+ {
21
+ if (null !== self::$loader) {
22
+ return self::$loader;
23
+ }
24
+
25
+ spl_autoload_register(array('ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_9_2_beta', 'loadClassLoader'), true, true);
26
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_9_2_beta', 'loadClassLoader'));
28
+
29
+ require __DIR__ . '/autoload_static.php';
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_9_2_beta::getInitializer($loader));
31
+
32
+ $loader->setClassMapAuthoritative(true);
33
+ $loader->register(true);
34
+
35
+ return $loader;
36
+ }
37
+ }
vendor/composer/autoload_static.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_static.php @generated by Composer
4
+
5
+ namespace Composer\Autoload;
6
+
7
+ class ComposerStaticInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_9_2_beta
8
+ {
9
+ public static $classMap = array (
10
+ 'Automattic\\Jetpack\\Device_Detection' => __DIR__ . '/..' . '/automattic/jetpack-device-detection/src/class-device-detection.php',
11
+ 'Automattic\\Jetpack\\Device_Detection\\User_Agent_Info' => __DIR__ . '/..' . '/automattic/jetpack-device-detection/src/class-user-agent-info.php',
12
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
13
+ );
14
+
15
+ public static function getInitializer(ClassLoader $loader)
16
+ {
17
+ return \Closure::bind(function () use ($loader) {
18
+ $loader->classMap = ComposerStaticInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_9_2_beta::$classMap;
19
+
20
+ }, null, ClassLoader::class);
21
+ }
22
+ }
vendor/composer/installed.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "packages": [
3
+ {
4
+ "name": "automattic/jetpack-device-detection",
5
+ "version": "v1.4.22",
6
+ "version_normalized": "1.4.22.0",
7
+ "source": {
8
+ "type": "git",
9
+ "url": "https://github.com/Automattic/jetpack-device-detection.git",
10
+ "reference": "2da848bca9a3622885c05509f0a1dab8264067b2"
11
+ },
12
+ "dist": {
13
+ "type": "zip",
14
+ "url": "https://api.github.com/repos/Automattic/jetpack-device-detection/zipball/2da848bca9a3622885c05509f0a1dab8264067b2",
15
+ "reference": "2da848bca9a3622885c05509f0a1dab8264067b2",
16
+ "shasum": ""
17
+ },
18
+ "require-dev": {
19
+ "automattic/jetpack-changelogger": "^3.2.2",
20
+ "yoast/phpunit-polyfills": "1.0.4"
21
+ },
22
+ "time": "2022-12-02T19:01:40+00:00",
23
+ "type": "jetpack-library",
24
+ "extra": {
25
+ "autotagger": true,
26
+ "mirror-repo": "Automattic/jetpack-device-detection",
27
+ "changelogger": {
28
+ "link-template": "https://github.com/Automattic/jetpack-device-detection/compare/v${old}...v${new}"
29
+ },
30
+ "branch-alias": {
31
+ "dev-trunk": "1.4.x-dev"
32
+ }
33
+ },
34
+ "installation-source": "dist",
35
+ "autoload": {
36
+ "classmap": [
37
+ "src/"
38
+ ]
39
+ },
40
+ "notification-url": "https://packagist.org/downloads/",
41
+ "license": [
42
+ "GPL-2.0-or-later"
43
+ ],
44
+ "description": "A way to detect device types based on User-Agent header.",
45
+ "support": {
46
+ "source": "https://github.com/Automattic/jetpack-device-detection/tree/v1.4.22"
47
+ },
48
+ "install-path": "../automattic/jetpack-device-detection"
49
+ }
50
+ ],
51
+ "dev": false,
52
+ "dev-package-names": []
53
+ }
vendor/composer/installed.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php return array(
2
+ 'root' => array(
3
+ 'name' => 'automattic/wp-super-cache',
4
+ 'pretty_version' => 'dev-trunk',
5
+ 'version' => 'dev-trunk',
6
+ 'reference' => NULL,
7
+ 'type' => 'wordpress-plugin',
8
+ 'install_path' => __DIR__ . '/../../',
9
+ 'aliases' => array(),
10
+ 'dev' => false,
11
+ ),
12
+ 'versions' => array(
13
+ 'automattic/jetpack-device-detection' => array(
14
+ 'pretty_version' => 'v1.4.22',
15
+ 'version' => '1.4.22.0',
16
+ 'reference' => '2da848bca9a3622885c05509f0a1dab8264067b2',
17
+ 'type' => 'jetpack-library',
18
+ 'install_path' => __DIR__ . '/../automattic/jetpack-device-detection',
19
+ 'aliases' => array(),
20
+ 'dev_requirement' => false,
21
+ ),
22
+ 'automattic/wp-super-cache' => array(
23
+ 'pretty_version' => 'dev-trunk',
24
+ 'version' => 'dev-trunk',
25
+ 'reference' => NULL,
26
+ 'type' => 'wordpress-plugin',
27
+ 'install_path' => __DIR__ . '/../../',
28
+ 'aliases' => array(),
29
+ 'dev_requirement' => false,
30
+ ),
31
+ ),
32
+ );
wp-cache-base.php CHANGED
@@ -4,7 +4,8 @@ global $WPSC_HTTP_HOST, $cache_enabled, $cache_path, $blogcacheid, $blog_cache_d
4
  // we need to backup HTTP_HOST early in the PHP process, and if running in command line set it to something useful.
5
  if ( ! empty( $_SERVER['HTTP_HOST'] ) ) {
6
  $WPSC_HTTP_HOST = function_exists( 'mb_strtolower' ) ? mb_strtolower( $_SERVER['HTTP_HOST'] ) : strtolower( $_SERVER['HTTP_HOST'] );
7
- $WPSC_HTTP_HOST = htmlentities( $WPSC_HTTP_HOST );
 
8
  } elseif ( PHP_SAPI === 'cli' && function_exists( 'get_option' ) ) {
9
  $WPSC_HTTP_HOST = (string) parse_url( get_option( 'home' ), PHP_URL_HOST );
10
  } else {
4
  // we need to backup HTTP_HOST early in the PHP process, and if running in command line set it to something useful.
5
  if ( ! empty( $_SERVER['HTTP_HOST'] ) ) {
6
  $WPSC_HTTP_HOST = function_exists( 'mb_strtolower' ) ? mb_strtolower( $_SERVER['HTTP_HOST'] ) : strtolower( $_SERVER['HTTP_HOST'] );
7
+ // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
8
+ $WPSC_HTTP_HOST = htmlentities( $WPSC_HTTP_HOST, ENT_COMPAT );
9
  } elseif ( PHP_SAPI === 'cli' && function_exists( 'get_option' ) ) {
10
  $WPSC_HTTP_HOST = (string) parse_url( get_option( 'home' ), PHP_URL_HOST );
11
  } else {
wp-cache-phase2.php CHANGED
@@ -3086,7 +3086,7 @@ function wp_cache_post_edit( $post_id ) {
3086
 
3087
  if ( $post_id == $last_post_edited ) {
3088
  $action = current_filter();
3089
- wp_cache_debug( "wp_cache_post_edit(${action}): Already processed post $post_id.", 4 );
3090
  return $post_id;
3091
  }
3092
 
@@ -3110,7 +3110,7 @@ function wp_cache_post_edit( $post_id ) {
3110
  prune_super_cache( get_supercache_dir(), true );
3111
  } else {
3112
  $action = current_filter();
3113
- wp_cache_debug( "wp_cache_post_edit: Clearing cache for post $post_id on ${action}", 2 );
3114
  wp_cache_post_change( $post_id );
3115
  wpsc_delete_post_archives( $post_id ); // delete related archive pages.
3116
  }
@@ -3152,7 +3152,7 @@ function wp_cache_post_change( $post_id ) {
3152
 
3153
  if ( $post_id == $last_processed ) {
3154
  $action = current_filter();
3155
- wp_cache_debug( "wp_cache_post_change(${action}): Already processed post $post_id.", 4 );
3156
  return $post_id;
3157
  }
3158
 
3086
 
3087
  if ( $post_id == $last_post_edited ) {
3088
  $action = current_filter();
3089
+ wp_cache_debug( "wp_cache_post_edit({$action}): Already processed post $post_id.", 4 );
3090
  return $post_id;
3091
  }
3092
 
3110
  prune_super_cache( get_supercache_dir(), true );
3111
  } else {
3112
  $action = current_filter();
3113
+ wp_cache_debug( "wp_cache_post_edit: Clearing cache for post $post_id on {$action}", 2 );
3114
  wp_cache_post_change( $post_id );
3115
  wpsc_delete_post_archives( $post_id ); // delete related archive pages.
3116
  }
3152
 
3153
  if ( $post_id == $last_processed ) {
3154
  $action = current_filter();
3155
+ wp_cache_debug( "wp_cache_post_change({$action}): Already processed post $post_id.", 4 );
3156
  return $post_id;
3157
  }
3158
 
wp-cache.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Super Cache
4
  * Plugin URI: https://wordpress.org/plugins/wp-super-cache/
5
  * Description: Very fast caching plugin for WordPress.
6
- * Version: 1.9.1
7
  * Author: Automattic
8
  * Author URI: https://automattic.com/
9
  * License: GPL2+
@@ -29,6 +29,8 @@
29
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30
  */
31
 
 
 
32
  require_once( __DIR__. '/inc/delete-cache-button.php');
33
  require_once( __DIR__. '/inc/preload-notification.php');
34
 
@@ -44,7 +46,7 @@ if ( ! defined( 'PHP_VERSION_ID' ) ) {
44
  }
45
 
46
  function wpsc_init() {
47
- global $wp_cache_config_file, $wp_cache_config_file_sample, $wpsc_advanced_cache_dist_filename, $wp_cache_check_wp_config, $wpsc_advanced_cache_filename;
48
 
49
  if ( !defined( 'WPCACHECONFIGPATH' ) ) {
50
  define( 'WPCACHECONFIGPATH', WP_CONTENT_DIR );
@@ -52,6 +54,15 @@ function wpsc_init() {
52
 
53
  $wp_cache_config_file = WPCACHECONFIGPATH . '/wp-cache-config.php';
54
 
 
 
 
 
 
 
 
 
 
55
  if ( !defined( 'WPCACHEHOME' ) ) {
56
  define( 'WPCACHEHOME', dirname( __FILE__ ) . '/' );
57
  $wp_cache_config_file_sample = WPCACHEHOME . 'wp-cache-config-sample.php';
@@ -198,6 +209,7 @@ function wpsupercache_deactivate() {
198
  wp_clear_scheduled_hook( 'wp_cache_gc_watcher' );
199
  wp_cache_replace_line('^ *\$cache_enabled', '$cache_enabled = false;', $wp_cache_config_file);
200
  wp_cache_disable_plugin( false ); // don't delete configuration file
 
201
  }
202
  register_deactivation_hook( __FILE__, 'wpsupercache_deactivate' );
203
 
@@ -249,6 +261,146 @@ function wp_cache_network_pages() {
249
  }
250
  add_action( 'network_admin_menu', 'wp_cache_network_pages' );
251
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  function wp_cache_manager_error_checks() {
253
  global $wp_cache_debug, $wp_cache_cron_check, $cache_enabled, $super_cache_enabled, $wp_cache_config_file, $wp_cache_mobile_browsers, $wp_cache_mobile_prefixes, $wp_cache_mobile_browsers, $wp_cache_mobile_enabled, $wp_cache_mod_rewrite;
254
  global $dismiss_htaccess_warning, $dismiss_readable_warning, $dismiss_gc_warning, $wp_cache_shutdown_gc, $is_nginx;
@@ -734,17 +886,6 @@ function wp_cache_manager_updates() {
734
  if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'wpsupercache' )
735
  add_action( 'admin_init', 'wp_cache_manager_updates' );
736
 
737
-
738
- add_action( 'wp_ajax_wpsc-hide-survey', 'wpsc_hide_survey' );
739
- function wpsc_hide_survey(){
740
- //nonce it
741
- check_ajax_referer( 'wpsc-2022-survey', 'security' );
742
- //update it
743
- update_option('wpsc_2022-survey', 0, false);
744
- wp_die();
745
- }
746
-
747
-
748
  function wp_cache_manager() {
749
  global $wp_cache_config_file, $valid_nonce, $supercachedir, $cache_path, $cache_enabled, $cache_compression, $super_cache_enabled;
750
  global $wp_cache_clear_on_post_edit, $cache_rebuild_files, $wp_cache_mutex_disabled, $wp_cache_mobile_enabled, $wp_cache_mobile_browsers, $wp_cache_no_cache_for_get;
@@ -752,6 +893,7 @@ function wp_cache_manager() {
752
  global $wp_super_cache_front_page_check, $wp_cache_refresh_single_only, $wp_cache_mobile_prefixes;
753
  global $wp_cache_mod_rewrite, $wp_supercache_304, $wp_super_cache_late_init, $wp_cache_front_page_checks, $wp_cache_disable_utf8, $wp_cache_mfunc_enabled;
754
  global $wp_super_cache_comments, $wp_cache_home_path, $wpsc_save_headers, $is_nginx;
 
755
 
756
  if ( !wpsupercache_site_admin() )
757
  return false;
@@ -932,126 +1074,82 @@ table.wpsc-settings-table {
932
 
933
  ?>
934
  <style>
935
- .feedback-notice{
936
- background:white;
937
- border: 1px solid #DCDCDE;
938
- border-radius: 4px;
939
- position:relative;
940
- height: 86px;
941
- width: calc(100% - 310px);
942
- }
943
- .feedback-notice .content{
944
- margin-top:5px;
945
- position: absolute;
946
- width:65%;
947
- padding-right:5%;
948
- height: 42px;
949
- left: 65px;
950
- top: calc(50% - 65px/2);
951
- font-size: 14px;
952
- }
953
- .megaphone{
954
- position:absolute;
955
- width: 24px;
956
- height: 24px;
957
- left: 21px;
958
- top: calc(50% - 24px/2);
959
- }
960
- .survey-title b{
961
- font-size:14px;
962
- }
963
- .survey-cta{
964
- position: absolute;
965
- width: 140px;
966
- height: 40px;
967
- right: 64px;
968
- top: calc(50% - 40px/2);
969
- background: #FFFFFF;
970
- border: 1px solid #000000;
971
- border-radius: 4px;
972
- line-height:40px;
973
- text-align:center;
974
- font-style: normal;
975
- font-weight: 600;
976
- font-size: 16px;
977
- letter-spacing: -0.01em;
978
  }
979
- .survey-cta a{
980
- color:#000000 !important;
981
- text-decoration:none !important;
 
 
 
 
 
 
 
 
 
 
 
 
982
  }
983
- .close{
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
984
  position: absolute;
985
- width: 24px;
986
- height: 24px;
987
- right: 20px;
988
- top: calc(50% - 24px/2);
989
  cursor:pointer;
990
  }
991
- </style>
992
 
993
- <?php
994
- $survey_nonce = wp_create_nonce( "wpsc-2022-survey" );
995
- $call_out_box = "0px";
996
- $showing_2022_survey = get_option('wpsc_2022-survey', true);
997
- //to handle the way the yellow box is output in the UI in a table cell.
998
- if ( $showing_2022_survey && $curr_tab !== 'contents' ) {
999
- $call_out_box = '-90px';
1000
- }
1001
- ?>
1002
-
1003
- <script>
1004
-
1005
- function dismissNotice(){
1006
- // hide the notice here sometimes it can be a little slow if waiting for
1007
- // the success response.
1008
- jQuery('#wp-super-cache-2022-survey').fadeOut('slow');
1009
- document.getElementById('wpsc-callout').style.marginTop = "0px";
1010
- jQuery.ajax({
1011
- type: "post",
1012
- dataType: "json",
1013
- url: ajaxurl,
1014
- data: {
1015
- action: 'wpsc-hide-survey',
1016
- security: '<?php echo $survey_nonce; ?>',
1017
- }
1018
- });
1019
  }
1020
-
1021
- </script>
1022
 
1023
- <?php
1024
- //only show the notification if not dismissed.
1025
- if($showing_2022_survey){
1026
- ?>
1027
- <div class="feedback-notice" id="wp-super-cache-2022-survey">
1028
- <div class="megaphone">
1029
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1030
- <path d="M5 10H5.07846L5.15522 9.98376L18.0785 7.25H19.25V15.25H18.0785L5.15522 12.5162L5.07846 12.5H5H4.75V10H5Z" stroke="#1E1E1E" stroke-width="1.5"/>
1031
- <path fill-rule="evenodd" clip-rule="evenodd" d="M9.92831 16.2481C8.73996 15.8848 8.07114 14.6269 8.43446 13.4386L7 13C6.39448 14.9806 7.50918 17.077 9.48975 17.6825C11.4703 18.2881 13.5668 17.1734 14.1723 15.1928L12.7378 14.7542C12.3745 15.9426 11.1166 16.6114 9.92831 16.2481Z" fill="#1E1E1E"/>
1032
- </svg>
1033
- </div>
1034
- <div class="content">
1035
- <div style="survey-title">
1036
- <b><?php _e("WP Super Cache Survey", "wp-super-cache"); ?></b>
1037
- </div>
1038
- <?php
1039
- _e("We’d love to hear your thoughts about what should make it into WP Super Cache in the future. Please take our quick survey to help us improve!", "wp-super-cache");
1040
- ?>
1041
- </div>
1042
- <div class="survey-cta">
1043
- <a href="https://docs.google.com/forms/d/e/1FAIpQLScOnrNs4_g-vOqzpPRghfK4WPFGGrBWqn9J5ZX8OYwyxa_QKg/viewform" target="_blank"><?php _e("Take Survey", "wp-super-cache"); ?></a>
1044
- </div>
1045
- <div class="close" onclick="dismissNotice()">
1046
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1047
- <path d="M5.40456 5L19 19M5 19L18.5954 5" stroke="#1E1E1E" stroke-width="1.5"/>
1048
- </svg>
1049
- </div>
1050
- </div>
1051
- <?php } ?>
1052
 
1053
  <table class="wpsc-settings-table"><td valign="top">
 
1054
  <?php
 
1055
 
1056
  switch ( $curr_tab ) {
1057
  case 'cdn':
@@ -1173,14 +1271,14 @@ table.wpsc-settings-table {
1173
 
1174
  </fieldset>
1175
  </td><td valign='top' style='width: 300px'>
1176
- <div id="wpsc-callout" style='background: #ffc; border: 1px solid #333; margin: 2px; padding: 3px 15px;margin-top:<?php echo $call_out_box;?>;'>
1177
  <h4><?php _e( 'Other Site Tools', 'wp-super-cache' ); ?></h4>
1178
  <ul style="list-style: square; margin-left: 2em;">
1179
 
1180
- <li><a href="https://jetpack.com/redirect/?source=wp-super-cache-boost"><?php _e( 'Boost your page speed scores', 'wp-super-cache' ); ?></a></li>
1181
- <li><a href="https://jetpack.com/redirect/?source=jitm-wpsc-generic"><?php _e( 'Speed up images and photos (free)', 'wp-super-cache' ); ?></a></li>
1182
- <li><a href="https://jetpack.com/redirect/?source=jitm-wpsc-premium"><?php _e( 'Fast video hosting (paid)', 'wp-super-cache' ); ?></a></li>
1183
- <li><a href="https://crowdsignal.com/pricing/?ad=wpsc"><?php _e( 'Add Surveys and Polls to your site', 'wp-super-cache' ); ?></a></li>
1184
  </ul>
1185
  <h4><?php _e( 'Need Help?', 'wp-super-cache' ); ?></h4>
1186
  <ol>
3
  * Plugin Name: WP Super Cache
4
  * Plugin URI: https://wordpress.org/plugins/wp-super-cache/
5
  * Description: Very fast caching plugin for WordPress.
6
+ * Version: 1.9.2-beta
7
  * Author: Automattic
8
  * Author URI: https://automattic.com/
9
  * License: GPL2+
29
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30
  */
31
 
32
+ define( 'WPSC_VERSION', '1.9.1-alpha' );
33
+
34
  require_once( __DIR__. '/inc/delete-cache-button.php');
35
  require_once( __DIR__. '/inc/preload-notification.php');
36
 
46
  }
47
 
48
  function wpsc_init() {
49
+ global $wp_cache_config_file, $wp_cache_config_file_sample, $wpsc_advanced_cache_dist_filename, $wp_cache_check_wp_config, $wpsc_advanced_cache_filename, $wpsc_promo_links;
50
 
51
  if ( !defined( 'WPCACHECONFIGPATH' ) ) {
52
  define( 'WPCACHECONFIGPATH', WP_CONTENT_DIR );
54
 
55
  $wp_cache_config_file = WPCACHECONFIGPATH . '/wp-cache-config.php';
56
 
57
+ // Centralise the promotional links to other products
58
+ $wpsc_promo_links = array(
59
+ 'boost' => 'https://jetpack.com/boost/?utm_source=wporg&utm_medium=plugin&utm_campaign=wp-super-cache&utm_id=wp-super-cache',
60
+ 'photon' => 'https://jetpack.com/features/design/content-delivery-network/?utm_source=wporg&utm_medium=plugin&utm_campaign=wp-super-cache&utm_id=wp-super-cache',
61
+ 'videopress' => 'https://jetpack.com/videopress/?utm_source=wporg&utm_medium=plugin&utm_campaign=wp-super-cache&utm_id=wp-super-cache',
62
+ 'crowdsignal' => 'https://crowdsignal.com/?utm_source=wporg&utm_medium=plugin&utm_campaign=wp-super-cache&utm_id=wp-super-cache',
63
+ 'jetpack' => 'https://jetpack.com/?utm_source=wporg&utm_medium=plugin&utm_campaign=wp-super-cache&utm_id=wp-super-cache',
64
+ );
65
+
66
  if ( !defined( 'WPCACHEHOME' ) ) {
67
  define( 'WPCACHEHOME', dirname( __FILE__ ) . '/' );
68
  $wp_cache_config_file_sample = WPCACHEHOME . 'wp-cache-config-sample.php';
209
  wp_clear_scheduled_hook( 'wp_cache_gc_watcher' );
210
  wp_cache_replace_line('^ *\$cache_enabled', '$cache_enabled = false;', $wp_cache_config_file);
211
  wp_cache_disable_plugin( false ); // don't delete configuration file
212
+ delete_option( 'wpsc_2022_boost_banner' );
213
  }
214
  register_deactivation_hook( __FILE__, 'wpsupercache_deactivate' );
215
 
261
  }
262
  add_action( 'network_admin_menu', 'wp_cache_network_pages' );
263
 
264
+ /**
265
+ * Load JavaScript on admin pages.
266
+ */
267
+ function wp_super_cache_admin_enqueue_scripts( $hook ) {
268
+ if ( 'settings_page_wpsupercache' !== $hook ) {
269
+ return;
270
+ }
271
+
272
+ wp_enqueue_script(
273
+ 'wp-super-cache-admin',
274
+ trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/admin.js',
275
+ array( 'jquery' ),
276
+ WPSC_VERSION,
277
+ false
278
+ );
279
+
280
+ wp_localize_script(
281
+ 'wp-super-cache-admin',
282
+ 'wpscAdmin',
283
+ array(
284
+ 'boostDismissNonce' => wp_create_nonce( 'wpsc_dismiss_boost_banner' ),
285
+ 'boostInstallNonce' => wp_create_nonce( 'updates' ),
286
+ 'boostActivateNonce' => wp_create_nonce( 'activate-boost' ),
287
+ )
288
+ );
289
+ }
290
+ add_action( 'admin_enqueue_scripts', 'wp_super_cache_admin_enqueue_scripts' );
291
+
292
+ /**
293
+ * Use the standard WordPress plugin installation ajax handler.
294
+ */
295
+ add_action( 'wp_ajax_wpsc_install_plugin', 'wp_ajax_install_plugin' );
296
+
297
+ /**
298
+ * Check if Jetpack Boost has been installed.
299
+ */
300
+ function wpsc_is_boost_installed() {
301
+ $plugins = array_keys( get_plugins() );
302
+
303
+ foreach ( $plugins as $plugin ) {
304
+ if ( false !== strpos( $plugin, 'jetpack-boost.php' ) ) {
305
+ return true;
306
+ }
307
+ }
308
+
309
+ return false;
310
+ }
311
+
312
+ /**
313
+ * Check if Jetpack Boost is active.
314
+ */
315
+ function wpsc_is_boost_active() {
316
+ return class_exists( '\Automattic\Jetpack_Boost\Jetpack_Boost' );
317
+ }
318
+
319
+ /**
320
+ * Admin ajax action: hide the Boost Banner.
321
+ */
322
+ function wpsc_hide_boost_banner() {
323
+ check_ajax_referer( 'wpsc_dismiss_boost_banner', 'nonce' );
324
+ update_option( 'wpsc_2022_boost_banner', 0, 'no' );
325
+
326
+ wp_die();
327
+ }
328
+ add_action( 'wp_ajax_wpsc-hide-boost-banner', 'wpsc_hide_boost_banner' );
329
+
330
+ /**
331
+ * Admin ajax action: activate Jetpack Boost.
332
+ */
333
+ function wpsc_ajax_activate_boost() {
334
+ check_ajax_referer( 'activate-boost' );
335
+
336
+ $result = activate_plugin( 'jetpack-boost/jetpack-boost.php' );
337
+ if ( is_wp_error( $result ) ) {
338
+ wp_send_json_error( $result->get_error_message() );
339
+ }
340
+
341
+ wp_send_json_success();
342
+ }
343
+ add_action( 'wp_ajax_wpsc_activate_boost', 'wpsc_ajax_activate_boost' );
344
+
345
+ /**
346
+ * Show a Jetpack Boost installation banner (unless dismissed or installed)
347
+ */
348
+ function wpsc_jetpack_boost_install_banner() {
349
+ // Don't show the banner if Boost is installed, or the banner has been dismissed.
350
+ if ( wpsc_is_boost_active() || ! get_option( 'wpsc_2022_boost_banner', true ) ) {
351
+ return;
352
+ }
353
+
354
+ $install_url = wp_nonce_url( admin_url( 'update.php?action=install-plugin&plugin=jetpack-boost' ), 'install-plugin_jetpack-boost' );
355
+ $activate_url = admin_url( 'plugins.php' );
356
+ $is_installed = wpsc_is_boost_installed();
357
+ $button_url = $is_installed ? $activate_url : $install_url;
358
+ $button_label = $is_installed ? __( 'Activate Jetpack Boost', 'wp-super-cache' ) : __( 'Install Jetpack Boost', 'wp-super-cache' );
359
+ $button_id = $is_installed ? 'wpsc-activate-boost-button' : 'wpsc-install-boost-button';
360
+
361
+ ?>
362
+ <div class="wpsc-boost-banner">
363
+ <div class="wpsc-boost-banner-inner">
364
+ <div class="wpsc-boost-banner-content">
365
+ <img style="width:176px" src="<?php echo esc_url( plugin_dir_url( __FILE__ ) . '/assets/jetpack-logo.svg' ); ?>" height="32" />
366
+
367
+ <h3>
368
+ <?php esc_html_e( 'Find out how much Super Cache speeds up your site', 'wp-super-cache' ); ?>
369
+ </h3>
370
+
371
+ <p id="wpsc-install-invitation">
372
+ <?php
373
+ esc_html_e(
374
+ 'Caching is a great start, but there is so much more to speeding up your site. Find out how much your cache is speeding up your site, and more with Jetpack Boost.',
375
+ 'wp-super-cache'
376
+ );
377
+ ?>
378
+ </p>
379
+
380
+ <div id="wpsc-boost-banner-error" style="display:none; color:red; margin-bottom: 20px;"></div>
381
+
382
+ <a href="<?php echo esc_url( $button_url ); ?>" class="button button-primary wpsc-install-action-button" id="<?php echo esc_attr( $button_id ); ?>">
383
+ <div class="spinner" style="display:none; margin-top: 8px"></div>
384
+ <label><?php echo esc_html( $button_label ); ?></label>
385
+ </a>
386
+ </div>
387
+
388
+ <div class="wpsc-boost-banner-image-container">
389
+ <img
390
+ src="<?php echo esc_url( plugin_dir_url( __FILE__ ) . '/assets/boost-performance.png' ); ?>"
391
+ title="<?php esc_attr_e( 'Check how your web site performance scores for desktop and mobile.', 'wp-super-cache' ); ?>"
392
+ alt="<?php esc_attr_e( 'An image showing a web site with a photo of a time-lapsed watch face. In the foreground is a graph showing a speed score for mobile and desktop in yellow and green with an overall score of B', 'wp-super-cache' ); ?>"
393
+ srcset="<?php echo esc_url( plugin_dir_url( __FILE__ ) . '/assets/boost-performance.png' ); ?> 650w <?php echo esc_url( plugin_dir_url( __FILE__ ) . '/assets/boost-performance-2x.png' ); ?> 1306w"
394
+ sizes="(max-width: 782px) 654px, 1306px"
395
+ >
396
+ </div>
397
+ </div>
398
+
399
+ <span class="wpsc-boost-dismiss dashicons dashicons-dismiss"></span>
400
+ </div>
401
+ <?php
402
+ }
403
+
404
  function wp_cache_manager_error_checks() {
405
  global $wp_cache_debug, $wp_cache_cron_check, $cache_enabled, $super_cache_enabled, $wp_cache_config_file, $wp_cache_mobile_browsers, $wp_cache_mobile_prefixes, $wp_cache_mobile_browsers, $wp_cache_mobile_enabled, $wp_cache_mod_rewrite;
406
  global $dismiss_htaccess_warning, $dismiss_readable_warning, $dismiss_gc_warning, $wp_cache_shutdown_gc, $is_nginx;
886
  if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'wpsupercache' )
887
  add_action( 'admin_init', 'wp_cache_manager_updates' );
888
 
 
 
 
 
 
 
 
 
 
 
 
889
  function wp_cache_manager() {
890
  global $wp_cache_config_file, $valid_nonce, $supercachedir, $cache_path, $cache_enabled, $cache_compression, $super_cache_enabled;
891
  global $wp_cache_clear_on_post_edit, $cache_rebuild_files, $wp_cache_mutex_disabled, $wp_cache_mobile_enabled, $wp_cache_mobile_browsers, $wp_cache_no_cache_for_get;
893
  global $wp_super_cache_front_page_check, $wp_cache_refresh_single_only, $wp_cache_mobile_prefixes;
894
  global $wp_cache_mod_rewrite, $wp_supercache_304, $wp_super_cache_late_init, $wp_cache_front_page_checks, $wp_cache_disable_utf8, $wp_cache_mfunc_enabled;
895
  global $wp_super_cache_comments, $wp_cache_home_path, $wpsc_save_headers, $is_nginx;
896
+ global $wpsc_promo_links;
897
 
898
  if ( !wpsupercache_site_admin() )
899
  return false;
1074
 
1075
  ?>
1076
  <style>
1077
+ .wpsc-boost-banner {
1078
+ margin: 2px 1.25rem 1.25rem 0;
1079
+ box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.03), 0px 1px 2px rgba(0, 0, 0, 0.03);
1080
+ border: 1px solid #d5d5d5;
1081
+ position: relative;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1082
  }
1083
+
1084
+ .wpsc-boost-banner-inner {
1085
+ display: flex;
1086
+ grid-template-columns: minmax(auto, 750px) 500px;
1087
+ justify-content: space-between;
1088
+ min-height: 300px;
1089
+ background: #fff;
1090
+ overflow: hidden;
1091
+ }
1092
+
1093
+ .wpsc-boost-banner-content {
1094
+ display: inline-flex;
1095
+ flex-direction: column;
1096
+ padding: 2rem 3rem 2rem 2rem;
1097
+ text-align: left;
1098
  }
1099
+
1100
+ .wpsc-boost-banner-image-container {
1101
+ position: relative;
1102
+ background-image: url( <?php echo esc_url( plugin_dir_url( __FILE__ ) . '/assets/jetpack-colors.svg' ); ?> );
1103
+ background-size: cover;
1104
+ max-width: 40%;
1105
+ overflow: hidden;
1106
+ }
1107
+
1108
+ .wpsc-boost-banner-image-container img {
1109
+ position: relative;
1110
+ left: 50%;
1111
+ top: 50%;
1112
+ transform: translate(-50%, -50%);
1113
+ width: 100%;
1114
+ }
1115
+
1116
+ .wpsc-boost-banner p {
1117
+ font-size: 16px;
1118
+ line-height: 1.5;
1119
+ margin: 1rem 0 2rem;
1120
+ }
1121
+
1122
+ .wpsc-boost-banner .wpsc-boost-dismiss {
1123
  position: absolute;
1124
+ top: 10px;
1125
+ right: 10px;
1126
+ color: black;
 
1127
  cursor:pointer;
1128
  }
 
1129
 
1130
+ .wpsc-boost-banner .button-primary {
1131
+ background: black;
1132
+ border-color: black;
1133
+ color: #fff;
1134
+ width: fit-content;
1135
+ padding: 0.4rem 1rem;
1136
+ font-size: 16px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1137
  }
 
 
1138
 
1139
+ .wpsc-boost-banner .button-primary:hover {
1140
+ background-color: #333;
1141
+ }
1142
+
1143
+ .wpsc-boost-banner .button-primary:visited {
1144
+ background-color: black;
1145
+ border-color: black;
1146
+ }
1147
+ </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1148
 
1149
  <table class="wpsc-settings-table"><td valign="top">
1150
+
1151
  <?php
1152
+ wpsc_jetpack_boost_install_banner();
1153
 
1154
  switch ( $curr_tab ) {
1155
  case 'cdn':
1271
 
1272
  </fieldset>
1273
  </td><td valign='top' style='width: 300px'>
1274
+ <div id="wpsc-callout" style='background: #ffc; border: 1px solid #333; margin: 2px; padding: 3px 15px'>
1275
  <h4><?php _e( 'Other Site Tools', 'wp-super-cache' ); ?></h4>
1276
  <ul style="list-style: square; margin-left: 2em;">
1277
 
1278
+ <li><a href="<?php echo esc_url( $wpsc_promo_links['boost'] ); ?>"><?php esc_html_e( 'Boost your page speed scores', 'wp-super-cache' ); ?></a></li>
1279
+ <li><a href="<?php echo esc_url( $wpsc_promo_links['photon'] ); ?>"><?php esc_html_e( 'Speed up images and photos (free)', 'wp-super-cache' ); ?></a></li>
1280
+ <li><a href="<?php echo esc_url( $wpsc_promo_links['videopress'] ); ?>"><?php esc_html_e( 'Fast video hosting (paid)', 'wp-super-cache' ); ?></a></li>
1281
+ <li><a href="<?php echo esc_url( $wpsc_promo_links['crowdsignal'] ); ?>"><?php esc_html_e( 'Add Surveys and Polls to your site', 'wp-super-cache' ); ?></a></li>
1282
  </ul>
1283
  <h4><?php _e( 'Need Help?', 'wp-super-cache' ); ?></h4>
1284
  <ol>