File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -814,7 +814,7 @@ function str_starts_with($haystack, $needle) {
814
814
case 'yes ' :
815
815
if ( file_exists ( "/usr/local/hestia/plugins/ $ plugin.disabled " ) ) {
816
816
rename ( "/usr/local/hestia/plugins/ $ plugin.disabled " , "/usr/local/hestia/plugins/ $ plugin " );
817
- $ hcpp ->do_action ( 'hcpp_plugin_enabled ' , $ plugin );
817
+ $ hcpp ->run ( 'invoke-plugin hcpp_plugin_enabled ' . escapeshellarg ( $ plugin ) );
818
818
}
819
819
$ hcpp ->run_install_scripts ();
820
820
break ;
@@ -848,6 +848,16 @@ function str_starts_with($haystack, $needle) {
848
848
return $ args ;
849
849
});
850
850
851
+ // Invoke plugin enabled after plugin is renamed and loaded
852
+ $ hcpp ->add_action( 'hcpp_invoke_plugin ' , function ( $ args ) ) {
853
+ if ( $ args [0 ] == 'hcpp_plugin_enabled ' ) {
854
+ $ plugin = $ args [1 ];
855
+ global $ hcpp ;
856
+ $ hcpp ->do_action ( 'hcpp_plugin_enabled ' , $ plugin );
857
+ }
858
+ return $ args ;
859
+ }
860
+
851
861
// List plugins in HestiaCP's Configure Server UI
852
862
$ hcpp ->add_action ( 'hcpp_render_page ' , function ( $ args ) {
853
863
global $ hcpp ;
You can’t perform that action at this time.
0 commit comments