function psp_project_part($atts)
{
    psp_front_assets(1);
    extract(shortcode_atts(array('id' => '', 'display' => '', 'style' => ''), $atts));
    $project = get_post($id);
    if ($project) {
        $output = '<div class="psp-part-project">';
        if ($display == 'overview') {
            $output .= psp_essentials($id, 'psp-shortcode', 'none');
        } elseif ($display == 'documents') {
            $output .= '<div id="psp-essentials" class="psp-shortcode"><div id="project-documents">';
            $output .= psp_documents($id, 'psp-shortcode');
            $output .= '</div></div>';
        } elseif ($display == 'progress') {
            $output .= psp_total_progress($id, 'psp-shortcode', $style);
        } elseif ($display == 'phases') {
            $output .= psp_phases($id, 'psp-shortcode', $style);
        } elseif ($display == 'tasks') {
            $output .= psp_task_table($id, 'psp-shortcode', $style);
        }
        $output .= '</div>';
        return $output;
    } else {
        return '<p>' . __('No project with that ID', 'psp_projects') . '</p>';
    }
}
Пример #2
0
    ?>
			
					<div id="psp-documents" class="<?php 
    echo $style;
    ?>
">
					
						<h4><?php 
    _e('Documents', 'psp_projects');
    ?>
</h4>

						<?php 
    if (PSP_PLUGIN_TYPE == 'professional') {
        if (get_field('documents', $id)) {
            echo psp_documents($id);
        } else {
            echo '<p>' . __("No documents at this time.") . '</p>';
        }
    } else {
        $documents_text = get_field('documents2');
        if (!empty($documents_text)) {
            echo $documents_text;
        } else {
            echo '<p>' . __("No documents at this time.") . '</p>';
        }
    }
    do_action('psp_after_documents');
    ?>

						</div> <!--/#project-documents-->