XPressME Integration Kit

Trac


Ignore:
Timestamp:
Jun 4, 2009, 2:02:54 PM (15 years ago)
Author:
toemon
Message:

WordPressME2.0.11への対応,(ブロック周りは未完)

File:
1 edited

Legend:

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

    r245 r252  
    399399        $blog_encoding = get_option('blog_charset'); 
    400400        $text = get_the_content(''); 
    401         $text = strip_shortcodes( $text ); 
     401        if (function_exists('strip_shortcodes')){ //@since WP2.5 
     402                $text = strip_shortcodes( $text ); 
     403        } 
    402404        $text = apply_filters('the_content', $text); 
    403405        $text = str_replace(']]>', ']]>', $text); 
     
    454456function xpress_post_new_link($link_title = 'Post New',$display = true) 
    455457{ 
    456         $output = '<a href="'. get_xpress_url() . '/wp-admin/post-new.php' . '">' . $link_title . '</a>'; 
     458        global $xoops_config; 
     459         
     460        if ($xoops_config->wp_db_version  > 5000){ 
     461                $output = '<a href="'. get_xpress_url() . '/wp-admin/post-new.php' . '">' . $link_title . '</a>'; 
     462        } else { 
     463                $output = '<a href="'. get_xpress_url() . '/wp-admin/post.php' . '">' . $link_title . '</a>'; 
     464        }        
    457465        if ($display)  
    458466                echo $output; 
     
    469477        if (is_category()) 
    470478                $output = sprintf(__('Archive for the &#8216;%s&#8217; Category', 'xpressme'), single_cat_title('', false)); 
    471         if (is_tag()) 
    472                 $output = sprintf(__('Posts Tagged &#8216;%s&#8217;', 'xpressme'), single_tag_title('', false) ); 
     479        if (function_exists( 'is_tag' )){ 
     480                if (is_tag()) 
     481                        $output = sprintf(__('Posts Tagged &#8216;%s&#8217;', 'xpressme'), single_tag_title('', false) ); 
     482        } 
    473483        if (is_day()) 
    474484                $output = sprintf(__('Archive for %s|Daily archive page', 'xpressme'), get_the_time(__('F jS, Y', 'xpressme'))); 
     
    587597 
    588598function xpress_get_calendar($sun_color = '#DB0000' ,$sat_color = '#004D99' ,$initial = true) { 
    589         global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; 
    590  
    591  
     599        global $wpdb, $m, $monthnum, $year, $wp_locale, $posts , $xoops_config; 
     600 
     601        if ($xoops_config->is_wp20){ 
     602                ob_start(); 
     603                        get_calendar(true); 
     604                        $output = ob_get_contents(); 
     605                ob_end_clean(); 
     606                $output = preg_replace('/<th abbr=/', '<th align="center"  abbr=', $output); //week name align center 
     607                $output = preg_replace('/<td>/', '<td align="center">', $output); //days align center 
     608                $output = preg_replace('/<td id="today">/', '<td id="today" align="center">', $output); //today align center 
     609 
     610                return $output; 
     611        } 
    592612 
    593613        ob_start(); 
Note: See TracChangeset for help on using the changeset viewer.