@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | return $wpdb->prefix . TABLE_NAME; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | -call_user_func(function () { |
|
| 21 | +call_user_func(function() { |
|
| 22 | 22 | $optionName = TABLE_NAME . '_db_version'; |
| 23 | 23 | |
| 24 | 24 | $installedVersion = get_option($optionName); |
@@ -61,9 +61,9 @@ discard block |
||
| 61 | 61 | return $url; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | -add_action('timber/twig/filters', function ($twig) { |
|
| 64 | +add_action('timber/twig/filters', function($twig) { |
|
| 65 | 65 | $twig->addFilter( |
| 66 | - new TwigFilter('resizeDynamic', function ( |
|
| 66 | + new TwigFilter('resizeDynamic', function( |
|
| 67 | 67 | $src, |
| 68 | 68 | $w, |
| 69 | 69 | $h = 0, |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | global $flyntResizedImages; |
| 89 | 89 | if (empty($flyntResizedImages)) { |
| 90 | - add_action('shutdown', function () { |
|
| 90 | + add_action('shutdown', function() { |
|
| 91 | 91 | storeResizedUrls(); |
| 92 | 92 | }, -1); |
| 93 | 93 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | add_rewrite_tag("%{$routeName}%", "([^&]+)"); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | -add_action('parse_request', function ($wp) { |
|
| 117 | +add_action('parse_request', function($wp) { |
|
| 118 | 118 | if (isset($wp->query_vars[IMAGE_ROUTE])) { |
| 119 | 119 | generateImage(); |
| 120 | 120 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | header("HTTP/1.0 404 Not Found"); |
| 140 | 140 | exit(); |
| 141 | 141 | } |
| 142 | - $moveImageFunction = function ($location) use ($uploadDirRelative) { |
|
| 142 | + $moveImageFunction = function($location) use ($uploadDirRelative) { |
|
| 143 | 143 | return str_replace( |
| 144 | 144 | $uploadDirRelative, |
| 145 | 145 | trailingslashit($uploadDirRelative) . IMAGE_PATH_SEPARATOR, |
@@ -211,11 +211,11 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | add_filter('mod_rewrite_rules', 'Flynt\\TimberDynamicResize\\addRewriteRule'); |
| 213 | 213 | |
| 214 | -add_action('after_switch_theme', function () { |
|
| 214 | +add_action('after_switch_theme', function() { |
|
| 215 | 215 | add_action('shutdown', 'flush_rewrite_rules'); |
| 216 | 216 | }); |
| 217 | 217 | |
| 218 | -add_action('switch_theme', function () { |
|
| 218 | +add_action('switch_theme', function() { |
|
| 219 | 219 | remove_filter('mod_rewrite_rules', 'Flynt\\TimberDynamicResize\\addRewriteRule'); |
| 220 | 220 | flush_rewrite_rules(); |
| 221 | 221 | }); |