Thanks, Rene, we will consider it and let you know how can we go through.
A problem, the plugin is actively installed on 60K+ sites. I think you are a database expert. So, can you suggest us a way to make it?
Thanks
Best approach would be to create a small update routine. I notice there are only a few table rows which need to be updated so it should not be much of work:
At first I would create a var which stores the current version. (You can use that one for future version specific things as well)
add_option('acl_version', '2.5.9');
Then use that version number to determine if the database should be updated when someone updates the plugin. This makes sure that the update routine is not running all the time:
function acl_update(){
if (false === get_option('acl_version') ||
version_compare( get_option('acl_version'), '2.5.9', '<' ) ){
acl_update_data();
}
}
add_action('admin_init', 'acl_update');
// Updates the database
function acl_update_data(){
$data1 = unserialize(get_option('Admin_custome_login_Slidshow'));
update_option('Admin_custome_login_Slidshow_new', $data1);
$data2 = unserialize(get_option('Admin_custome_login_Social'));
update_option('Admin_custome_login_Social_new', $data2);
$data3 = unserialize(get_option('Admin_custome_login_logo'));
update_option('Admin_custome_login_logo_new', $data3);
// and so on
}
As you can see I store the data as a new row so in case something goes wrong the original data row is not gone and can be restored easily.
One heavy duty job then would be to remove all serialize() and unserialize() functions from your code. This seems to be much of initial work but in the end your code gets much easier to maintain and develope. So in the end you will save a lot of time in the future.
Let me know if you have further questions.
Cheers
Thanks, Rene.
Perfect solution and that make sense, we will do it ASAP. And make the plugin compatible with WP Staging.
Great Day!!!