else $modversion['sub'][1]['url'] = $add_url . "wp-admin/post.php"; $modversion['sub'][2]['name'] = constant( '_MI_XP2_MENU_EDIT'); $modversion['sub'][2]['url'] = $add_url . "wp-admin/edit.php"; $modversion['sub'][3]['name'] = constant( '_MI_XP2_MENU_ADMIN'); $modversion['sub'][3]['url'] = $add_url . "wp-admin/"; } if (mod_access_level() > 9) { $modversion['sub'][4]['name'] = constant( '_MI_XP2_MENU_XPRESS'); $modversion['sub'][4]['url'] = $add_url . "wp-admin/admin.php?page=xpressme/xpressme.php"; } if($GLOBALS["xoopsUserIsAdmin"]){ $modversion['sub'][5]['name'] = constant( '_MI_XP2_MOD_ADMIN'); $modversion['sub'][5]['url'] = "admin/index.php"; } if (function_exists('xpress_create_new_blog'))$create_new_blog = xpress_create_new_blog(); if(!empty($create_new_blog)){ $modversion['sub'][6]['name'] = $create_new_blog['title']; $modversion['sub'][6]['url'] = $create_new_blog['menu_url']; } if (function_exists('xpress_primary_blog_link'))$primaryw_blog = xpress_primary_blog_link(); if(!empty($primaryw_blog)){ $modversion['sub'][7]['name'] = $primaryw_blog['title']; $modversion['sub'][7]['url'] = $primaryw_blog['menu_url']; } } } // Use smarty $modversion["use_smarty"] = 1;
function xpress_create_new_blog_link($args ='' ) { global $xoops_config; global $current_user; $defaults = array( 'echo' => 1 ); $r = wp_parse_args( $args, $defaults ); extract( $r ); $result = xpress_create_new_blog(); if (!empty($result)){ $output = $result['link']; } else { $output = ''; } if ($echo) echo $output; else return $output; }
} $modversion['sub'][2]['name'] = constant('_MI_XP2_MENU_EDIT'); $modversion['sub'][2]['url'] = $add_url . "wp-admin/edit.php"; $modversion['sub'][3]['name'] = constant('_MI_XP2_MENU_ADMIN'); $modversion['sub'][3]['url'] = $add_url . "wp-admin/"; } if (mod_access_level() > 9) { $modversion['sub'][4]['name'] = constant('_MI_XP2_MENU_XPRESS'); $modversion['sub'][4]['url'] = $add_url . "wp-admin/admin.php?page=xpressme/xpressme.php"; } if ($GLOBALS["xoopsUserIsAdmin"]) { $modversion['sub'][5]['name'] = constant('_MI_XP2_MOD_ADMIN'); $modversion['sub'][5]['url'] = "admin/index.php"; } if (function_exists('xpress_create_new_blog')) { $create_new_blog = xpress_create_new_blog(); } if (!empty($create_new_blog)) { $modversion['sub'][6]['name'] = $create_new_blog['title']; $modversion['sub'][6]['url'] = $create_new_blog['menu_url']; } if (function_exists('xpress_primary_blog_link')) { $primaryw_blog = xpress_primary_blog_link(); } if (!empty($primaryw_blog)) { $modversion['sub'][7]['name'] = $primaryw_blog['title']; $modversion['sub'][7]['url'] = $primaryw_blog['menu_url']; } } } // Use smarty