예제 #1
0
/**
 * Install plugin
 *
 * Adds configuration options
 * Creates table in Wordpress database
 */
function gdocs_install()
{
    // login credentials
    add_option('gdocs_user');
    add_option('gdocs_pwd');
    // proxy config
    add_option('gdocs_proxy_host');
    add_option('gdocs_proxy_port');
    add_option('gdocs_proxy_user');
    add_option('gdocs_proxy_pwd');
    // cache config
    add_option('gdocs_cache_expiry', 0);
    // stylesheets config
    add_option('gdocs_style_dir');
    // create table in DB to store shortcode tags
    try {
        GDB::drop();
        GDB::create();
    } catch (GDB_Exception $e) {
        gdocs_error($e);
    }
}