私はワードプレスのテーマを持っていますが、この単一のインストールを 2 つのドメインに使用しています。両方のドメインが同じインストールを指しています。
ここで、アドレス バーのドメイン名に基づいて jQuery を使用して、WP サイトの配色を変更したいと考えています。
WP ダッシュボードで、テーマの色を変更できるようになりました。テーマの色を選択できるこのインターフェイスは、rt_styling_options.php ファイル内の次のコードで定義されています。
    array(
        "name"      => __("Theme Style",'rt_theme_admin'),
        "desc"      => __("Please choose a style for your theme.",'rt_theme_admin'),
        "id"        => THEMESLUG."_17_style",
        "options"   =>  array(
                        "blue"     => "Blue Style",
                        "purple"   => "Purple Style", 
                        "orange"   => "Orange Style",                       
                        "brown"   => "Brown Style",                                                 
                        "rose"   => "Rose Style",       
                        "green"   => "Green Style",     
                        "grey"   => "Grey Style",       
                        "gold"   => "Gold Style",                               
                        ),
        "default"   => "blue", 
        "type"      => "select"),  
これは、この色を選択できる WP ダッシュボードのスクリーンショットです。

質問:
アドレスバーのドメイン名に基づいてその色の値を変更するにはどうすればよいですか?
次のようになります。
var pathname = window.location.pathname;
if (pathname == 'domain2.com'){
    change the value of the theme color   
}
追加情報 (重要):
上記の色の値が呼び出される php ファイル (theme.php) と関連する関数を次に示します ( if(get_option(THEMESLUG."_17_style")){ を参照)。
function load_styles(){
        wp_register_style('theme-reset', THEMEURI . '/css/rt-css-framework.css', 1 , false, 'all');
        wp_register_style('theme-style-all',THEMEURI . '/css/style.css', 2 , false, 'all');
        if(get_option(THEMESLUG."_17_style")){          
            wp_register_style('theme-skin',THEMEURI . '/css/'.get_option( THEMESLUG."_17_style").'-style.css', 3 , false, 'all'); //dark skin               
        }
        wp_register_style('prettyPhoto',THEMEURI . '/css/prettyPhoto.css', 5 , false, 'screen');
        if(get_option(THEMESLUG."_font_face")){
            wp_register_style('rtfontface',THEMEURI . '/css/fontface.css', 100 , false, 'all');
        }       
        wp_enqueue_style('theme-reset');
        wp_enqueue_style('theme-style-all');  
        wp_enqueue_style('rtfontface'); 
        wp_enqueue_style('prettyPhoto');         
        wp_enqueue_style('jquery-colortip', THEMEURI . '/css/colortip-1.0-jquery.css');      
        wp_enqueue_style('jquery-jcarousel', THEMEURI . '/css/jcarousel.css');  
        wp_enqueue_style('jquery-flexslider', THEMEURI . '/css/flexslider.css');
        wp_enqueue_style('jquery-nivoslider', THEMEURI . '/css/nivo-slider.css');
        wp_enqueue_style('jquery-nivoslider-theme', THEMEURI . '/css/nivo-default/default.css'); 
        wp_enqueue_style('theme-skin');
        wp_register_style('theme-ie7',THEMEURI . '/css/ie7.css', 6 , false, 'screen');
        $GLOBALS['wp_styles']->add_data( 'theme-ie7', 'conditional', 'IE 7' );
        wp_enqueue_style('theme-ie7');
        wp_register_style('theme-ie8',THEMEURI . '/css/ie8.css', 6 , false, 'screen');
        $GLOBALS['wp_styles']->add_data( 'theme-ie8', 'conditional', 'IE 8' );
        wp_enqueue_style('theme-ie8');
        wp_register_style('theme-style',get_bloginfo( 'stylesheet_url' ), 4 , false, 'all'); //WP default stylesheet 
        wp_enqueue_style('theme-style');
        if (class_exists( 'Woocommerce' ) ) { //woocommerce style for rt-theme
            global $woocommerce, $suffix;
            wp_enqueue_style( 'rt-woocommerce-styles', THEMEURI.'/rt-woocommerce/woocommerce.css');
        }
    }
更新: @パトリック
• theme.phpの変更
   $themeId = "";
        $pathname = get_site_url();
        if($pathname == 'domain2.com')
       $themeId =  THEMESLUG."_17_style2";
        else 
           $themeId = THEMESLUG."_17_style";
        wp_register_style('theme-skin',THEMEURI . '/css/'.get_option($themeId).'-style.css', 3 , false, 'all'); 
注: 元の theme.php ファイルからこれを削除しました。
if(get_option(THEMESLUG."_17_style")){  .....}
• rt_styling_options.phpの変更: 指定したとおり、最初のセットの直後に次を追加しました
array(
        "name"      => __("Theme Style",'rt_theme_admin'),
        "desc"      => __("Please choose a style for your theme.",'rt_theme_admin'),
        "id"        => THEMESLUG."_17_style2",
        "options"   =>  array(
                        "blue"     => "Blue Style",
                        "purple"   => "Purple Style", 
                        "orange"   => "Orange Style",                       
                        "brown"   => "Brown Style",                                                 
                        "rose"   => "Rose Style",       
                        "green"   => "Green Style",     
                        "grey"   => "Grey Style",       
                        "gold"   => "Gold Style",                               
                        ),
        "default"   => "gold", 
        "type"      => "select"),