@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | public function __construct() |
26 | 26 | { |
27 | - add_action('wp_ajax_nopriv_' . $this->action(), [$this, 'ajax']); |
|
28 | - add_action('wp_ajax_' . $this->action(), [$this, 'ajax']); |
|
27 | + add_action('wp_ajax_nopriv_' . $this->action(), [ $this, 'ajax' ]); |
|
28 | + add_action('wp_ajax_' . $this->action(), [ $this, 'ajax' ]); |
|
29 | 29 | } |
30 | 30 | } |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | public function __construct() |
25 | 25 | { |
26 | 26 | $customToolbars = $this->wysiwygToolbars(); |
27 | - add_filter('acf/rest_api/post/get_fields', [$this, 'acfGetFields']); |
|
28 | - add_filter('acf/fields/wysiwyg/toolbars', function (array $toolbars) use ($customToolbars) { |
|
27 | + add_filter('acf/rest_api/post/get_fields', [ $this, 'acfGetFields' ]); |
|
28 | + add_filter('acf/fields/wysiwyg/toolbars', function(array $toolbars) use ($customToolbars) { |
|
29 | 29 | return array_merge($toolbars, $customToolbars); |
30 | 30 | }); |
31 | 31 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | public function acfGetFields(array $data) : array |
34 | 34 | { |
35 | 35 | if (!empty($data)) { |
36 | - array_walk_recursive($data, ['self', 'serializeFeaturedImage']); |
|
36 | + array_walk_recursive($data, [ 'self', 'serializeFeaturedImage' ]); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | return $data; |
@@ -25,12 +25,12 @@ |
||
25 | 25 | $this->register(); |
26 | 26 | $this->xmlrpc(); |
27 | 27 | |
28 | - add_action('admin_head', [$this, 'adminHead']); |
|
28 | + add_action('admin_head', [ $this, 'adminHead' ]); |
|
29 | 29 | |
30 | 30 | add_theme_support('post-thumbnails'); |
31 | 31 | |
32 | - add_filter('theme_page_templates', [$this, 'templates']); |
|
33 | - add_filter('timber_context', [$this, 'context']); |
|
32 | + add_filter('theme_page_templates', [ $this, 'templates' ]); |
|
33 | + add_filter('timber_context', [ $this, 'context' ]); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | private function register() : void |
@@ -31,16 +31,16 @@ discard block |
||
31 | 31 | public function __construct() |
32 | 32 | { |
33 | 33 | defined('WP_DEBUG') && true === WP_DEBUG |
34 | - ? add_action('wp_enqueue_scripts', [$this, 'developmentAssets']) |
|
35 | - : add_action('wp_enqueue_scripts', [$this, 'productionAssets']); |
|
34 | + ? add_action('wp_enqueue_scripts', [ $this, 'developmentAssets' ]) |
|
35 | + : add_action('wp_enqueue_scripts', [ $this, 'productionAssets' ]); |
|
36 | 36 | |
37 | - add_action('admin_enqueue_scripts', [$this, 'adminAssets']); |
|
37 | + add_action('admin_enqueue_scripts', [ $this, 'adminAssets' ]); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | protected function addScript( |
41 | 41 | string $name, |
42 | 42 | string $from, |
43 | - array $dependencies = ['jquery'], |
|
43 | + array $dependencies = [ 'jquery' ], |
|
44 | 44 | string $version = '1.0.0', |
45 | 45 | bool $inFooter = true, |
46 | 46 | ?string $ajaxUrl = null |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | protected function addStylesheet( |
58 | 58 | string $name, |
59 | 59 | string $from, |
60 | - array $dependencies = [], |
|
60 | + array $dependencies = [ ], |
|
61 | 61 | string $version = '1.0.0', |
62 | 62 | string $media = 'all' |
63 | 63 | ) { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | protected function registerAjaxUrls(string $name, string $ajaxUrl) : void |
85 | 85 | { |
86 | 86 | if (false === is_array($ajaxUrl)) { |
87 | - $ajaxUrl = [$ajaxUrl]; |
|
87 | + $ajaxUrl = [ $ajaxUrl ]; |
|
88 | 88 | } |
89 | 89 | foreach ($ajaxUrl as $url) { |
90 | 90 | wp_localize_script($name, $url, [ |