PluginProbe
Nested Pages / 1.1.4
Nested Pages v1.1.4
3.3.1 3.2.15 3.2.14 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 trunk 1.0 1.1 1.1.1 1.1.2 1.1.3 All 106 releases
wp-nested-pages / views / row.php
row.php
108 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Row represents a single page
4 */
5 ?>
6 <div class="row">
7 <div class="child-toggle"></div>
8 <div class="row-inner">
9 <i class="np-icon-sub-menu"></i>
10 <?php if ( current_user_can('edit_theme_options') ) : ?>
11 <i class="handle np-icon-menu"></i>
12 <?php endif; ?>
13 <a href="<?php echo get_edit_post_link(); ?>" class="page-link page-title">
14 <span class="title"><?php the_title(); ?></span>
15 <?php
16
17 if ( function_exists('wpseo_translate_score') ){
18 echo '<span class="np-seo-indicator ' . $this->post_data['score'] . '"></span>';
19 }
20
21 // Post Status
22 echo '<span class="status">';
23 if ( $post->post_status !== 'publish' ) echo '(' . $post->post_status . ')';
24 if ( post_password_required($post->ID) ) echo ' <i class="np-icon-lock"></i>';
25 echo '</span>';
26
27 // Nested Pages Status
28 if ( $this->post_data['np_status'] == 'hide' )
29 echo '<i class="np-icon-eye-blocked"></i>';
30
31 // Nav Status
32 if ( $this->post_data['nav_status'] == 'hide' ){
33 echo '<span class="nav-status">(Hidden)</span>';
34 } else {
35 echo '<span class="nav-status"></span>';
36 }
37
38 // Post Lock
39 if ( $user = wp_check_post_lock(get_the_id()) ){
40 $u = get_userdata($user);
41 echo '<span class="locked"><i class="np-icon-lock"></i><em> ' . $u->display_name . ' ' . __('currently editing', 'nestedpages') . '</em></span>';
42 } else {
43 echo '<span class="edit-indicator"><i class="np-icon-pencil"></i>' . __('Edit', 'nestedpages') . '</span>';
44 }
45 ?>
46 </a>
47
48 <a href="#" class="np-toggle-edit"><i class="np-icon-pencil"></i></a>
49
50 <div class="action-buttons">
51
52 <?php if ( $post->comment_status == 'open' ) : $comments = wp_count_comments(get_the_id()); $cs = 'open' ?>
53
54
55 <a href="<?php echo admin_url( 'edit-comments.php?p=' . get_the_id() ); ?>" class="np-btn">
56 <i class="np-icon-bubble"></i> <?php echo $comments->total_comments; ?>
57 </a>
58
59 <?php else : $cs = 'closed'; endif; ?>
60
61
62 <?php if ( current_user_can('publish_pages') ) : ?>
63
64 <a href="#" class="np-btn open-redirect-modal" data-parentid="<?php echo get_the_id(); ?>"><i class="np-icon-link"></i></a>
65
66 <a href="<?php echo $this->addNewPageLink(); ?>&npparent=<?php echo get_the_id(); ?>" class="np-btn"><?php _e('Add Child', 'nestedpages'); ?></a>
67
68 <?php endif; ?>
69
70 <?php if ( !$user = wp_check_post_lock(get_the_id()) ) : ?>
71 <a href="#"
72 class="np-btn np-quick-edit"
73 data-id="<?php echo get_the_id(); ?>"
74 data-template="<?php echo $this->post_data['template']; ?>"
75 data-title="<?php the_title(); ?>"
76 data-slug="<?php echo $post->post_name; ?>"
77 data-commentstatus="<?php echo $cs; ?>"
78 data-status="<?php echo get_post_status(); ?>"
79 data-np-status="<?php echo $this->post_data['np_status']; ?>"
80 data-navstatus="<?php echo $this->post_data['nav_status']; ?>"
81 data-navtitleattr="<?php echo $this->post_data['nav_title_attr']; ?>"
82 data-navcss="<?php echo $this->post_data['nav_css']; ?>"
83 data-linktarget="<?php echo $this->post_data['link_target']; ?>"
84 data-navtitle="<?php echo $this->post_data['nav_title']; ?>"
85 data-author="<?php echo $post->post_author; ?>"
86 <?php if ( current_user_can('publish_pages') ) : ?>
87 data-password="<?php echo $post->post_password; ?>"
88 <?php endif; ?>
89 data-month="<?php echo $this->post_data['month']; ?>"
90 data-day="<?php echo $this->post_data['d']; ?>"
91 data-year="<?php echo $this->post_data['y']; ?>"
92 data-hour="<?php echo $this->post_data['h']; ?>"
93 data-minute="<?php echo $this->post_data['m']; ?>">
94 <?php _e('Quick Edit', 'nestedpages'); ?>
95 </a>
96 <?php endif; ?>
97
98 <a href="<?php echo get_the_permalink(); ?>" class="np-btn" target="_blank"><?php _e('View', 'nestedpages'); ?></a>
99
100 <?php if ( current_user_can('delete_pages') ) : ?>
101 <a href="<?php echo get_delete_post_link(get_the_id()); ?>" class="np-btn np-btn-trash">
102 <i class="np-icon-remove"></i>
103 </a>
104 <?php endif; ?>
105
106 </div><!-- .action-buttons -->
107 </div><!-- .row-inner -->
108 </div><!-- .row -->