PluginProbe ʕ •ᴥ•ʔ
Nested Pages / 2.0.1
Nested Pages v2.0.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 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 / listing.php
wp-nested-pages / app / Views Last commit date
forms 8 years ago partials 8 years ago settings 8 years ago listing.php 8 years ago
listing.php
110 lines
1 <?php
2 $wpml_pages = ( $this->integrations->plugins->wpml->installed && $this->integrations->plugins->wpml->isDefaultLanguage()) ? true : false;
3 if ( !$this->integrations->plugins->wpml->installed ) $wpml_pages = true;
4 ?>
5 <div class="wrap nestedpages">
6 <h2 class="nestedpages-listing-title">
7 <?php esc_html_e($this->post_type->labels->name); ?>
8
9 <a href="<?php echo $this->post_type_repo->addNewPostLink($this->post_type->name); ?>" class="add-new-h2">
10 <?php esc_html_e($this->post_type->labels->add_new); ?>
11 </a>
12
13 <?php if ( current_user_can('publish_pages') && !$this->listing_repo->isSearch() && $wpml_pages ) : ?>
14 <a href="#" class="add-new-h2 open-bulk-modal" title="<?php _e('Add Multiple', 'wp-nested-pages'); ?>" data-parentid="0">
15 <?php esc_html_e('Add Multiple', 'wp-nested-pages'); ?>
16 </a>
17 <?php endif; ?>
18
19 <?php if ( current_user_can('publish_pages') && $this->post_type->name == 'page' && !$this->listing_repo->isSearch() && !$this->settings->menusDisabled() && !$this->integrations->plugins->wpml->installed ) : ?>
20 <a href="#" class="add-new-h2 open-redirect-modal" title="<?php _e('Add Link', 'wp-nested-pages'); ?>" data-parentid="0">
21 <?php esc_html_e('Add Link', 'wp-nested-pages'); ?>
22 </a>
23 <?php endif; ?>
24 </h2>
25
26 <?php if ( $this->confirmation->getMessage() ) : ?>
27 <div id="message" class="updated notice is-dismissible"><p><?php echo $this->confirmation->getMessage(); ?></p><button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php esc_html_e('Dismiss this notice.', 'wp-nested-pages'); ?></span></button></div>
28 <?php endif; ?>
29
30 <div data-nestedpages-error class="updated error notice is-dismissible" style="display:none;"><p></p><button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php esc_html_e('Dismiss this notice.', 'wp-nested-pages'); ?></span></button></div>
31
32 <div class="nestedpages-top-toggles">
33 <?php if ( $this->post_type->hierarchical && !$this->listing_repo->isSearch() ) : ?>
34 <a href="#" class="np-btn nestedpages-toggleall" data-toggle="closed"><?php esc_html_e('Expand All', 'wp-nested-pages'); ?></a>
35 <?php endif; ?>
36
37 <?php if ( $this->user->canSortPages() && !$this->listing_repo->isSearch() && !$this->listing_repo->isFiltered() ) : ?>
38 <div class="np-sync-menu-cont" <?php if ( $this->confirmation->getMessage() ) echo 'style="margin-top:2px;"';?>>
39
40 <?php if ( $this->settings->autoPageOrderDisabled() ) : ?>
41 <a href="#" class="np-btn" data-np-manual-order-sync><?php echo __('Sync', 'wp-nested-pages') . ' ' . esc_html($this->post_type->labels->singular_name) . ' ' . __('Order', 'wp-nested-pages'); ?></a>
42 <?php endif; ?>
43
44 <?php
45 $wpml = $this->integrations->plugins->wpml->installed;
46 $primary_language = ( $wpml && $this->integrations->plugins->wpml->isDefaultLanguage() ) ? true : false;
47 if ( !$wpml ) $primary_language = true;
48
49 if ( $this->post_type->name == 'page' &&
50 !$this->settings->hideMenuSync() &&
51 !$this->settings->menusDisabled() &&
52 $primary_language ) :
53 ?>
54
55 <?php if ( !$this->settings->autoMenuDisabled() ) : ?>
56 <label>
57 <input type="checkbox" name="np_sync_menu" class="np-sync-menu" value="sync" <?php if ( get_option('nestedpages_menusync') == 'sync' ) echo 'checked'; ?>/>
58 <?php
59 esc_html_e('Sync Menu', 'wp-nested-pages');
60 if ( $wpml ) echo ' (' . esc_html($this->integrations->plugins->wpml->getCurrentLanguage('name')) . ')';
61 ?>
62 </label>
63 <?php else : ?>
64 <a href="#" class="np-btn" data-np-manual-menu-sync><?php esc_html_e('Sync Menu', 'wp-nested-pages'); ?></a>
65 <?php endif; ?>
66
67
68 <?php endif; ?>
69
70 <?php if ( $wpml && !$primary_language ) echo $this->integrations->plugins->wpml->syncMenusButton(); ?>
71
72 </div>
73 <?php endif; ?>
74
75 <img src="<?php echo NestedPages\Helpers::plugin_url(); ?>/assets/images/spinner-2x.gif" alt="loading" id="nested-loading" />
76 </div><!-- .nestedpages-top-toggles -->
77
78 <?php include(NestedPages\Helpers::view('partials/tool-list')); ?>
79
80 <div id="np-error" class="updated error" style="clear:both;display:none;"></div>
81
82
83 <div class="nestedpages">
84 <?php $this->getPosts(); ?>
85
86 <div class="quick-edit quick-edit-form np-inline-modal" style="display:none;">
87 <?php include( NestedPages\Helpers::view('forms/quickedit-post') ); ?>
88 </div>
89
90 <?php if ( current_user_can('publish_pages') && !$this->integrations->plugins->wpml->installed ) : ?>
91 <div class="quick-edit quick-edit-form-redirect np-inline-modal" style="display:none;">
92 <?php include( NestedPages\Helpers::view('forms/quickedit-link') ); ?>
93 </div>
94
95 <div class="new-child new-child-form np-inline-modal" style="display:none;">
96 <?php include( NestedPages\Helpers::view('forms/new-child') ); ?>
97 </div>
98 <?php endif; ?>
99 </div>
100
101 </div><!-- .wrap -->
102
103 <?php
104 include( NestedPages\Helpers::view('forms/more-options-modal') );
105 include( NestedPages\Helpers::view('forms/empty-trash-modal') );
106 include( NestedPages\Helpers::view('forms/clone-form') );
107 if ( !$this->integrations->plugins->wpml->installed) include( NestedPages\Helpers::view('forms/link-form') );
108 include( NestedPages\Helpers::view('forms/bulk-add') );
109 include( NestedPages\Helpers::view('forms/delete-confirmation-modal') );
110 if ( $this->integrations->plugins->wpml->installed ) include( NestedPages\Helpers::view('partials/wpml-translations') );