@@ -43,11 +43,13 @@ Feature: Activate WordPress plugins
4343 * Description: Hides the Site Secrets plugin on production sites
4444 * Author: WP-CLI tests
4545 */
46-
47- add_filter( 'all_plugins', function( $all_plugins ) {
48- unset( $all_plugins['site-secrets/site-secrets.php'] );
49- return $all_plugins;
50- } );
46+ add_filter(
47+ 'all_plugins',
48+ function ( $all_plugins ) {
49+ unset( $all_plugins['site-secrets/site-secrets.php'] );
50+ return $all_plugins;
51+ }
52+ );
5153 """
5254
5355 When I run `wp plugin activate --all`
@@ -70,12 +72,10 @@ Feature: Activate WordPress plugins
7072 """
7173 <?php
7274 // Plugin Name: Example Plugin
73-
7475 function example_plugin_activate( bool $network_wide = false ) {
75- // Doesn't matter what we do here, we just need a function definition to check the type
76- return;
76+ // Doesn't matter what we do here, we just need a function definition to check the type
77+ return;
7778 }
78-
7979 register_activation_hook( __FILE__, 'example_plugin_activate' );
8080 """
8181
@@ -164,7 +164,7 @@ Feature: Activate WordPress plugins
164164 * Description: This plugin generates unexpected output during activation
165165 * Author: WP-CLI tests
166166 */
167- echo " Unexpected output from plugin activation" ;
167+ echo ' Unexpected output from plugin activation' ;
168168 """
169169
170170 When I try `wp plugin activate output-plugin --debug`
@@ -187,10 +187,13 @@ Feature: Activate WordPress plugins
187187 * Description: Test plugin for force activation
188188 * Author: WP-CLI tests
189189 */
190-
191- register_activation_hook( __FILE__, function() {
192- @file_put_contents( WP_CONTENT_DIR . '/activation-test.txt', 'Activation hook was run' );
193- });
190+
191+ register_activation_hook(
192+ __FILE__,
193+ function () {
194+ @file_put_contents( WP_CONTENT_DIR . '/activation-test.txt', 'Activation hook was run' );
195+ }
196+ );
194197 """
195198
196199 When I run `wp plugin activate force-test`
0 commit comments