Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | function disable_plugin_deletion( $actions, $plugin_file, $plugin_data, $context ) { |
||
22 | |||
23 | // Remove delete link for important plugins |
||
24 | if ( |
||
25 | array_key_exists( 'delete', $actions ) && |
||
26 | in_array( |
||
27 | $plugin_file, |
||
28 | array( |
||
29 | 'jetpack/jetpack.php', |
||
30 | ) |
||
31 | ) |
||
32 | ) { |
||
33 | unset( $actions['delete'] ); |
||
34 | } |
||
35 | return $actions; |
||
36 | } |
||
37 |