@@ -21,12 +21,12 @@ |
||
21 | 21 | $this->classes(); |
22 | 22 | $this->xmlrpc(); |
23 | 23 | |
24 | - add_action('admin_head', [$this, 'adminHead']); |
|
24 | + add_action('admin_head', [ $this, 'adminHead' ]); |
|
25 | 25 | |
26 | 26 | add_theme_support('post-thumbnails'); |
27 | 27 | |
28 | - add_filter('theme_page_templates', [$this, 'templates']); |
|
29 | - add_filter('timber_context', [$this, 'context']); |
|
28 | + add_filter('theme_page_templates', [ $this, 'templates' ]); |
|
29 | + add_filter('timber_context', [ $this, 'context' ]); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | public function context(array $context) : array |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | public function __construct() |
21 | 21 | { |
22 | 22 | $customToolbars = $this->wyswygToolbars(); |
23 | - add_filter('acf/rest_api/post/get_fields', [$this, 'acfGetFields']); |
|
24 | - add_filter('acf/fields/wysiwyg/toolbars', function (array $toolbars) use ($customToolbars) { |
|
23 | + add_filter('acf/rest_api/post/get_fields', [ $this, 'acfGetFields' ]); |
|
24 | + add_filter('acf/fields/wysiwyg/toolbars', function(array $toolbars) use ($customToolbars) { |
|
25 | 25 | return array_merge($toolbars, $customToolbars); |
26 | 26 | }); |
27 | - add_filter('admin_menu', function () { |
|
27 | + add_filter('admin_menu', function() { |
|
28 | 28 | if (!acf_current_user_can_admin()) { |
29 | 29 | $this->removeSectionsForNotAdminUsers(); |
30 | 30 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | public function acfGetFields(array $data) : array |
35 | 35 | { |
36 | 36 | if (!empty($data)) { |
37 | - array_walk_recursive($data, ['self', 'serializeFeaturedImage']); |
|
37 | + array_walk_recursive($data, [ 'self', 'serializeFeaturedImage' ]); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | return $data; |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | public function __construct() |
21 | 21 | { |
22 | 22 | if (true === WP_DEBUG) { |
23 | - add_action('wp_enqueue_scripts', [$this, 'developmentAssets']); |
|
23 | + add_action('wp_enqueue_scripts', [ $this, 'developmentAssets' ]); |
|
24 | 24 | } else { |
25 | - add_action('wp_enqueue_scripts', [$this, 'productionAssets']); |
|
25 | + add_action('wp_enqueue_scripts', [ $this, 'productionAssets' ]); |
|
26 | 26 | } |
27 | - add_action('admin_enqueue_scripts', [$this, 'adminAssets']); |
|
27 | + add_action('admin_enqueue_scripts', [ $this, 'adminAssets' ]); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function developmentAssets() : void |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | protected function addScript( |
43 | 43 | string $name, |
44 | 44 | string $from = AssetsInterface::ASSETS_JS, |
45 | - array $dependencies = ['jquery'], |
|
45 | + array $dependencies = [ 'jquery' ], |
|
46 | 46 | string $version = '1.0.0', |
47 | 47 | bool $inFooter = true, |
48 | 48 | ?string $ajaxUrl = null |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | protected function addStylesheet( |
60 | 60 | string $name, |
61 | 61 | string $from = AssetsInterface::CSS, |
62 | - array $dependencies = [], |
|
62 | + array $dependencies = [ ], |
|
63 | 63 | string $version = '1.0.0', |
64 | 64 | string $media = 'all' |
65 | 65 | ) { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | protected function registerAjaxUrls(string $name, string $ajaxUrl) : void |
87 | 87 | { |
88 | 88 | if (false === is_array($ajaxUrl)) { |
89 | - $ajaxUrl = [$ajaxUrl]; |
|
89 | + $ajaxUrl = [ $ajaxUrl ]; |
|
90 | 90 | } |
91 | 91 | foreach ($ajaxUrl as $url) { |
92 | 92 | wp_localize_script($name, $url, [ |
@@ -19,11 +19,11 @@ |
||
19 | 19 | { |
20 | 20 | public function __construct() |
21 | 21 | { |
22 | - add_filter('login_errors', [$this, 'errors']); |
|
23 | - add_action('login_enqueue_scripts', [$this, 'logo']); |
|
24 | - add_filter('login_message', [$this, 'message']); |
|
25 | - add_filter('login_headertitle', [$this, 'title']); |
|
26 | - add_filter('login_headerurl', [$this, 'url']); |
|
22 | + add_filter('login_errors', [ $this, 'errors' ]); |
|
23 | + add_action('login_enqueue_scripts', [ $this, 'logo' ]); |
|
24 | + add_filter('login_message', [ $this, 'message' ]); |
|
25 | + add_filter('login_headertitle', [ $this, 'title' ]); |
|
26 | + add_filter('login_headerurl', [ $this, 'url' ]); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function errors() : void |
@@ -46,7 +46,7 @@ |
||
46 | 46 | margin-top: 0; |
47 | 47 | } |
48 | 48 | </style> |
49 | -EOL; |
|
49 | +eol; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | public function message() : void |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | public function __construct() |
22 | 22 | { |
23 | - add_action('wp_ajax_nopriv_' . $this->action, [$this, 'ajax']); |
|
24 | - add_action('wp_ajax_' . $this->action, [$this, 'ajax']); |
|
23 | + add_action('wp_ajax_nopriv_' . $this->action, [ $this, 'ajax' ]); |
|
24 | + add_action('wp_ajax_' . $this->action, [ $this, 'ajax' ]); |
|
25 | 25 | } |
26 | 26 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | public function components() : array |
47 | 47 | { |
48 | - return []; |
|
48 | + return [ ]; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function addScreenAttributes() : void |