Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to verify if a plugin is installed ?
#1
Hi all !

i'm working on a template, and I wish to verify if a plugin is installed to activate or not a template option.

For example, if the plugin "I18N_Search" is installed then the search module can be activate, otherwise, it's indicated that the plugin "I18N_Search" must be installed to activate this option.

Is it possible ? If yes, can you tell me the way to follow ?

I know, I have really weird questions ^^

Thanks for your help Wink
Reply
#2
didou038 Wrote:Hi all !

i'm working on a template, and I wish to verify if a plugin is installed to activate or not a template option.

For example, if the plugin "I18N_Search" is installed then the search module can be activate, otherwise, it's indicated that the plugin "I18N_Search" must be installed to activate this option.

Is it possible ? If yes, can you tell me the way to follow ?

I know, I have really weird questions ^^

Thanks for your help Wink

The easiest way is to check for the existance of a function of that plugin, e.g.
Code:
if (function_exists('get_i18n_search_results')) {
  // do something that needs I18N Search
}
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#3
PERFECT !!!

Thank you mvlcek ! Exactly my need !!!
Reply




Users browsing this thread: 1 Guest(s)