Example #1
0
function jr_top_nav_links($items = '', $menu = null)
{
    if (!empty($menu) && $menu->theme_location != 'top') {
        return $items;
    }
    if (is_user_logged_in()) {
        $items .= '<li class="right"><a href="' . wp_logout_url(get_bloginfo('url')) . '">' . __('Logout', 'appthemes') . '</a></li>';
        /*if (get_option('jr_user_profile_page_id')) :
        		
        			$items .= '<li class="right ';
        			if (is_page(get_option('jr_user_profile_page_id'))) $items .= 'current_page_item';		
        			$items .= '"><a href="'.get_permalink(get_option('jr_user_profile_page_id')).'">'.__('My Profile', 'appthemes').'</a></li>';
        		
        		endif;*/
        if (get_option('jr_dashboard_page_id') && is_user_logged_in()) {
            $items .= '<li class="right ';
            if (is_page(get_option('jr_dashboard_page_id'))) {
                $items .= 'current_page_item';
            }
            $items .= '"><a href="' . get_permalink(get_option('jr_dashboard_page_id')) . '">' . __('My Dashboard', 'appthemes') . '</a></li>';
        }
    } else {
        global $pagenow;
        if (isset($_GET['action'])) {
            $theaction = $_GET['action'];
        } else {
            $theaction = '';
        }
        $items .= '<li class="right ';
        if ($pagenow == 'wp-login.php' && $theaction !== 'lostpassword' && !isset($_GET['key'])) {
            $items .= 'current_page_item';
        }
        $items .= '"><a href="' . site_url('wp-login.php') . '">' . __('Login/Register', 'appthemes') . '</a></li>';
    }
    if (jr_resume_is_visible() || is_user_logged_in() && jr_viewing_resumes_require_subscription()) {
        $items .= '<li class="right ';
        if (is_post_type_archive('resume')) {
            $items .= 'current_page_item';
        }
        $items .= '"><a href="' . get_post_type_archive_link('resume') . '">' . __('Browse Resumes', 'appthemes') . '</a></li>';
    }
    if (get_option('jr_submit_page_id') && (!is_user_logged_in() || is_user_logged_in() && current_user_can('can_submit_job'))) {
        $items .= '<li class="right ';
        if (is_page(get_option('jr_submit_page_id'))) {
            $items .= 'current_page_item';
        }
        $items .= '"><a href="' . get_permalink(get_option('jr_submit_page_id')) . '">' . __('Submit a Job', 'appthemes') . '</a></li>';
    }
    $items .= '</ul>';
    return $items;
}
Example #2
0
        if (isset($_GET['message'])) {
            $message = strip_tags(stripslashes(urldecode($_GET['message'])));
        }
        if (!empty($message)) {
            echo '<p class="success">' . $message . '</p>';
        }
        ?>

					<div class="user_prefs_wrap" style="display: none"><?php 
        echo jr_seeker_prefs(get_the_author_meta('ID'));
        ?>
</div>
						
					<?php 
        ### Visibility check
        if (!jr_resume_is_visible() && $post->post_author != get_current_user_id()) {
            echo '<ul class="errors"><li>' . __('Sorry, you do not have permission to view individual resumes.', 'appthemes') . '</li></ul>';
            if (jr_viewing_resumes_require_subscription() && jr_current_user_can_subscribe_for_resumes()) {
                if ($notice = get_option('jr_resume_subscription_notice')) {
                    echo '<p>' . wptexturize($notice) . '</p>';
                }
                jr_resume_subscribe_button();
                echo '<div class="clear"></div>';
            }
        } else {
            if ($post->post_status == 'private' && $post->post_author == get_current_user_id()) {
                echo '<p class="success">' . sprintf(__('Your resume is currently hidden &mdash; <a href="%s">click here to publish it</a>.', 'appthemes'), add_query_arg('publish', 'true')) . '</p>';
            }
            ?>
					
Example #3
0
<?php

jr_resume_page_auth();
if (!jr_resume_is_visible()) {
    wp_redirect(get_post_type_archive_link('resume'));
    exit;
}
if (isset($_GET['location'])) {
    $_GET['location'] = urldecode(utf8_uri_encode($_GET['location']));
}
get_header('resume-search');
?>

	<div class="section">

		<?php 
global $wp_query, $query_string;
$term_heading = '';
$find_posts_in = '';
$search = get_search_query();
$location = isset($_GET['location']) ? trim($_GET['location']) : '';
$radius = isset($_GET['radius']) ? absint($_GET['radius']) : 0;
if (!$radius) {
    $radius = 50;
}
if ($search) {
    $term_heading = sprintf(__('Searching resumes for &ldquo;%s&rdquo; ', 'appthemes'), get_search_query());
} else {
    $term_heading = __('Searching resumes ', 'appthemes');
}
if ($location) {