Changeset 542 for trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
- Timestamp:
- Mar 15, 2010, 11:14:22 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r536 r542 1010 1010 } 1011 1011 1012 function xpress_create_new_blog_link($args ='' ) { 1013 global $xoops_config; 1014 1015 global $current_user; 1016 $defaults = array( 1017 'echo' => 1 1018 ); 1019 $r = wp_parse_args( $args, $defaults ); 1020 1021 extract( $r ); 1022 $result = xpress_create_new_blog(); 1023 if (!empty($result)){ 1024 $output = $result['link']; 1025 } else { 1026 $output = ''; 1027 } 1028 1029 if ($echo) 1030 echo $output; 1031 else 1032 return $output; 1033 } 1034 1035 function xpress_create_new_blog() { 1036 global $xoops_config; 1037 global $current_user; 1038 $ret = array(); 1039 1040 if (xpress_is_multiblog() && is_user_logged_in()){ 1041 $active_signup = get_site_option( 'registration' ); 1042 if ( !$active_signup ) $active_signup = 'none'; 1043 switch ($active_signup){ 1044 case 'all': 1045 case 'blog': 1046 $ret['url'] = $xoops_config->module_url . '/wp-signup.php'; 1047 $ret['script'] = 'wp-signup.php'; 1048 $ret['title'] = __('Create New Blog','xpressme'); 1049 $ret['link'] = '<a href="' . $ret['url'] . '">' . $ret['title'] . '</a>'; 1050 break; 1051 case 'user': 1052 case 'none': 1053 default: 1054 } 1055 } 1056 return $ret; 1057 } 1012 1058 1013 1059 ?>
Note: See TracChangeset
for help on using the changeset viewer.