Ejemplo n.º 1
0
        }
        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>';
            }
            ?>
					

						<p class="meta"><?php 
            echo __('Resume posted by ', 'appthemes') . '<strong>' . wptexturize(get_the_author_meta('display_name')) . '</strong>';
Ejemplo n.º 2
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;
}