@@ -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 |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | } elseif (isset($updatePostId)) { |
38 | 38 | $postId = absint($updatePostId); |
39 | 39 | } else { |
40 | - add_action('add_meta_boxes', [$this, 'addMetaBox']); |
|
40 | + add_action('add_meta_boxes', [ $this, 'addMetaBox' ]); |
|
41 | 41 | } |
42 | 42 | if (false === isset($postId) || $this->name === get_post_meta($postId, '_wp_page_template', true)) { |
43 | - add_action('admin_init', [$this, 'addScreenAttributes']); |
|
44 | - add_action('admin_init', [$this, 'removeScreenAttributes']); |
|
43 | + add_action('admin_init', [ $this, 'addScreenAttributes' ]); |
|
44 | + add_action('admin_init', [ $this, 'removeScreenAttributes' ]); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | add_meta_box( |
85 | 85 | 'lin3s-id-default-meta-box', |
86 | 86 | 'LIN3S INFO', |
87 | - [$this, 'metaBox'], |
|
87 | + [ $this, 'metaBox' ], |
|
88 | 88 | 'page' |
89 | 89 | ); |
90 | 90 | } |
@@ -99,6 +99,6 @@ |
||
99 | 99 | <h1 style="text-align: center;"> |
100 | 100 | PLEASE ADD <strong>PAGE TITLE</strong> AND SELECT A TEMPLATE IN THE <strong>TEMPLATE SELECTOR</strong> |
101 | 101 | </h1> |
102 | -EOF; |
|
102 | +eof; |
|
103 | 103 | } |
104 | 104 | } |
@@ -22,9 +22,9 @@ |
||
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 | ); |
@@ -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; |
@@ -26,6 +26,6 @@ |
||
26 | 26 | { |
27 | 27 | $this->rewriteRules(); |
28 | 28 | $this->rewriteTags(); |
29 | - add_action('template_include', [$this, 'templateInclude']); |
|
29 | + add_action('template_include', [ $this, 'templateInclude' ]); |
|
30 | 30 | } |
31 | 31 | } |
@@ -25,10 +25,10 @@ |
||
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(); |
@@ -27,14 +27,14 @@ |
||
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 |