Limit Login Attempts
[resolved] Whitelist unclear to me (4 posts)

  1. Magistar
    Posted 1 year ago #

    Is there someone willing to explain the whitelist functionality listed in the faq?

    function my_ip_whitelist($allow, $ip) { return ($ip == 'my-ip') ? true : $allow; } add_filter('limit_login_whitelist_ip', 'my_ip_whitelist', 10, 2);

    I have no clue what the 10 and 2 flags are for. I assume I should replace "my_ip_whitelist" with my ip?

    Thanks in advance!


  2. Benny
    Posted 1 year ago #

    Hi Magistar,

    No, leave 'my_ip_whitelist' as is.
    But you do need to replace 'my-ip' with your actual IP (keep the single quotes though).

    The code behind this filter will check if the visiting IP is yours. If that's the case, it will skip monitoring failed login attempts for that session.

    The 10 indicates the priority for running this filter and the 2 tells how many arguments are accepted by the my_ip_whitelist function.
    See: http://codex.wordpress.org/Function_Reference/add_filter

    - Benny

  3. Magistar
    Posted 1 year ago #

    Ok that was really helpfull. Thanks Benny.

  4. DavidFB
    Posted 1 year ago #

    Just a note that there is also a plugin Whitelist for LLA, that allows you to easily add IP's for admins.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Limit Login Attempts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.