@@ -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 |
@@ -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 |
@@ -9,7 +9,7 @@ |
||
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 |
@@ -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 | use LIN3S\WPFoundation\Translations; |
15 | 15 | use Twig\Environment; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | { |
23 | 23 | public function __construct() |
24 | 24 | { |
25 | - add_action('twig_apply_filters', function (Environment $twig) { |
|
25 | + add_action('twig_apply_filters', function(Environment $twig) { |
|
26 | 26 | $twig->addFunction( |
27 | - new TwigFunction('trans', function ($key) { |
|
27 | + new TwigFunction('trans', function($key) { |
|
28 | 28 | return Translations::trans($key); |
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\PostTypes; |
15 | 15 | |
@@ -27,14 +27,14 @@ discard block |
||
27 | 27 | |
28 | 28 | public function __construct() |
29 | 29 | { |
30 | - add_action('init', function () { |
|
30 | + add_action('init', function() { |
|
31 | 31 | register_taxonomy( |
32 | - [$this, 'name'], |
|
33 | - [$this, 'associatedPostType'], |
|
34 | - [$this, 'options'] |
|
32 | + [ $this, 'name' ], |
|
33 | + [ $this, 'associatedPostType' ], |
|
34 | + [ $this, 'options' ] |
|
35 | 35 | ); |
36 | 36 | }); |
37 | - add_filter('term_link', [$this, 'permalink'], 1, 2); |
|
37 | + add_filter('term_link', [ $this, 'permalink' ], 1, 2); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public function permalink(string $url, string $term) : 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\PostTypes; |
15 | 15 | |
@@ -25,10 +25,10 @@ discard block |
||
25 | 25 | public function __construct() |
26 | 26 | { |
27 | 27 | parent::__construct(); |
28 | - add_action('init', function () { |
|
28 | + add_action('init', function() { |
|
29 | 29 | register_post_type( |
30 | - [$this, 'name'], |
|
31 | - [$this, 'options'] |
|
30 | + [ $this, 'name' ], |
|
31 | + [ $this, 'options' ] |
|
32 | 32 | ); |
33 | 33 | }); |
34 | 34 | $this->registerTaxonomy(); |
@@ -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\PostTypes; |
15 | 15 | |
@@ -28,6 +28,6 @@ discard block |
||
28 | 28 | { |
29 | 29 | $this->rewriteRules(); |
30 | 30 | $this->rewriteTags(); |
31 | - add_action('template_include', [$this, 'templateInclude']); |
|
31 | + add_action('template_include', [ $this, 'templateInclude' ]); |
|
32 | 32 | } |
33 | 33 | } |
@@ -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\PostTypes; |
15 | 15 | |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | |
24 | 24 | public function __construct() |
25 | 25 | { |
26 | - add_action('init', [$this, 'registerFields'], 20); |
|
27 | - add_action('init', [$this, 'rewriteRules'], 20); |
|
28 | - add_filter('post_type_link', [$this, 'permalink'], 1, 2); |
|
26 | + add_action('init', [ $this, 'registerFields' ], 20); |
|
27 | + add_action('init', [ $this, 'rewriteRules' ], 20); |
|
28 | + add_filter('post_type_link', [ $this, 'permalink' ], 1, 2); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | public function registerFields() : void |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | { |
46 | 46 | if (is_array($postTypes)) { |
47 | 47 | foreach ($postTypes as $key => $postType) { |
48 | - $postTypes[$key] = static::singleSerialize($postType); |
|
48 | + $postTypes[ $key ] = static::singleSerialize($postType); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return $postTypes; |