File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -134,19 +134,24 @@ public function hooks() {
134
134
add_filter ( 'got_rewrite ' , '__return_true ' );
135
135
}
136
136
137
- add_filter (
138
- 'mod_rewrite_rules ' ,
139
- function ( $ content ) {
140
- add_action (
141
- 'shutdown ' ,
142
- function () {
143
- do_action ( 'newfold_update_htaccess ' );
144
- }
145
- );
146
-
147
- return $ content ;
148
- }
149
- );
137
+ if (
138
+ isset ( $ _REQUEST ['action ' ], $ _REQUEST ['plugin ' ] ) &&
139
+ 'activate ' === $ _REQUEST ['action ' ] &&
140
+ $ _REQUEST ['plugin ' ] === $ this ->container ->plugin ()->basename
141
+ ) {
142
+ add_filter (
143
+ 'mod_rewrite_rules ' ,
144
+ function ( $ content ) {
145
+ add_action (
146
+ 'shutdown ' ,
147
+ function () {
148
+ do_action ( 'newfold_update_htaccess ' );
149
+ }
150
+ );
151
+ return $ content ;
152
+ }
153
+ );
154
+ }
150
155
151
156
add_filter ( 'action_scheduler_retention_period ' , array ( $ this , 'nfd_asr_default ' ) );
152
157
add_filter ( 'action_scheduler_cleanup_batch_size ' , array ( $ this , 'nfd_as_cleanup_batch_size ' ) );
You can’t perform that action at this time.
0 commit comments