We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
gp-hide-perks-from-plugins-page.php
experimental
1 parent a1c7410 commit a4ef12dCopy full SHA for a4ef12d
gravity-forms/gp-hide-perks-from-plugins-page.php
@@ -0,0 +1,23 @@
1
+<?php
2
+/**
3
+ * Gravity Perks // Hide Perks from Plugins Page
4
+ * https://gravitywiz.com/documentation/
5
+ *
6
+ * Experimental Snippet 🧪
7
+ */
8
+add_filter( 'all_plugins', function( $plugins ) {
9
+
10
+ if ( ! is_callable( 'get_current_screen' ) || get_current_screen()->id !== 'plugins' ) {
11
+ return $plugins;
12
+ }
13
14
+ $filtered_plugins = array();
15
16
+ foreach ( $plugins as $slug => $plugin ) {
17
+ if ( ! wp_validate_boolean( rgar( $plugin, 'Perk' ) ) ) {
18
+ $filtered_plugins[ $slug ] = $plugin;
19
20
21
22
+ return $filtered_plugins;
23
+} );
0 commit comments