Support » Plugin: Wordfence Security - Firewall & Malware Scan » Block IP address from php code

  • Resolved lexdubyna

    (@lexdubyna)


    Hello!
    Is there a way to block IP address from php code?
    I see there are wordfence::importSettings() and wordfence::whitelistIP() but is there something like wordfence::blockIP($IP) (or any other option) that can be used in code?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @lexdubyna, thanks for your query.

    The documentation on the Wordfence API functions that you mention is the extent of what can currently be called.

    Are you coding a custom condition outside of Wordfence’s current feature set that would cause an IP to be blocked? I am more than happy to submit a development request for your condition (or just the wordfence::blockIP() API function) you wish to use. As we have channels internally where requests are discussed, they’re all taken seriously with pros and cons weighed up for potentially scheduling into future updates.

    Thanks,

    Peter.

    Thread Starter lexdubyna

    (@lexdubyna)

    Hello @wfpeter
    Yes, that is exactly what I am trying to do – coding a custom condition outside of Wordfence’s current feature set that would cause an IP to be blocked
    I would be very grateful if you submit the development request for this functionality.
    Thank you!

    Plugin Support wfpeter

    (@wfpeter)

    Hi @lexdubyna,

    I have submitted that request for you, naturally I can’t promise any timescales or inclusion on here but please be aware that it will be discussed.

    Thanks again,

    Peter.

    This is an excellent feature we need now as well.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.