evilplan
Forum Replies Created
-
Just in case anyone is still reading this, it’s actually quite easy to do it. The function in Akismet is set up to apply a filter that contains the custom time period.
All you have to do is make the function.
Akismet has the line
$delete_interval = apply_filters( 'akismet_delete_comment_interval', 15 );– what that means is, it puts the results of a filter *if it exists*.So, you need to make the filter that it takes the number from 🙂
Go to your theme’s folder and find the file functions.php – that’s where you put all your custom functions, so even if Akismet gets updated, your new bit of code won’t get deleted.
At the end (before you see
?>if it’s there, otherwise just make sure it goes after the end of any previous bits of code), add something like this:add_filter( 'akismet_delete_comment_interval', 'custom_set_delete_interval' ); function custom_set_delete_interval() { return 2; }To walk you through it: It tells WordPress that a function named ‘custom_set_delete_interval’ will be run every time the filter ‘akismet_delete_comment_interval’ is applied. And Akismet *does* apply it right when you need it, as we saw above 🙂
Then we make the function itself. All we want it to do is ‘return’ (fancy word for ‘send back’) the number we want to replace ’15’ with. So, when the filter is applied, the new number is passed back to it.
Save the functions.php file and then check that it works – go to http://your-site.com/wp-admin/admin.php?page=akismet-key-config and scroll down to where you can set options. You’ll see it say “Note: Spam in the spam folder older than 2 days is deleted automatically. ” in the case I showed above.
Hope this helps 🙂
Forum: Fixing WordPress
In reply to: Upgrade to 3.4 "succeed", but actually it stuck to 3.3.2I had exactly the same problem – the issue was with a plugin, DB Cache Reloaded. I removed every trace of the plugin, upgraded, then installed the plugin again, and everything seems ok now
I really wanted this plugin to work, but I’ve never been able to get it working.
It always displays 4 posts even if I tell it to display 1. It always displays those posts next to each other, running well off the right-hand margin. The item title doesn’t wrap, making things even more wide.
I can’t get it to do anything it’s supposed to do, and I’ve tried it on different sites.
I would love it if you could fix the formatting and display bugs and develop the plug-in a bit further 🙂
I would also love some proper usage instructions – the WordPress installation instruction says I cause a short code or PHP function, but there’s no explanation of how to use them.