Changeset 252 for trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
- Timestamp:
- Jun 4, 2009, 2:02:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r245 r252 399 399 $blog_encoding = get_option('blog_charset'); 400 400 $text = get_the_content(''); 401 $text = strip_shortcodes( $text ); 401 if (function_exists('strip_shortcodes')){ //@since WP2.5 402 $text = strip_shortcodes( $text ); 403 } 402 404 $text = apply_filters('the_content', $text); 403 405 $text = str_replace(']]>', ']]>', $text); … … 454 456 function xpress_post_new_link($link_title = 'Post New',$display = true) 455 457 { 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 } 457 465 if ($display) 458 466 echo $output; … … 469 477 if (is_category()) 470 478 $output = sprintf(__('Archive for the ‘%s’ Category', 'xpressme'), single_cat_title('', false)); 471 if (is_tag()) 472 $output = sprintf(__('Posts Tagged ‘%s’', 'xpressme'), single_tag_title('', false) ); 479 if (function_exists( 'is_tag' )){ 480 if (is_tag()) 481 $output = sprintf(__('Posts Tagged ‘%s’', 'xpressme'), single_tag_title('', false) ); 482 } 473 483 if (is_day()) 474 484 $output = sprintf(__('Archive for %s|Daily archive page', 'xpressme'), get_the_time(__('F jS, Y', 'xpressme'))); … … 587 597 588 598 function 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 } 592 612 593 613 ob_start();
Note: See TracChangeset
for help on using the changeset viewer.