File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 30
30
- [ #850 ] ( https://github.com/leonstafford/wp2static/issues/850 ) : Fix to write content to disk, even for cache hits when "Use CrawlCache" is ON. @utchy
31
31
- [ #877 ] ( https://github.com/leonstafford/wp2static/issues/877 ) : Detect from web UI was not adding any URLs. @timothylcooke
32
32
- [ #878 ] ( https://github.com/leonstafford/wp2static/issues/878 ) : Fix deletion of old pages when crawl returns 404. @timothylcooke
33
+ - [ #868 ] ( https://github.com/WP2Static/wp2static/pull/868 ) : Detect files in Divi et-cache/ directory when present. @dunklerfox
33
34
34
35
## WP2Static 7.1.7 (2021-09-04)
35
36
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ public static function detect( string $wp_site_url ) : array {
21
21
$ vendor_cache_dir =
22
22
SiteInfo::getPath ( 'content ' ) . 'cache/ ' ;
23
23
24
+ // cache dir used by Elegant Themes
25
+ $ et_cache_dir =
26
+ SiteInfo::getPath ( 'content ' ) . 'et-cache/ ' ;
27
+
24
28
if ( is_dir ( $ vendor_cache_dir ) ) {
25
29
$ site_url = SiteInfo::getUrl ( 'site ' );
26
30
$ content_url = SiteInfo::getUrl ( 'content ' );
@@ -41,6 +45,26 @@ public static function detect( string $wp_site_url ) : array {
41
45
$ vendor_files = array_merge ( $ vendor_files , $ vendor_cache_urls );
42
46
}
43
47
48
+ if ( is_dir ( $ et_cache_dir ) ) {
49
+ $ site_url = SiteInfo::getUrl ( 'site ' );
50
+ $ content_url = SiteInfo::getUrl ( 'content ' );
51
+
52
+ // get difference between home and wp-contents URL
53
+ $ prefix = str_replace (
54
+ $ site_url ,
55
+ '/ ' ,
56
+ $ content_url
57
+ );
58
+
59
+ $ et_cache_urls = DetectVendorCache::detect (
60
+ $ et_cache_dir ,
61
+ SiteInfo::getPath ( 'content ' ),
62
+ $ prefix
63
+ );
64
+
65
+ $ vendor_files = array_merge ( $ vendor_files , $ et_cache_urls );
66
+ }
67
+
44
68
if ( class_exists ( 'Custom_Permalinks ' ) ) {
45
69
global $ wpdb ;
46
70
You can’t perform that action at this time.
0 commit comments