TGMPA / TGM-Plugin-Activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install, update and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference bundled plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.
http://tgmpluginactivation.com/
GNU General Public License v2.0
1.76k stars 430 forks source link

Is there any if conditional statement for if all plugins where activated? #613

Closed Ansif closed 8 years ago

Ansif commented 8 years ago

Hi,

I need if condition for, if all plugins where activated. I've added my own sub menu of Install Plugins. But, if all plugins are installed and activated this will root to WordPress error page like : You do not have sufficient permissions to access this page.

So, please anyone let me know the if condition for it. So, i'll disable my sub menu once all plugins are activated.

Also, please share if you've more than that conditions. Like : All Plugins Installed, No Plugins Installed and All plugins are in de-activate mode - like so...

Thanks! :)

jrfnl commented 8 years ago

Closing as duplicate of #484 #385 and #550.

TGM_Plugin_Activation::get_instance()->is_tgmpa_complete()

Ansif commented 8 years ago

Hi,

I've checked that issues list already! Still not get right path.

Here is my sub-menu :

// Sub Menu Array
  $my_sub_menu = array(
    __('Welcome', 'text_domain') => 'my_page',
    __('Install Demos', 'text_domain') => 'install_demos',
    __('Install Plugins', 'text_domain') => 'install_plugins',
    __('Theme Options', 'text_domain') => 'theme_options'
  );

I just want to hide Install Plugins menu from it. How can i call it?

jrfnl commented 8 years ago

I gave you the answer already and there are code examples available in the linked issues. If you'd read those you should have been able to answer your own question.