Esempio n. 1
0
function wt_register()
{
    global $_wt_options;
    wp_register_style('wt-admin', WT_PLUGIN_URL . '/css/admin/admin-css.php');
    wp_register_script('wt-admin', WT_PLUGIN_URL . '/js/admin-js.php');
    wp_register_script('wt-website', WT_PLUGIN_URL . '/js/website-js.php');
    wp_register_style('wt-css', wt_get_default_theme_url() . '/css/theme.css');
    //wp_register_style('extjs',WT_PLUGIN_URL.'/js/extjs/resources/css/ext-all.css');
    wp_register_style('wt-jqueryui-css', WT_PLUGIN_URL . '/js/jquery-ui-1.8rc3/css/smoothness/jquery-ui-1.8.custom.css');
    $google_map_key = $_wt_options->options("google_map_key");
    if ($google_map_key) {
        wp_register_script('wt-google-maps', 'http://maps.google.com/maps?file=api&v=2&sensor=true&key=' . $google_map_key, '>');
    }
}
Esempio n. 2
0
function wt_load_script($file = null, $theme = null)
{
    global $_wt_options;
    if (!$file) {
        return "";
    }
    $url = wt_get_default_theme_url() . "/js/";
    $src = $url . $file . ".js";
    return "<script src='{$src}'></script>";
}