XPressME Integration Kit

Trac


Ignore:
Timestamp:
Oct 7, 2009, 10:36:28 AM (15 years ago)
Author:
toemon
Message:

XOOPSモード、WordPressモードにて、それぞれ別のテーマを選択できるようにした。 fixes #218

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php

    r380 r392  
    2121require_once dirname( __FILE__ ).'/include/pluggable-override.php' ; 
    2222require_once dirname( __FILE__ ).'/include/functions_for_wp_old.php' ; 
     23 
     24if (!is_wordpress_style() && ( !empty($xpress_config->theme_select) || $xpress_config->theme_select != 'use_wordpress_select') ){ 
     25        add_filter('stylesheet', 'xpress_Stylesheet'); 
     26        add_filter('template', 'xpress_ThemeTemplate'); 
     27} 
     28function xpress_Stylesheet($stylesheet) { 
     29        global $xpress_config; 
     30        $theme = $xpress_config->theme_select; 
     31    $theme = get_theme($theme); 
     32 
     33    if (empty($theme)) { 
     34        return $stylesheet; 
     35    } 
     36    return $theme['Stylesheet']; 
     37} 
     38 
     39function xpress_ThemeTemplate($template) { 
     40        global $xpress_config; 
     41        $theme = $xpress_config->theme_select; 
     42    $theme = get_theme($theme); 
     43 
     44    if (empty($theme)) { 
     45        return $template; 
     46    } 
     47    return $theme['Template']; 
     48} 
    2349 
    2450function my_plugin_menu() 
Note: See TracChangeset for help on using the changeset viewer.