<?php

if (!defined('ABSPATH')) exit;

if (!function_exists('amJL_rename_option')){
    function amJL_rename_option($old_name, $new_name) {
        if (get_option($old_name) !== false) {
            $value = get_option($old_name);
            update_option($new_name, $value);
            delete_option($old_name);
        }
    }
    
}

if (!function_exists('amJL_rename_all_old_options')){
    function amJL_rename_all_old_options() {
        
        /* certification */
        amJL_rename_option('plugin', 'amJL_plugin');

    }
}

register_activation_hook(__FILE__, 'amJL_rename_all_old_options');
add_action('admin_init', 'amJL_rename_all_old_options');