PluginProbe ʕ •ᴥ•ʔ
Nested Pages / 2.0.1
Nested Pages v2.0.1
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 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.3.0 1.3.1 1.3.10 1.3.11 1.3.12 1.3.13 1.3.14 1.3.15 1.3.2 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.3.1 1.6.3.2 1.6.4 1.6.5 1.6.5.1 1.6.5.2 1.6.6 1.6.7 1.6.8 1.7.0 1.7.1 2.0.1 2.0.2 2.0.3 2.0.4 3.0.1 3.0.10 3.0.11 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.20 3.1.21 3.1.22 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7
wp-nested-pages / app / Views / partials / tool-list.php
wp-nested-pages / app / Views / partials Last commit date
bulk-edit.php 9 years ago list-header.php 9 years ago row-link.php 8 years ago row.php 8 years ago tool-list.php 8 years ago wpml-translations.php 8 years ago
tool-list.php
187 lines
1 <?php
2 $trashedCount = $this->post_repo->trashedCount($this->post_type->name);
3 $searchLabel = esc_attr($this->post_type->labels->search_items);
4
5 // WPML
6 $wpml = $this->integrations->plugins->wpml->installed;
7 if ( $wpml ) $current_lang = $this->integrations->plugins->wpml->getCurrentLanguage('name');
8 if ( $wpml && $current_lang ) $searchLabel .= ' (' . $this->integrations->plugins->wpml->getCurrentLanguage('name') . ')';
9 ?>
10 <div class="nestedpages-tools">
11
12 <ul class="subsubsub">
13 <li>
14 <a href="#all" class="np-toggle-publish active"><?php _e('All'); ?></a> |
15 </li>
16
17 <li>
18 <a href="#published" class="np-toggle-publish"><?php _e('Published'); ?></a> |
19 </li>
20
21 <li>
22 <a href="#draft" class="np-toggle-publish"><?php _e('Draft'); ?></a>
23 </li>
24
25 <li> |
26 <?php if ( !$this->listing_repo->isSearch() ) : ?>
27 <a href="#hide" class="np-toggle-hidden"><?php _e('Show Hidden', 'wp-nested-pages'); ?> </a>
28 <?php else : ?>
29 <a href="#show" class="np-toggle-hidden"><?php _e('Hide Hidden', 'wp-nested-pages'); ?> </a>
30 <?php endif; ?>
31 <span class="count">(<?php echo absint($this->post_repo->getHiddenCount(array($this->post_type->name))); ?>)</span>
32 </li>
33
34 <?php if ( current_user_can('delete_pages') && $trashedCount > 0) : ?>
35 <li class="np-trash-links">
36 |
37 <a href="<?php echo esc_url($this->post_type_repo->trashLink($this->post_type->name)); ?>"><?php _e('Trash'); ?> </a>
38 <span class="count">(<a href="#" class="np-empty-trash" data-posttype="<?php echo esc_attr($this->post_type->name); ?>"><?php _e('Empty', 'wp-nested-pages'); ?></a> <?php echo absint($trashedCount); ?>)</span>
39 </li>
40 <?php endif; ?>
41
42 <?php if ( !$this->post_type_repo->postTypeSetting($this->post_type->name, 'hide_default') ) : ?>
43 <li>
44 |
45 <a href="<?php echo NestedPages\Helpers::defaultPagesLink($this->post_type->name); ?>">
46 <?php _e('Default'); ?> <?php _e($this->post_type->labels->name); ?>
47 </a>
48 </li>
49 <?php endif; ?>
50 </ul>
51
52 <?php
53 if ( $this->integrations->plugins->wpml->installed )
54 if ( $this->post_type->name !== 'post' ) echo $this->integrations->plugins->wpml->languageToolLinks(esc_attr($this->post_type->name));
55 ?>
56
57 <?php
58 if ( $this->post_type->name !== 'page' && $this->post_type_repo->hasSortOptions($this->post_type->name) ) : ?>
59 <div class="np-tools-primary">
60 <form action="<?php echo admin_url('admin-post.php'); ?>" method="post" class="np-tools-sort">
61 <input type="hidden" name="action" value="npListingSort">
62 <input type="hidden" name="page" value="<?php echo $this->pageURL(); ?>">
63 <input type="hidden" name="post_type" value="<?php echo esc_attr($this->post_type->name); ?>">
64 <?php if ( $this->post_type_repo->sortOptionEnabled($this->post_type->name, 'author') ) : ?>
65 <div class="select first">
66 <select id="np_sortauthor" name="np_author" class="nestedpages-sort">
67 <?php
68 $out = '<option value="all">' . __('All Authors', 'wp-nested-pages') . '</option>';
69 $users = $this->user->allUsers();
70 foreach( $users as $user ){
71 $out .= '<option value="' . $user->ID . '"';
72 if ( isset($_GET['author']) && ($_GET['author'] == $user->ID) ) $out .= ' selected';
73 $out .= '>' . esc_html($user->display_name) . '</option>';
74 }
75 echo $out;
76 ?>
77 </select>
78 </div>
79 <?php endif; ?>
80 <?php if ( $this->post_type_repo->sortOptionEnabled($this->post_type->name, 'orderby') ) : ?>
81 <div class="select">
82 <select id="np_orderby" name="np_orderby" class="nestedpages-sort">
83 <?php
84 $options = array(
85 'menu_order' => __('Menu Order', 'wp-nested-pages'),
86 'date' => __('Date', 'wp-nested-pages'),
87 'title' => __('Title', 'wp-nested-pages')
88 );
89 $out = '<option value="">' . __('Order By', 'wp-nested-pages') . '</option>';
90 foreach ( $options as $key => $option ){
91 $out .= '<option value="' . $key . '"';
92 if ( isset($_GET['orderby']) && ($_GET['orderby'] == $key) ) $out .= ' selected';
93 $out .= '>' . esc_html($option) . '</option>';
94 }
95 echo $out;
96 ?>
97 </select>
98 </div>
99 <?php endif; ?>
100 <?php if ( $this->post_type_repo->sortOptionEnabled($this->post_type->name, 'order') ) : ?>
101 <div class="select">
102 <select id="np_order" name="np_order" class="nestedpages-sort">
103 <?php
104 $options = array(
105 'ASC' => __('Ascending', 'wp-nested-pages'),
106 'DESC' => __('Descending', 'wp-nested-pages')
107 );
108 $out = '';
109 foreach ( $options as $key => $option ){
110 $out .= '<option value="' . esc_attr($key) . '"';
111 if ( isset($_GET['order']) && ($_GET['order'] == $key) ) $out .= ' selected';
112 $out .= '>' . esc_html($option) . '</option>';
113 }
114 echo $out;
115 ?>
116 </select>
117 </div>
118 <?php endif; ?>
119 <?php
120 // Taxonomies
121 $taxonomies = array_merge($this->h_taxonomies, $this->f_taxonomies);
122 foreach ( $taxonomies as $tax ) :
123 if ( $this->post_type_repo->sortOptionEnabled($this->post_type->name, $tax->name, true) ) :
124 $terms = get_terms($tax->name);
125 $out = '<div class="select">';
126 $out .= '<select id="np_taxonomy_' . $tax->name . '" name="' . $tax->name . '" class="nestedpages-sort">';
127 $out .= '<option value="all">' . $tax->labels->all_items . '</option>';
128 foreach ( $terms as $term ) :
129 $out .= '<option value="' . $term->term_id . '"';
130 if ( isset($_GET[$tax->name]) && $_GET[$tax->name] == $term->term_id ) $out .= ' selected';
131 $out .= '>' . $term->name . '</option>';
132 endforeach;
133 $out .= '</select>';
134 $out .= '</div>';
135 echo $out;
136 endif;
137 endforeach;
138 ?>
139 <div class="select">
140 <input type="submit" id="nestedpages-sort" class="button" value="Apply">
141 </div>
142 </form>
143 </div>
144 <?php endif; ?>
145
146
147 <?php if ( $this->post_type->name == 'page' && $this->post_type_repo->categoriesEnabled($this->post_type->name) ) : ?>
148 <div class="np-tools-primary">
149 <form action="<?php echo admin_url('admin-post.php'); ?>" method="post" class="np-tools-sort">
150 <input type="hidden" name="action" value="npCategoryFilter">
151 <input type="hidden" name="page" value="<?php echo esc_url($this->pageURL()); ?>">
152 <div class="select first">
153 <select id="np_category" name="np_category" class="nestedpages-sort">
154 <?php
155 $tax = get_taxonomy('category');
156 $out = '<option value="all">' . __('All ', 'wp-nested-pages') . esc_html($tax->labels->name) . '</option>';
157 $terms = get_terms('category');
158 foreach( $terms as $term ){
159 $out .= '<option value="' . esc_attr($term->term_id) . '"';
160 if ( isset($_GET['category']) && ($_GET['category'] == $term->term_id) ) $out .= ' selected';
161 $out .= '>' . esc_html($term->name) . '</option>';
162 }
163 echo $out;
164 ?>
165 </select>
166 </div>
167 <div class="select">
168 <input type="submit" id="nestedpages-sort" class="button" value="Apply">
169 </div>
170 </form>
171 </div><!-- .np-tools-primary -->
172 <?php endif; ?>
173
174 <div class="np-tools-search">
175 <form action="<?php echo admin_url('admin-post.php'); ?>" method="post">
176 <input type="hidden" name="action" value="npSearch">
177 <input type="hidden" name="posttype" value="<?php echo esc_attr($this->post_type->name); ?>">
178 <input type="hidden" name="page" value="<?php echo esc_url($this->pageURL()); ?>">
179 <?php wp_nonce_field('nestedpages-nonce', 'nonce'); ?>
180 <input type="search" name="search_term" id="nestedpages-search" placeholder="<?php echo esc_attr($this->post_type->labels->search_items); ?>" <?php if ( $this->listing_repo->isSearch() ) echo ' value="' . esc_attr(sanitize_text_field($_GET['search'])) . '"'; ?>>
181 <input type="submit" name="" class="button" value="<?php echo $searchLabel;?>">
182 </form>
183 </div><!-- .np-tools-search -->
184
185
186 </div><!-- .nestedpages-tools -->
187