Fix/Remove Rate Post Limit
I was encountering a bug and for some reason, the 5 post per 5 minute rate limit was being triggered and I couldn't figure out how to fix it so I removed it. No matter what I tried, nothing worked (updating plugin, login/logout, cache, private browser, etc)
I had to reverse enginer \fluent-community.1.7.1\fluent-community\app\Hooks\Handlers\RateLimitHandler.php for fix.
// Remove post and comment rate limits by setting extremely high limits
add_filter('fluent_community/rate_limit/posts_per_5_minutes', function($limit) {
return PHP_INT_MAX; // Effectively disables post limit
});
add_filter('fluent_community/rate_limit/comments_per_minute', function($limit) {
return PHP_INT_MAX; // Effectively disables comment limit
});
Here is alternative to make it 20 per 5
<?php
// Place this in your theme's functions.php or in a custom plugin
add_filter('fluent_community/rate_limit/posts_per_5_minutes', function($limit) {
return 20; // Increase post limit to 20 per 5 minutes
});
add_filter('fluent_community/rate_limit/comments_per_minute', function($limit) {
return 10; // Optional: increase comment limit to 10 per minute
});
This is a very wrong way to do it, When you update the plugin it will be over write. Here is the correct way if you want to change via filter hook:
add_filter('fluent_community/rate_limit/posts_per_5_minutes', function($limit) {
return 9999999;
}, 9999);
add_filter('fluent_community/rate_limit/comments_per_minute', function($limit) {
return 9999999;
}, 9999);
