Skip to content

Commit fa43c13

Browse files
authored
gp-hide-perks-from-plugins-page.php: Migrated.
1 parent a1c7410 commit fa43c13

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed
Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
<?php
22
/**
3-
* Gravity Perks // Hide Perks from Plugins Page
4-
* https://gravitywiz.com/documentation/
3+
* We're no longer using the experimental folder for experimental snippets. 🚧
4+
* You can now find the snippet here:
5+
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gp-hide-perks-from-plugins-page.php
56
*/
6-
add_filter( 'all_plugins', function( $plugins ) {
7-
8-
if ( ! is_callable( 'get_current_screen' ) || get_current_screen()->id !== 'plugins' ) {
9-
return $plugins;
10-
}
11-
12-
$filtered_plugins = array();
13-
14-
foreach ( $plugins as $slug => $plugin ) {
15-
if ( ! wp_validate_boolean( rgar( $plugin, 'Perk' ) ) ) {
16-
$filtered_plugins[ $slug ] = $plugin;
17-
}
18-
}
19-
20-
return $filtered_plugins;
21-
} );

0 commit comments

Comments
 (0)