@@ -22,25 +22,27 @@ class TypeRocketUIPlugin
2222
2323 public function __construct ()
2424 {
25- if (defined ('TYPEROCKET_PLUGIN_INSTALL ' ) || defined ('TYPEROCKET_PATH ' )) {
26- add_filter ('plugin_action_links ' ,function ($ actions , $ plugin_file ) {
27- if ( $ found = strpos (__FILE__ , $ plugin_file ) ) {
28- $ actions ['settings ' ] = '<span style="color: red">Inactive Install</span> ' ;
29- }
25+ add_action ('plugins_loaded ' , function () {
26+ if (defined ('TYPEROCKET_PLUGIN_INSTALL ' ) || defined ('TYPEROCKET_PATH ' )) {
27+ add_filter ('plugin_action_links ' ,function ($ actions , $ plugin_file ) {
28+ if ( $ found = strpos (__FILE__ , $ plugin_file ) ) {
29+ $ actions ['settings ' ] = '<span style="color: red">Inactive Install</span> ' ;
30+ }
3031
31- return $ actions ;
32- }, 10 , 2 );
32+ return $ actions ;
33+ }, 10 , 2 );
3334
34- return ;
35- }
35+ return ;
36+ }
3637
37- $ this ->loadConfig ();
38- require 'typerocket/init.php ' ;
38+ $ this ->loadConfig ();
39+ require 'typerocket/init.php ' ;
3940
40- $ this ->path = plugin_dir_path (__FILE__ );
41- define ('TYPEROCKET_AUTO_LOADER ' , '__return_false ' );
42- add_filter ('plugin_action_links ' , [$ this , 'links ' ], 10 , 2 );
43- add_filter ('typerocket_auth_policy_check ' , '__return_false ' , 10 , 2 );
41+ $ this ->path = plugin_dir_path (__FILE__ );
42+ define ('TYPEROCKET_AUTO_LOADER ' , '__return_false ' );
43+ add_filter ('plugin_action_links ' , [$ this , 'links ' ], 10 , 2 );
44+ add_filter ('typerocket_auth_policy_check ' , '__return_false ' , 10 , 2 );
45+ }, 20 );
4446 }
4547
4648 public function links ($ actions , $ plugin_file ) {
0 commit comments