PluginProbe ʕ •ᴥ•ʔ
Nested Pages / 3.2.15
Nested Pages v3.2.15
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 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 2 days ago list-header.php 4 years ago row-link.php 2 days ago row.php 2 days ago tool-list.php 4 years ago wpml-translations.php 8 years ago
tool-list.php
199 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 <?php if ( $this->status_preference == 'all' ) echo 'active'; ?>"><?php _e('All', 'wp-nested-pages'); ?></a> |
15 </li>
16
17 <li>
18 <a href="#published" class="np-toggle-publish <?php if ( $this->status_preference == 'published' ) echo 'active'; ?>"><?php _e('Published', 'wp-nested-pages'); ?></a> |
19 </li>
20
21 <li>
22 <a href="#draft" class="np-toggle-publish <?php if ( $this->status_preference == 'draft' ) echo 'active'; ?>"><?php _e('Draft', 'wp-nested-pages'); ?></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', 'wp-nested-pages'); ?> </a>
38 <span class="count"><a href="#" class="np-empty-trash" data-posttype="<?php echo esc_attr($this->post_type->name); ?>" data-nestedpages-modal-toggle="np-trash-modal"><?php echo sprintf(__('Empty (%s)', 'wp-nested-pages'), absint($trashedCount)); ?></a></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 echo apply_filters('nestedpages_default_submenu_text', sprintf(__('Default %s', 'wp-nested-pages'),$this->post_type->labels->name), $this->post_type); ?>
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_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 <?php if ( $this->post_type_repo->sortOptionEnabled($this->post_type->name, 'author') ) : ?>
62 <div class="select">
63 <select id="np_sortauthor" name="np_author" class="nestedpages-sort">
64 <?php
65 $out = '<option value="all">' . __('All Authors', 'wp-nested-pages') . '</option>';
66 $users = $this->user->allUsers();
67 foreach( $users as $user ){
68 $out .= '<option value="' . $user->ID . '"';
69 if ( isset($_GET['author']) && ($_GET['author'] == $user->ID) ) $out .= ' selected';
70 $out .= '>' . esc_html($user->display_name) . '</option>';
71 }
72 echo $out;
73 ?>
74 </select>
75 </div>
76 <?php endif; ?>
77 <?php
78 if ( $this->post_type_repo->sortOptionEnabled($this->post_type->name, 'orderby') ) :
79 $default_order_by = $this->post_type_repo->defaultSortOption($this->post_type->name, 'orderby');
80 if ( isset($_GET['orderby']) ) $default_order_by = false;
81 ?>
82 <div class="select">
83 <select id="np_orderby" name="np_orderby" class="nestedpages-sort">
84 <?php
85 $options = array(
86 'menu_order' => __('Menu Order', 'wp-nested-pages'),
87 'date' => __('Date', 'wp-nested-pages'),
88 'title' => __('Title', 'wp-nested-pages')
89 );
90 $out = '<option value="">' . __('Order By', 'wp-nested-pages') . '</option>';
91 foreach ( $options as $key => $option ){
92 $out .= '<option value="' . $key . '"';
93 if ( $default_order_by && $default_order_by == $key ) $out .= ' selected';
94 if ( isset($_GET['orderby']) && ($_GET['orderby'] == $key) ) $out .= ' selected';
95 $out .= '>' . esc_html($option) . '</option>';
96 }
97 echo $out;
98 ?>
99 </select>
100 </div>
101 <?php endif; ?>
102 <?php
103 if ( $this->post_type_repo->sortOptionEnabled($this->post_type->name, 'order') ) :
104 $default_order = $this->post_type_repo->defaultSortOption($this->post_type->name, 'order');
105 if ( isset($_GET['order']) ) $default_order = false;
106 ?>
107 <div class="select">
108 <select id="np_order" name="np_order" class="nestedpages-sort">
109 <?php
110 $options = [
111 'ASC' => __('Ascending', 'wp-nested-pages'),
112 'DESC' => __('Descending', 'wp-nested-pages')
113 ];
114 $out = '';
115 foreach ( $options as $key => $option ){
116 $out .= '<option value="' . esc_attr($key) . '"';
117 if ( $default_order && $default_order == $key ) $out .= ' selected';
118 if ( isset($_GET['order']) && ($_GET['order'] == $key) ) $out .= ' selected';
119 $out .= '>' . esc_html($option) . '</option>';
120 }
121 echo $out;
122 ?>
123 </select>
124 </div>
125 <?php endif; ?>
126 <?php
127 // Taxonomies
128 $taxonomies = array_merge($this->h_taxonomies, $this->f_taxonomies);
129 foreach ( $taxonomies as $tax ) :
130 if ( $this->post_type_repo->sortOptionEnabled($this->post_type->name, $tax->name, true) ) :
131 $terms = get_terms($tax->name);
132 $out = '<div class="select">';
133 $out .= '<select id="np_taxonomy_' . $tax->name . '" name="' . $tax->name . '" class="nestedpages-sort">';
134 $out .= '<option value="all">' . $tax->labels->all_items . '</option>';
135 foreach ( $terms as $term ) :
136 $out .= '<option value="' . $term->term_id . '"';
137 if ( isset($_GET[$tax->name]) && $_GET[$tax->name] == $term->term_id ) $out .= ' selected';
138 $out .= '>' . $term->name . '</option>';
139 endforeach;
140 $out .= '</select>';
141 $out .= '</div>';
142 echo $out;
143 endif;
144 endforeach;
145 ?>
146 <div class="select">
147 <input type="hidden" name="action" value="npListingSort">
148 <input type="hidden" name="page" value="<?php echo $this->pageURL(); ?>">
149 <?php wp_nonce_field('nestedpages-nonce', 'nonce'); ?>
150 <input type="hidden" name="post_type" value="<?php echo esc_attr($this->post_type->name); ?>">
151 <input type="submit" id="nestedpages-sort" class="button" value="<?php echo esc_attr__('Apply', 'wp-nested-pages'); ?>">
152 </div>
153 </form>
154 </div>
155 <?php endif; ?>
156
157
158 <?php if ( $this->post_type->name == 'page' && $this->post_type_repo->categoriesEnabled($this->post_type->name) ) : ?>
159 <div class="np-tools-primary">
160 <form action="<?php echo admin_url('admin-post.php'); ?>" method="post" class="np-tools-sort">
161 <div class="select">
162 <select id="np_category" name="np_category" class="nestedpages-sort">
163 <?php
164 $tax = get_taxonomy('category');
165 $out = '<option value="all">' . __('All ', 'wp-nested-pages') . esc_html($tax->labels->name) . '</option>';
166 $terms = get_terms('category');
167 foreach( $terms as $term ){
168 $out .= '<option value="' . esc_attr($term->term_id) . '"';
169 if ( isset($_GET['category']) && ($_GET['category'] == $term->term_id) ) $out .= ' selected';
170 $out .= '>' . esc_html($term->name) . '</option>';
171 }
172 echo $out;
173 ?>
174 </select>
175 </div>
176 <div class="select">
177 <input type="hidden" name="action" value="npCategoryFilter">
178 <?php wp_nonce_field('nestedpages-nonce', 'nonce'); ?>
179 <input type="hidden" name="page" value="<?php echo esc_url($this->pageURL()); ?>">
180 <input type="submit" id="nestedpages-sort" class="button" value="Apply">
181 </div>
182 </form>
183 </div><!-- .np-tools-primary -->
184 <?php endif; ?>
185
186 <div class="np-tools-search">
187 <form action="<?php echo admin_url('admin-post.php'); ?>" method="post">
188 <input type="hidden" name="action" value="npSearch">
189 <input type="hidden" name="posttype" value="<?php echo esc_attr($this->post_type->name); ?>">
190 <input type="hidden" name="page" value="<?php echo esc_url($this->pageURL()); ?>">
191 <?php wp_nonce_field('nestedpages-nonce', 'nonce'); ?>
192 <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'])) . '"'; ?>>
193 <input type="submit" name="" class="button" value="<?php echo $searchLabel;?>">
194 </form>
195 </div><!-- .np-tools-search -->
196
197
198 </div><!-- .nestedpages-tools -->
199