Integrations

WordPress

WordPress plugin for form protection

ByeBot WordPress plugin for protecting login, registration, and comment forms.

Full Example

A complete working example is available on GitHub: Byebot-Integrations/Wordpress

Installation#

  1. Copy the plugin folder to wp-content/plugins/byebot
  2. Activate the plugin in Plugins > Installed Plugins
  3. Go to Settings > ByeBot
  4. Enter your credentials and enable protection

Configuration#

Navigate to Settings > ByeBot to configure:

SettingDescription
Base URLYour ByeBot server URL
API KeySecret key for server-side validation
Site KeyPublic key for the widget

Built-in Protection#

Enable protection for WordPress forms with checkboxes:

  • Login Form - Protects /wp-login.php
  • Registration Form - Protects user registration
  • Comment Form - Protects blog comments (logged-in moderators are skipped)

Custom Forms#

Shortcode

Add the CAPTCHA to any page or post:

[byebot]

PHP Function

Add the CAPTCHA in your theme or plugin:

<?php byebot_render(); ?>

Manual Validation

For custom form handlers:

<?php
$token = $_POST['byebot-token'] ?? '';
$result = Byebot_Validator::validate($token);
 
if ($result['valid']) {
    // Process the form
} else {
    // Show error
    echo $result['message'];
}

Hooks#

Filter: Modify Validation Result

add_filter('byebot_validation_result', function($result, $token) {
    // Custom logic
    return $result;
}, 10, 2);

Action: After Successful Validation

add_action('byebot_validated', function($token) {
    // Log successful validation
});

Troubleshooting#

Widget Not Showing

  1. Check that the plugin is activated
  2. Verify your Site Key is correct in Settings
  3. Check browser console for JavaScript errors

Validation Always Fails

  1. Verify your API Key is correct
  2. Check that your server can reach the ByeBot server
  3. Ensure your domain is registered in the ByeBot Dashboard

Built with precision. Designed for developers.