function fh_my_account_link($items, $args) { if (class_exists('ID_Member')) { $permalink_structure = get_option('permalink_structure'); if (empty($permalink_structure)) { $prefix = '&'; } else { $prefix = '?'; } $durl = md_get_durl(); if ($args->theme_location == 'main-menu') { if (is_user_logged_in()) { $items .= '<li class="createaccount buttonpadding"><a href="' . $durl . '">' . __('My Account', 'fivehundred') . '</a></li>'; $items .= '<li class="login right"><a href="' . wp_logout_url(home_url()) . '">' . __('Logout', 'fivehundred') . '</a></li>'; } else { $items .= '<li class="createaccount buttonpadding"><a href="' . $durl . $prefix . 'action=register">' . __('Create Account', 'fivehundred') . '</a></li>'; $items .= '<li class="login right"><a href="' . $durl . '">' . __('Login', 'fivehundred') . '</a></li>'; } } } return $items; }
function ide_creator_profile_tab() { global $current_user; global $permalink_structure; if (current_user_can('create_edit_projects')) { if (empty($permalink_structure)) { $prefix = '&'; } else { $prefix = '?'; } get_currentuserinfo(); $user_id = $current_user->ID; if (isset($_GET['creator_profile'])) { $profile = absint($_GET['creator_profile']); } echo '<li ' . (isset($profile) && $profile == $user_id ? 'class="active"' : '') . '><a href="' . md_get_durl() . $prefix . 'creator_profile=' . $user_id . '">' . __('Creator Profile', 'ignitiondeck') . '</a></li>'; } }