File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 33Plugin Name: Disable Empty Trash
44Plugin URI: https://www.littlebizzy.com/plugins/disable-empty-trash
55Description: Stops WordPress emptying trash
6- Version: 2.0.1
6+ Version: 2.0.2
7+ Requires PHP: 7.0
78Author: LittleBizzy
89Author URI: https://www.littlebizzy.com
910License: GPL3
1011License URI: https://www.gnu.org/licenses/gpl-3.0.html
1112GitHub Plugin URI: littlebizzy/disable-empty-trash
1213Primary Branch: master
13- Prefix: DETTRS
1414*/
1515
16- // Disable WordPress.org updates for this plugin
17- add_filter ('gu_override_dot_org ' , function ($ overrides ) {
16+ // prevent direct access
17+ if ( ! defined ( 'ABSPATH ' ) ) {
18+ exit ;
19+ }
20+
21+ // disable wordpress.org updates for this plugin
22+ add_filter ( 'gu_override_dot_org ' , function ( $ overrides ) {
1823 $ overrides [] = 'disable-empty-trash/disable-empty-trash.php ' ;
1924 return $ overrides ;
20- });
25+ }, 999 );
2126
22- /**
23- * Disable automatic trash emptying.
24- */
27+ // disable automatic trash emptying
2528function disable_empty_trash () {
2629 // Remove the scheduled action for emptying trash
2730 remove_action ('wp_scheduled_delete ' , 'wp_scheduled_delete ' );
You can’t perform that action at this time.
0 commit comments