XPressME Integration Kit

Trac


Ignore:
Timestamp:
Mar 29, 2009, 1:21:24 AM (15 years ago)
Author:
toemon
Message:

インデックスページのデザイン (XPressMEVer1.X)のデフォルトに近いテーマ)

File:
1 edited

Legend:

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

    r113 r140  
    243243} 
    244244 
     245function is_xpress_contributor() 
     246{ 
     247        global $current_user; 
     248        get_currentuserinfo(); 
     249        if ($current_user->user_level > 3) 
     250                return true; 
     251        else 
     252                return false; 
     253} 
     254 
     255function xpress_post_new_link($link_title,$display = true) 
     256{ 
     257        $output = '<a href="'. get_xpress_url() . '/wp-admin/post-new.php' . '">' . $link_title . '</a>'; 
     258        if ($display)  
     259                echo $output; 
     260        else 
     261                return $output; 
     262} 
     263 
     264function xpress_conditional_title($display = true) 
     265{ 
     266        $output = __('Main', 'xpress'); 
     267        if (is_category()) 
     268                $output = sprintf(__('Archive for the &#8216;%s&#8217; Category', 'xpress'), single_cat_title('', false)); 
     269        if (is_tag()) 
     270                $output = sprintf(__('Posts Tagged &#8216;%s&#8217;', 'xpress'), single_tag_title('', false) ); 
     271        if (is_day()) 
     272                $output = sprintf(_c('Archive for %s|Daily archive page', 'xpress'), get_the_time(__('F jS, Y', 'xpress'))); 
     273        if (is_month()) 
     274                $output = sprintf(_c('Archive for %s|Monthly archive page', 'xpress'), get_the_time(__('F, Y', 'xpress'))); 
     275        if (is_year()) 
     276                $output = sprintf(_c('Archive for %s|Yearly archive page', 'xpress'), get_the_time(__('Y', 'xpress'))); 
     277        if (is_author()) 
     278                $output = get_author_name( get_query_var('author')); __('Author Archive', 'xpress'); 
     279        if (is_search()) 
     280                $output = __('Search Results', 'xpress'); 
     281                 
     282        if ($display)  
     283                echo $output; 
     284        else 
     285                return $output; 
     286} 
     287 
    245288?> 
Note: See TracChangeset for help on using the changeset viewer.