Changeset 401 for trunk/xpressme_integration_kit/xoops_version.php
- Timestamp:
- Oct 15, 2009, 5:22:17 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.