function display($args, $instance = false) { if (is_array($instance)) { $instance = $instance['number']; } if (!$instance || !is_numeric($instance) || 1 > $instance) { return; } extract($args); if (!($featured_project_id = pp_get_option('featured_project'))) { return; } if (!($featured_project = pp_get_project_data($featured_project_id))) { return; } echo $before_widget; $title = $this->options[$instance]['title'] ? $this->options[$instance]['title'] : __('Featured Project', 'prologue-projects'); echo $before_title; echo $title; echo $after_title; echo '<h4><a href="' . get_category_link($featured_project_id) . '">'; pp_project_name($featured_project_id); echo '</a></h4>'; pp_project_logo($featured_project_id); pp_project_description($featured_project_id); if ($this->options[$instance]['show_team']) { echo '<div class="pp-clear"></div>'; if ($members = pp_get_project_members($featured_project['id'])) { if (count($members)) { echo '<ul id="pp-project-team-list-' . $featured_project['slug'] . '" class="pp-featured-project-team-list">' . "\n"; foreach ($members as $member) { echo "\t" . '<li><a href="' . attribute_escape(get_author_posts_url($member['user_id'], $member['user_nicename'])) . '">'; echo get_avatar($member['user_id'], 16); echo $member['display_name'] . '</a>'; if ($member['project_role']) { echo ' - <span class="role">' . $member['project_role'] . '</span>'; } echo '</li>' . "\n"; } echo '</ul>' . "\n"; } } else { echo '<p class="empty">' . __('No team members assigned', 'prologue-projects') . '</p>' . "\n"; } } echo '<p class="go-link"><a href="' . get_category_link($featured_project_id) . '">' . __('» Visit project', 'prologue-projects') . '</a></p>'; echo '<div class="pp-clear"></div>'; echo $after_widget; }
<h2 class="pp-project-name"><?php pp_project_name(); ?> <?php pp_project_rss(); ?> </h2> <?php pp_project_links(); ?> <div class="pp-clear"></div> </div> <div class="pp-project-main"> <?php pp_project_logo(); ?> <div class="pp-project-description"> <?php pp_project_description(); ?> </div> <div class="pp-clear"></div> <?php } ?> <?php $tab_class = array('tasks' => '', 'updates' => '', 'questions' => ''); $show_form = false;