Changeset 401
- Timestamp:
- Oct 15, 2009, 5:22:17 PM (15 years ago)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Ver2.1/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r374 r401 585 585 586 586 if (xpress_is_wp_version('>=','2.1')){ 587 $output = '<a href="'. get_ xpress_url() . '/wp-admin/post-new.php' . '">' . $link_title . '</a>';588 } else { 589 $output = '<a href="'. get_ xpress_url() . '/wp-admin/post.php' . '">' . $link_title . '</a>';587 $output = '<a href="'. get_bloginfo('url') . '/wp-admin/post-new.php' . '">' . $link_title . '</a>'; 588 } else { 589 $output = '<a href="'. get_bloginfo('url') . '/wp-admin/post.php' . '">' . $link_title . '</a>'; 590 590 } 591 591 if ($echo) -
branches/Ver2.1/xpressme_integration_kit/xoops_version.php
r390 r401 83 83 $modversion['hasMain'] = 1; 84 84 85 86 if(is_object($GLOBALS["xoopsUser"])){ 87 global $current_user; 88 if (@$current_user->user_level > 0) { 89 $modversion['sub'][1]['name'] = constant( '_MI_XP2_MENU_POST_NEW'); 90 if (wp_version_compare($wp_version, '>=','2.1')) 91 $modversion['sub'][1]['url'] = "wp-admin/post-new.php"; 92 else 93 $modversion['sub'][1]['url'] = "wp-admin/post.php"; 94 $modversion['sub'][2]['name'] = constant( '_MI_XP2_MENU_EDIT'); 95 $modversion['sub'][2]['url'] = "wp-admin/edit.php"; 96 $modversion['sub'][3]['name'] = constant( '_MI_XP2_MENU_ADMIN'); 97 $modversion['sub'][3]['url'] = "wp-admin/"; 85 if (function_exists('get_bloginfo')){ 86 //$add_url for wpmu multiblog 87 $pattern = '/.*\/' . $mydirname . '/'; 88 $add_url = preg_replace($pattern,'',get_bloginfo('url')); 89 if (!empty($add_url)){ 90 $pattern = '/^\//'; 91 $add_url = preg_replace($pattern,'',$add_url) . '/'; 98 92 } 99 if (@$current_user->user_level > 9) { 100 $modversion['sub'][4]['name'] = constant( '_MI_XP2_MENU_XPRESS'); 101 // $modversion['sub'][4]['url'] = "wp-admin/options-general.php?page=xpressme_config"; 102 $modversion['sub'][4]['url'] = "wp-admin/admin.php?page=xpressme\\xpressme.php"; 93 94 if(is_object($GLOBALS["xoopsUser"])){ 95 global $current_user , $xoops_config; 96 if (@$current_user->user_level > 0) { 97 $modversion['sub'][1]['name'] = constant( '_MI_XP2_MENU_POST_NEW'); 98 if (wp_version_compare($wp_version, '>=','2.1')) 99 $modversion['sub'][1]['url'] = $add_url . "wp-admin/post-new.php"; 100 else 101 $modversion['sub'][1]['url'] = $add_url . "wp-admin/post.php"; 102 $modversion['sub'][2]['name'] = constant( '_MI_XP2_MENU_EDIT'); 103 $modversion['sub'][2]['url'] = $add_url . "wp-admin/edit.php"; 104 $modversion['sub'][3]['name'] = constant( '_MI_XP2_MENU_ADMIN'); 105 $modversion['sub'][3]['url'] = $add_url . "wp-admin/"; 106 } 107 if (@$current_user->user_level > 9) { 108 $modversion['sub'][4]['name'] = constant( '_MI_XP2_MENU_XPRESS'); 109 $modversion['sub'][4]['url'] = $add_url . "wp-admin/admin.php?page=xpressme\\xpressme.php"; 110 } 111 if($GLOBALS["xoopsUserIsAdmin"]){ 112 $modversion['sub'][5]['name'] = constant( '_MI_XP2_MOD_ADMIN'); 113 $modversion['sub'][5]['url'] = "admin/index.php"; 114 } 103 115 } 104 if($GLOBALS["xoopsUserIsAdmin"]){105 $modversion['sub'][5]['name'] = constant( '_MI_XP2_MOD_ADMIN');106 $modversion['sub'][5]['url'] = "admin/index.php";107 }108 109 116 } 110 117 -
trunk/xpressme_integration_kit/xoops_version.php
r387 r401 83 83 $modversion['hasMain'] = 1; 84 84 85 86 if(is_object($GLOBALS["xoopsUser"])){ 87 global $current_user; 88 if (@$current_user->user_level > 0) { 89 $modversion['sub'][1]['name'] = constant( '_MI_XP2_MENU_POST_NEW'); 90 if (wp_version_compare($wp_version, '>=','2.1')) 91 $modversion['sub'][1]['url'] = "wp-admin/post-new.php"; 92 else 93 $modversion['sub'][1]['url'] = "wp-admin/post.php"; 94 $modversion['sub'][2]['name'] = constant( '_MI_XP2_MENU_EDIT'); 95 $modversion['sub'][2]['url'] = "wp-admin/edit.php"; 96 $modversion['sub'][3]['name'] = constant( '_MI_XP2_MENU_ADMIN'); 97 $modversion['sub'][3]['url'] = "wp-admin/"; 85 if (function_exists('get_bloginfo')){ 86 //$add_url for wpmu multiblog 87 $pattern = '/.*\/' . $mydirname . '/'; 88 $add_url = preg_replace($pattern,'',get_bloginfo('url')); 89 if (!empty($add_url)){ 90 $pattern = '/^\//'; 91 $add_url = preg_replace($pattern,'',$add_url) . '/'; 98 92 } 99 if (@$current_user->user_level > 9) { 100 $modversion['sub'][4]['name'] = constant( '_MI_XP2_MENU_XPRESS'); 101 // $modversion['sub'][4]['url'] = "wp-admin/options-general.php?page=xpressme_config"; 102 $modversion['sub'][4]['url'] = "wp-admin/admin.php?page=xpressme\\xpressme.php"; 93 94 if(is_object($GLOBALS["xoopsUser"])){ 95 global $current_user , $xoops_config; 96 if (@$current_user->user_level > 0) { 97 $modversion['sub'][1]['name'] = constant( '_MI_XP2_MENU_POST_NEW'); 98 if (wp_version_compare($wp_version, '>=','2.1')) 99 $modversion['sub'][1]['url'] = $add_url . "wp-admin/post-new.php"; 100 else 101 $modversion['sub'][1]['url'] = $add_url . "wp-admin/post.php"; 102 $modversion['sub'][2]['name'] = constant( '_MI_XP2_MENU_EDIT'); 103 $modversion['sub'][2]['url'] = $add_url . "wp-admin/edit.php"; 104 $modversion['sub'][3]['name'] = constant( '_MI_XP2_MENU_ADMIN'); 105 $modversion['sub'][3]['url'] = $add_url . "wp-admin/"; 106 } 107 if (@$current_user->user_level > 9) { 108 $modversion['sub'][4]['name'] = constant( '_MI_XP2_MENU_XPRESS'); 109 $modversion['sub'][4]['url'] = $add_url . "wp-admin/admin.php?page=xpressme\\xpressme.php"; 110 } 111 if($GLOBALS["xoopsUserIsAdmin"]){ 112 $modversion['sub'][5]['name'] = constant( '_MI_XP2_MOD_ADMIN'); 113 $modversion['sub'][5]['url'] = "admin/index.php"; 114 } 103 115 } 104 if($GLOBALS["xoopsUserIsAdmin"]){105 $modversion['sub'][5]['name'] = constant( '_MI_XP2_MOD_ADMIN');106 $modversion['sub'][5]['url'] = "admin/index.php";107 }108 109 116 } 110 117
Note: See TracChangeset
for help on using the changeset viewer.