@@ -352,16 +352,19 @@ public function admin_menu() {
352352 foreach ( $ this ->plugins as $ plugin ) {
353353 if ( ! is_plugin_active ( $ plugin ['file_path ' ] ) ) {
354354
355- $ args = apply_filters ('tgmpa_admin_menu_args ' , array (
356- 'parent_slug ' => 'themes.php ' , // Parent Menu slug.
357- 'page_title ' => $ this ->strings ['page_title ' ], // Page title.
358- 'menu_title ' => $ this ->strings ['menu_title ' ], // Menu title.
359- 'capability ' => 'edit_theme_options ' , // Capability.
360- 'menu_slug ' => $ this ->menu , // Menu slug.
361- 'function ' => array ( $ this , 'install_plugins_page ' ) // Callback.
362- ));
363-
364- if (apply_filters ( 'tgmpa_admin_menu_use_add_theme_page ' , true )) {
355+ $ args = apply_filters (
356+ 'tgmpa_admin_menu_args ' ,
357+ array (
358+ 'parent_slug ' => 'themes.php ' , // Parent Menu slug.
359+ 'page_title ' => $ this ->strings ['page_title ' ], // Page title.
360+ 'menu_title ' => $ this ->strings ['menu_title ' ], // Menu title.
361+ 'capability ' => 'edit_theme_options ' , // Capability.
362+ 'menu_slug ' => $ this ->menu , // Menu slug.
363+ 'function ' => array ( $ this , 'install_plugins_page ' ) // Callback.
364+ )
365+ );
366+
367+ if ( apply_filters ( 'tgmpa_admin_menu_use_add_theme_page ' , true ) ) {
365368 add_theme_page ($ args ['page_title ' ], $ args ['menu_title ' ], $ args ['capability ' ], $ args ['menu_slug ' ], $ args ['function ' ]);
366369 } else {
367370 add_submenu_page ( $ args ['parent_slug ' ], $ args ['page_title ' ], $ args ['menu_title ' ], $ args ['capability ' ], $ args ['menu_slug ' ], $ args ['function ' ]);
@@ -625,7 +628,7 @@ public function notices() {
625628
626629 foreach ( $ this ->plugins as $ plugin ) {
627630 // If the plugin is installed and active, check for minimum version argument before moving forward.
628- if ( is_plugin_active ( $ plugin ['file_path ' ] ) ) {
631+ if ( is_plugin_active ( $ plugin ['file_path ' ] ) || ( isset ( $ plugin [ ' is_callable ' ] ) && is_callable ( $ plugin [ ' is_callable ' ] ) ) ) {
629632 // A minimum version has been specified.
630633 if ( isset ( $ plugin ['version ' ] ) ) {
631634 if ( isset ( $ installed_plugins [$ plugin ['file_path ' ]]['Version ' ] ) ) {
@@ -757,7 +760,7 @@ public function notices() {
757760
758761 $ action_links = array_filter ( $ action_links ); // Remove any empty array items.
759762 if ( $ action_links ) {
760- $ rendered .= apply_filters ('tgmpa_notice_rendered_action_links ' , '<p> ' . implode ( ' | ' , $ action_links ) . '</p> ' );
763+ $ rendered .= apply_filters ( 'tgmpa_notice_rendered_action_links ' , '<p> ' . implode ( ' | ' , $ action_links ) . '</p> ' );
761764 }
762765
763766 // Register the nag messages and prepare them to be processed.
@@ -1142,7 +1145,7 @@ protected function _gather_plugin_data() {
11421145 $ installed_plugins = get_plugins ();
11431146
11441147 foreach ( TGM_Plugin_Activation::$ instance ->plugins as $ plugin ) {
1145- if ( is_plugin_active ( $ plugin ['file_path ' ] ) ) {
1148+ if ( is_plugin_active ( $ plugin ['file_path ' ] ) || ( isset ( $ plugin [ ' is_callable ' ] ) && is_callable ( $ plugin [ ' is_callable ' ] ) ) ) {
11461149 continue ; // No need to display plugins if they are installed and activated.
11471150 }
11481151
0 commit comments