WordPress.org

Ready to get started?Download WordPress

Forums

Fail Plugin Activation if missing required components (8 posts)

  1. Milkdog7
    Member
    Posted 4 years ago #

    I'm creating a plugin, and I want the activation to fail if they don't meet some of the required server configurations. My plugin requires that the user have the CURL module installed and be using PHP5.

    Is there any way to do this?

  2. whooami
    Member
    Posted 4 years ago #

    of course there is.

    how to check is cURL is installed:

    if (function_exists('curl_open') ....

    you can google how to find the php version, its not THAT hard.

  3. Milkdog7
    Member
    Posted 4 years ago #

    Yes, I understand that, but I want the activation of my plugin to fail if they don't have those components.

  4. whooami
    Member
    Posted 4 years ago #

  5. Milkdog7
    Member
    Posted 4 years ago #

    Yes, I have read that and I do use it, but that only runs my activation function. In no way what-so-ever does it tell me how to STOP the activation from occurring if they do not meet the checks I would like to impose.

  6. Milkdog7
    Member
    Posted 4 years ago #

    I'm still looking for some help about this. I'm having some users that are getting mad at me because they install my plugin, but then get fail errors. Any help would be appreciated.

    Thanks!

  7. Peter Anselmo
    Member
    Posted 4 years ago #

    @Wild
    Did you ever find a solution to this? I've been looking, and haven't found a clean way to both display an error message, and keep the plugin from activating.

  8. camu
    Member
    Posted 4 years ago #

    Sob, me neither :(

Topic Closed

This topic has been closed to new replies.

About this Topic