Completed
Pull Request — master (#214)
by Dominik
05:45 queued 01:46
created

addRewriteRule()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 41
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 10
nc 1
nop 1
dl 0
loc 41
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
namespace Flynt\TimberDynamicResize;
4
5
use Flynt\Utils\TimberDynamicResize;
6
7
/**
8
 * Disable dynamic image generation and fall back
9
 * to regular timber resize functionality.
10
 */
11
// add_filter('Flynt/TimberDynamicResize/disableDynamic', '__return_true');
12
13
/**
14
 * Disable WebP generation
15
 */
16
// add_filter('Flynt/TimberDynamicResize/disableWebp', '__return_true');
17
18
/**
19
 * Set upload directory relative to web root.
20
 * If there are issues with image generation,
21
 * this filter most likely needs to be used.
22
 * Can be related to having a custom WordPress folder
23
 * structure or plugins that manipulate home_url.
24
 */
25
// add_filter('Flynt/TimberDynamicResize/relativeUploadDir', function () {
26
//     return '/app/uploads';
27
// });
28
29
new TimberDynamicResize();
30