File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change 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- } );
You can’t perform that action at this time.
0 commit comments