PluginProbe
UpStream: a Project Management Plugin for WordPress / trunk
UpStream: a Project Management Plugin for WordPress vtrunk
trunk 1.39.0 1.39.1 1.39.2 1.39.3 2.0.7 2.1.0
upstream / templates / single-project / discussion.php

discussion.php in UpStream: a Project Management Plugin for WordPress trunk, at templates/single-project/discussion.php

56 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Single project: discussion
4 *
5 * @package UpStream
6 */
7
8 // Prevent direct access.
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12 ?>
13
14 <?php
15 if ( upstream_are_project_comments_enabled() && ! upstream_are_comments_disabled() ) :
16 $plugin_options = get_option( 'upstream_general' );
17 $collapse_box = isset( $plugin_options['collapse_project_discussion'] ) && true === (bool) $plugin_options['collapse_project_discussion'];
18 $collapse_box_state = \UpStream\Frontend\upstream_get_section_collapse_state( 'discussion' );
19 $project_id = upstream_post_id();
20
21 if ( false !== $collapse_box_state ) {
22 $collapse_box = 'closed' === $collapse_box_state;
23 }
24 ?>
25
26 <div class="col-xs-12 col-sm-12 col-md-12">
27 <div class="x_panel" data-section="discussion">
28 <div class="x_title" id="discussion">
29 <h2>
30 <i class="fa fa-bars sortable_handler"></i>
31 <i class="fa fa-comments"></i> <?php echo esc_html( upstream_discussion_label() ); ?>
32 </h2>
33 <ul class="nav navbar-right panel_toolbox">
34 <li>
35 <a class="collapse-link">
36 <i class="fa fa-chevron-<?php echo $collapse_box ? 'down' : 'up'; ?>"></i>
37 </a>
38 </li>
39 <?php do_action( 'upstream_project_discussion_top_right', $project_id ); ?>
40 </ul>
41 <div class="clearfix"></div>
42 </div>
43 <div class="x_content" style="display: <?php echo $collapse_box ? 'none' : 'block'; ?>;">
44 <?php
45 $r = upstream_override_access_field( true, UPSTREAM_ITEM_TYPE_PROJECT, $project_id, null, null, 'comments', UPSTREAM_PERMISSIONS_ACTION_VIEW );
46 if ( $r ) {
47 ?>
48 <?php upstream_render_comments_box(); ?>
49 <?php
50 }
51 ?>
52 </div>
53 </div>
54 </div>
55 <?php endif; ?>
56