Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
4 | function disable_plugin_deletion( $actions, $plugin_file, $plugin_data, $context ) { |
||
5 | |||
6 | // Remove delete link for important plugins |
||
7 | if ( |
||
8 | array_key_exists( 'delete', $actions ) && |
||
9 | in_array( |
||
10 | $plugin_file, |
||
11 | array( |
||
12 | 'jetpack/jetpack.php', |
||
13 | ) |
||
14 | ) |
||
15 | ) { |
||
16 | unset( $actions['delete']) ; |
||
17 | } |
||
18 | return $actions; |
||
19 | } |
||
20 |