@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace LIN3S\WPFoundation; |
15 | 15 | |
@@ -24,7 +24,7 @@ discard block |
||
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 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace LIN3S\WPFoundation; |
15 | 15 | |
@@ -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; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace LIN3S\WPFoundation; |
15 | 15 | |
@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | |
28 | 28 | public function __construct() |
29 | 29 | { |
30 | - add_filter('login_errors', [$this, 'errors']); |
|
31 | - add_action('login_enqueue_scripts', [$this, 'logo']); |
|
32 | - add_filter('login_message', [$this, 'message']); |
|
33 | - add_filter('login_headertitle', [$this, 'title']); |
|
34 | - add_filter('login_headerurl', [$this, 'url']); |
|
30 | + add_filter('login_errors', [ $this, 'errors' ]); |
|
31 | + add_action('login_enqueue_scripts', [ $this, 'logo' ]); |
|
32 | + add_filter('login_message', [ $this, 'message' ]); |
|
33 | + add_filter('login_headertitle', [ $this, 'title' ]); |
|
34 | + add_filter('login_headerurl', [ $this, 'url' ]); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | public function logo() : void |
@@ -50,7 +50,7 @@ |
||
50 | 50 | margin-top: 0; |
51 | 51 | } |
52 | 52 | </style> |
53 | -EOL; |
|
53 | +eol; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | public function title() : string |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace LIN3S\WPFoundation; |
15 | 15 | |
@@ -22,6 +22,6 @@ discard block |
||
22 | 22 | |
23 | 23 | public function __construct() |
24 | 24 | { |
25 | - add_action('init', [$this, 'menus']); |
|
25 | + add_action('init', [ $this, 'menus' ]); |
|
26 | 26 | } |
27 | 27 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace LIN3S\WPFoundation; |
15 | 15 | |
@@ -25,12 +25,12 @@ discard block |
||
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 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace LIN3S\WPFoundation; |
15 | 15 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $this->user = wp_get_current_user(); |
30 | 30 | |
31 | 31 | if ($this->isNotAdmin()) { |
32 | - add_filter('admin_menu', function () { |
|
32 | + add_filter('admin_menu', function() { |
|
33 | 33 | remove_menu_page('profile.php'); |
34 | 34 | remove_menu_page('tools.php'); |
35 | 35 | remove_menu_page('options-general.php'); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | if (method_exists(static::class, 'definition')) { |
30 | 30 | $definition = static::definition($aName); |
31 | - $definition['location'] = $aConnector; |
|
31 | + $definition[ 'location' ] = $aConnector; |
|
32 | 32 | acf_add_local_field_group($definition); |
33 | 33 | } else { |
34 | 34 | //@deprecated Will be removed in 2.0, and this class will implement FieldComponentInterface |
@@ -27,8 +27,8 @@ |
||
27 | 27 | { |
28 | 28 | parent::__construct(); |
29 | 29 | |
30 | - add_action('admin_init', [$this, 'addScreenAttributes']); |
|
31 | - add_action('admin_init', [$this, 'removeScreenAttributes']); |
|
30 | + add_action('admin_init', [ $this, 'addScreenAttributes' ]); |
|
31 | + add_action('admin_init', [ $this, 'removeScreenAttributes' ]); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -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 |