- Timestamp:
- Jun 4, 2009, 2:02:54 PM (15 years ago)
- Location:
- trunk/xpressme_integration_kit/wp-content/plugins/xpressme
- Files:
-
- 1 added
- 4 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(); -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php
r232 r252 51 51 52 52 } else { 53 // WP 2.7original53 // WP original 54 54 if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) 55 55 return false; … … 58 58 return; 59 59 60 if ( ! $user = wp_validate_auth_cookie() ) { 61 if ( empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) { 62 wp_set_current_user(0); 63 return false; 64 } 65 } 66 67 wp_set_current_user($user); 60 if (function_exists('wp_validate_auth_cookie')){ 61 if ( ! $user = wp_validate_auth_cookie() ) { 62 if ( empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) { 63 wp_set_current_user(0); 64 return false; 65 } 66 } 67 wp_set_current_user($user); 68 } else { // for WP2.0 69 if ( empty($_COOKIE[USER_COOKIE]) || empty($_COOKIE[PASS_COOKIE]) || 70 !wp_login($_COOKIE[USER_COOKIE], $_COOKIE[PASS_COOKIE], true) ) { 71 wp_set_current_user(0); 72 return false; 73 } 74 $user_login = $_COOKIE[USER_COOKIE]; 75 wp_set_current_user(0, $user_login); 76 } 68 77 } 69 78 } … … 77 86 if(is_object($xoopsUser)){ 78 87 $u_name = $xoopsUser->getVar("uname"); 79 $u_pass_md5 = $xoopsUser->getVar("pass"); 88 $u_pass_md5 = $xoopsUser->getVar("pass"); 80 89 if ( ! empty($u_name) && ! empty($u_pass_md5) ) { 81 90 include_once dirname( __FILE__ ).'/user_sync_xoops.php'; … … 96 105 wp_set_current_user(0); 97 106 wp_clearcookie(); 98 return 0; 107 return 0; 99 108 } 100 109 endif; -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
r236 r252 20 20 21 21 require_once dirname( __FILE__ ).'/include/pluggable-override.php' ; 22 if ($xoops_config->is_wp20) 23 require_once dirname( __FILE__ ).'/include/functions_for_wp20.php' ; 22 24 23 25 add_action('admin_menu', array(&$xpress_config, 'add_option_page')); -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
r246 r252 410 410 411 411 } 412 412 413 413 function groupe_role_option(){ 414 414 global $wp_roles , $xoops_db; … … 427 427 428 428 $select_value = $groupe->role; 429 430 429 430 431 431 432 432 foreach($wp_roles->role_names as $role => $name) {
Note: See TracChangeset
for help on using the changeset viewer.