Skip to content

Commit b8ec21b

Browse files
committed
Resolve merge conflicts and format plugin features
1 parent a0a1db0 commit b8ec21b

3 files changed

Lines changed: 31 additions & 24 deletions

File tree

‎features/plugin-activate.feature‎

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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`

‎features/plugin-deactivate.feature‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ Feature: Deactivate WordPress plugins
4646
* Description: Hides Akismet plugin, which is already active
4747
* Author: WP-CLI tests
4848
*/
49-
50-
add_filter( 'all_plugins', function( $all_plugins ) {
51-
unset( $all_plugins['akismet/akismet.php'] );
52-
return $all_plugins;
53-
} );
49+
add_filter(
50+
'all_plugins',
51+
function ( $all_plugins ) {
52+
unset( $all_plugins['akismet/akismet.php'] );
53+
return $all_plugins;
54+
}
55+
);
5456
"""
5557

5658
When I run `wp plugin deactivate --all`

‎features/plugin.feature‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -699,11 +699,13 @@ Feature: Manage WordPress plugins
699699
* Description: Hides the Site Secrets plugin on production sites
700700
* Author: WP-CLI tests
701701
*/
702-
703-
add_filter( 'all_plugins', function( $all_plugins ) {
704-
unset( $all_plugins['site-secrets/site-secrets.php'] );
705-
return $all_plugins;
706-
} );
702+
add_filter(
703+
'all_plugins',
704+
function ( $all_plugins ) {
705+
unset( $all_plugins['site-secrets/site-secrets.php'] );
706+
return $all_plugins;
707+
}
708+
);
707709
"""
708710

709711
When I run `wp plugin list --fields=name`

0 commit comments

Comments
 (0)