@@ -7,9 +7,12 @@ Feature: Update core's database
77 And a disable_sidebar_check.php file:
88 """
99 <?php
10- WP_CLI::add_wp_hook( 'init', static function () {
11- remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
12- } );
10+ WP_CLI::add_wp_hook(
11+ 'init',
12+ static function () {
13+ remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
14+ }
15+ );
1316 """
1417 And I try `wp theme install twentytwenty --activate`
1518 And I run `wp core download --version=5.4 --force`
@@ -34,9 +37,12 @@ Feature: Update core's database
3437 And a disable_sidebar_check.php file:
3538 """
3639 <?php
37- WP_CLI::add_wp_hook( 'init', static function () {
38- remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
39- } );
40+ WP_CLI::add_wp_hook(
41+ 'init',
42+ static function () {
43+ remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
44+ }
45+ );
4046 """
4147 And I try `wp theme install twentytwenty --activate`
4248 And I run `wp core download --version=5.4 --force`
@@ -62,9 +68,12 @@ Feature: Update core's database
6268 And a disable_sidebar_check.php file:
6369 """
6470 <?php
65- WP_CLI::add_wp_hook( 'init', static function () {
66- remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
67- } );
71+ WP_CLI::add_wp_hook(
72+ 'init',
73+ static function () {
74+ remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
75+ }
76+ );
6877 """
6978 And I try `wp theme install twentytwenty --activate`
7079 And I run `wp core download --version=5.4 --force`
@@ -104,9 +113,12 @@ Feature: Update core's database
104113 And a disable_sidebar_check.php file:
105114 """
106115 <?php
107- WP_CLI::add_wp_hook( 'init', static function () {
108- remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
109- } );
116+ WP_CLI::add_wp_hook(
117+ 'init',
118+ static function () {
119+ remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
120+ }
121+ );
110122 """
111123 And I try `wp theme install twentytwenty --activate`
112124 And I run `wp core download --version=5.4 --force`
@@ -158,9 +170,12 @@ Feature: Update core's database
158170 And a disable_sidebar_check.php file:
159171 """
160172 <?php
161- WP_CLI::add_wp_hook( 'init', static function () {
162- remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
163- } );
173+ WP_CLI::add_wp_hook(
174+ 'init',
175+ static function () {
176+ remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
177+ }
178+ );
164179 """
165180 And I try `wp theme install twentytwenty --activate`
166181 And I run `wp core download --version=5.4 --force`
@@ -204,9 +219,12 @@ Feature: Update core's database
204219 And a before.php file:
205220 """
206221 <?php
207- WP_CLI::add_hook( 'before_invoke:core update-db', function(){
208- WP_CLI::log( 'WP_INSTALLING: ' . var_export( WP_INSTALLING, true ) );
209- });
222+ WP_CLI::add_hook(
223+ 'before_invoke:core update-db',
224+ function () {
225+ WP_CLI::log( 'WP_INSTALLING: ' . var_export( WP_INSTALLING, true ) );
226+ }
227+ );
210228 """
211229
212230 When I run `wp --require=before.php core update-db`
0 commit comments