Huge wp_options table

I’d be interested to validate what you’re looking at there to make sure it really is that table. MySQL shouldn’t behave like this unless you actually have 12Gb in a row somewhere. But if you can run SQL on this database, maybe you want to try MySQL OPTIMIZE TABLE command which asks MySQL to see … Read more

Custom Taxonomies Incorrectly Counting Revisions?

Hi @berkleebassist: It’s hard to verify your issue without admin access to your site and your database but I can give you some direction that might help. There are two functions in /wp-includes/taxonomy.php that update taxonomy term count: wp_update_term_count_now() and _update_post_term_count(). They are located (in WordPress v3.0.1) at line 2454 and line 2049, respectively. Both … Read more

Hello dolly type plugin that allows people to add their own

Don’t use settings api for this. Register a custom post type, ‘Joke’ see register_post_type docs add_action( ‘init’, function () { $labels = array( ‘name’ => ‘Jokes’, ‘singular_name’ => ‘Joke’, ‘add_new’ => ‘Add New’, ‘add_new_item’ => ‘Add New Joke’, ‘new_item’ => ‘New Joke’, ‘edit_item’ => ‘Edit Joke’, ‘view_item’ => ‘View Joke’, ‘all_items’ => ‘All Jokea’, ‘search_items’ … Read more

How to intercept update_option() before it saves data?

You might be better off using the update_option_ action instead. This will allow you to write to your file after the option has been updated (as apposed to before). If another plugin hooks into pre_update_option_ and alters the value after your plugin has saved it then you will have saved an incorrect value. I would … Read more