Nested Pages - Version 1.6.7

Version Description

  • Multisite superadmins treated as admins (Thanks to Kristoffer Svanmark)
  • Text domain change from v1.6.4 integrated
Download this release

Release Info

Developer kylephillips
Plugin Icon 128x128 Nested Pages
Version 1.6.7
Comparing to
See all releases

Code changes from version 1.6.6 to 1.6.7

Files changed (38) hide show
  1. app/Activation/Dependencies.php +23 -23
  2. app/Bootstrap.php +1 -1
  3. app/Config/Settings.php +2 -2
  4. app/Config/SettingsRepository.php +11 -11
  5. app/Entities/AdminMenu/AdminSubmenu.php +1 -1
  6. app/Entities/Confirmation/LinkDeletedConfirmation.php +1 -1
  7. app/Entities/Confirmation/TrashConfirmation.php +4 -4
  8. app/Entities/Confirmation/TrashRestoredConfirmation.php +2 -2
  9. app/Entities/Post/PostUpdateRepository.php +1 -1
  10. app/Entities/PostType/PostTypeRepository.php +1 -1
  11. app/Entities/PostType/RegisterPostTypes.php +2 -2
  12. app/Entities/User/UserRepository.php +11 -5
  13. app/Form/Listeners/BaseHandler.php +2 -2
  14. app/Form/Listeners/EmptyTrash.php +1 -1
  15. app/Form/Listeners/NewMenuItem.php +3 -3
  16. app/Form/Listeners/QuickEditLink.php +1 -1
  17. app/Form/Listeners/Sort.php +2 -2
  18. app/Form/Listeners/SyncMenu.php +1 -1
  19. app/Form/Validation/Validation.php +7 -7
  20. app/NestedPages.php +1 -1
  21. app/Views/forms/clone-form.php +3 -3
  22. app/Views/forms/delete-confirmation-modal.php +2 -2
  23. app/Views/forms/empty-trash-modal.php +2 -2
  24. app/Views/forms/link-form.php +10 -10
  25. app/Views/forms/new-child.php +6 -6
  26. app/Views/forms/quickedit-link.php +3 -3
  27. app/Views/forms/quickedit-post.php +7 -7
  28. app/Views/listing.php +8 -8
  29. app/Views/partials/bulk-edit.php +6 -6
  30. app/Views/partials/list-header.php +4 -4
  31. app/Views/partials/row-link.php +1 -1
  32. app/Views/partials/row.php +6 -6
  33. app/Views/partials/tool-list.php +11 -11
  34. app/Views/settings/settings-general.php +13 -13
  35. app/Views/settings/settings-posttypes.php +33 -33
  36. app/Views/settings/settings.php +3 -3
  37. nestedpages.php +2 -2
  38. readme.txt +6 -2
app/Activation/Dependencies.php CHANGED
@@ -121,29 +121,29 @@ class Dependencies
121
  }
122
  $localized_data = array(
123
  'np_nonce' => wp_create_nonce( 'nestedpages-nonce' ),
124
- 'expand_text' => __('Expand All', 'nestedpages'),
125
- 'collapse_text' => __('Collapse All', 'nestedpages'),
126
- 'show_hidden' => __('Show Hidden', 'nestedpages'),
127
- 'hide_hidden' => __('Hide Hidden', 'nestedpages'),
128
- 'add_link' => __('Add Link', 'nestedpages'),
129
- 'add_child_link' => __('Add Child Link', 'nestedpages'),
130
- 'title' => __('Title', 'nestedpages'),
131
- 'quick_edit' => __('Quick Edit', 'nestedpages'),
132
- 'page_title' => __('Page Title', 'nestedpages'),
133
- 'view' => __('View', 'nestedpages'),
134
- 'add_child_short' => __('Add Child', 'nestedpages'),
135
- 'add_child' => __('Add Child Page', 'nestedpages'),
136
- 'add_child_pages' => __('Add Child Pages', 'nestedpages'),
137
- 'add' => __('Add', 'nestedpages'),
138
- 'add_page' => __('Add Page', 'nestedpages'),
139
- 'add_pages' => __('Add Pages', 'nestedpages'),
140
- 'add_multiple' => __('Add Multiple', 'nestedpages'),
141
- 'trash_confirm' => __('Are you sure you would like to empty the trash? This action is not reversable.', 'nestedpages'),
142
- 'hidden' => __('Hidden', 'nestedpages'),
143
- 'bulk_actions' => __('Bulk Actions', 'nestedpages'),
144
- 'link_delete_confirmation' => __('Your selection includes link items, which cannot be recovered after deleting. Would you like to continue? (Other items are moved to the trash)', 'nestedpages'),
145
- 'link_delete_confirmation_singular' => __('Are you sure you would like to delete this item? This action is not reversable.', 'nestedpages'),
146
- 'delete' => __('Delete', 'nestedpages'),
147
  'trash_delete_links' => __('Trash Posts and Delete Links'),
148
  'manual_menu_sync' => $this->settings->autoMenuDisabled(),
149
  'manual_order_sync' => $this->settings->autoPageOrderDisabled(),
121
  }
122
  $localized_data = array(
123
  'np_nonce' => wp_create_nonce( 'nestedpages-nonce' ),
124
+ 'expand_text' => __('Expand All', 'wp-nested-pages'),
125
+ 'collapse_text' => __('Collapse All', 'wp-nested-pages'),
126
+ 'show_hidden' => __('Show Hidden', 'wp-nested-pages'),
127
+ 'hide_hidden' => __('Hide Hidden', 'wp-nested-pages'),
128
+ 'add_link' => __('Add Link', 'wp-nested-pages'),
129
+ 'add_child_link' => __('Add Child Link', 'wp-nested-pages'),
130
+ 'title' => __('Title', 'wp-nested-pages'),
131
+ 'quick_edit' => __('Quick Edit', 'wp-nested-pages'),
132
+ 'page_title' => __('Page Title', 'wp-nested-pages'),
133
+ 'view' => __('View', 'wp-nested-pages'),
134
+ 'add_child_short' => __('Add Child', 'wp-nested-pages'),
135
+ 'add_child' => __('Add Child Page', 'wp-nested-pages'),
136
+ 'add_child_pages' => __('Add Child Pages', 'wp-nested-pages'),
137
+ 'add' => __('Add', 'wp-nested-pages'),
138
+ 'add_page' => __('Add Page', 'wp-nested-pages'),
139
+ 'add_pages' => __('Add Pages', 'wp-nested-pages'),
140
+ 'add_multiple' => __('Add Multiple', 'wp-nested-pages'),
141
+ 'trash_confirm' => __('Are you sure you would like to empty the trash? This action is not reversable.', 'wp-nested-pages'),
142
+ 'hidden' => __('Hidden', 'wp-nested-pages'),
143
+ 'bulk_actions' => __('Bulk Actions', 'wp-nested-pages'),
144
+ 'link_delete_confirmation' => __('Your selection includes link items, which cannot be recovered after deleting. Would you like to continue? (Other items are moved to the trash)', 'wp-nested-pages'),
145
+ 'link_delete_confirmation_singular' => __('Are you sure you would like to delete this item? This action is not reversable.', 'wp-nested-pages'),
146
+ 'delete' => __('Delete', 'wp-nested-pages'),
147
  'trash_delete_links' => __('Trash Posts and Delete Links'),
148
  'manual_menu_sync' => $this->settings->autoMenuDisabled(),
149
  'manual_order_sync' => $this->settings->autoPageOrderDisabled(),
app/Bootstrap.php CHANGED
@@ -56,7 +56,7 @@ class Bootstrap
56
  public function addLocalization()
57
  {
58
  load_plugin_textdomain(
59
- 'nestedpages',
60
  false,
61
  dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages' );
62
  }
56
  public function addLocalization()
57
  {
58
  load_plugin_textdomain(
59
+ 'wp-nested-pages',
60
  false,
61
  dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages' );
62
  }
app/Config/Settings.php CHANGED
@@ -63,8 +63,8 @@ class Settings
63
  public function registerSettingsPage()
64
  {
65
  add_options_page(
66
- __('Nested Pages Settings', 'nestedpages'),
67
- __('Nested Pages', 'nestedpages'),
68
  'manage_options',
69
  'nested-pages-settings',
70
  array( $this, 'settingsPage' )
63
  public function registerSettingsPage()
64
  {
65
  add_options_page(
66
+ __('Nested Pages Settings', 'wp-nested-pages'),
67
+ __('Nested Pages', 'wp-nested-pages'),
68
  'manage_options',
69
  'nested-pages-settings',
70
  array( $this, 'settingsPage' )
app/Config/SettingsRepository.php CHANGED
@@ -76,21 +76,21 @@ class SettingsRepository
76
  $post_type_repo = new PostTypeRepository;
77
 
78
  $fields = array(
79
- 'title' => __('Post Title', 'nestedpages'),
80
- 'slug' => __('Slug', 'nestedpages'),
81
- 'date' => __('Post Date', 'nestedpages'),
82
- 'author' => __('Author', 'nestedpages'),
83
- 'status' => __('Post Status', 'nestedpages'),
84
- 'password' => __('Password/Private', 'nestedpages'),
85
- 'allow_comments' => __('Allow Comments', 'nestedpages')
86
  );
87
 
88
  if ( $post_type == 'page' ) {
89
- $fields['template'] = __('Template', 'nestedpages');
90
- $fields['menu_options'] = __('Menu Options', 'nestedpages');
91
  }
92
 
93
- $fields['hide_in_np'] = __('Hide in Nested Pages', 'nestedpages');
94
 
95
  // Taxonomies
96
  $enabled_h_taxonomies = $post_type_repo->getTaxonomies($post_type);
@@ -98,7 +98,7 @@ class SettingsRepository
98
  $enabled_taxonomies = array_merge($enabled_h_taxonomies, $enabled_f_taxonomies);
99
  if ( empty($enabled_taxonomies) ) return $fields;
100
 
101
- $fields['hide_taxonomies'] = __('Taxonomies', 'nestedpages');
102
  $fields['taxonomies'] = array();
103
  foreach($enabled_taxonomies as $taxonomy){
104
  $fields['taxonomies'][$taxonomy->name] = $taxonomy->labels->name;
76
  $post_type_repo = new PostTypeRepository;
77
 
78
  $fields = array(
79
+ 'title' => __('Post Title', 'wp-nested-pages'),
80
+ 'slug' => __('Slug', 'wp-nested-pages'),
81
+ 'date' => __('Post Date', 'wp-nested-pages'),
82
+ 'author' => __('Author', 'wp-nested-pages'),
83
+ 'status' => __('Post Status', 'wp-nested-pages'),
84
+ 'password' => __('Password/Private', 'wp-nested-pages'),
85
+ 'allow_comments' => __('Allow Comments', 'wp-nested-pages')
86
  );
87
 
88
  if ( $post_type == 'page' ) {
89
+ $fields['template'] = __('Template', 'wp-nested-pages');
90
+ $fields['menu_options'] = __('Menu Options', 'wp-nested-pages');
91
  }
92
 
93
+ $fields['hide_in_np'] = __('Hide in Nested Pages', 'wp-nested-pages');
94
 
95
  // Taxonomies
96
  $enabled_h_taxonomies = $post_type_repo->getTaxonomies($post_type);
98
  $enabled_taxonomies = array_merge($enabled_h_taxonomies, $enabled_f_taxonomies);
99
  if ( empty($enabled_taxonomies) ) return $fields;
100
 
101
+ $fields['hide_taxonomies'] = __('Taxonomies', 'wp-nested-pages');
102
  $fields['taxonomies'] = array();
103
  foreach($enabled_taxonomies as $taxonomy){
104
  $fields['taxonomies'][$taxonomy->name] = $taxonomy->labels->name;
app/Entities/AdminMenu/AdminSubmenu.php CHANGED
@@ -72,7 +72,7 @@ class AdminSubmenu
72
  global $submenu;
73
  if ( !$this->post_type_repo->postTypeSetting($this->post_type->name, 'hide_default') ){
74
  $submenu[$this->slug][$c] = array(
75
- __('Default','nestedpages') . ' ' . $this->post_type->labels->name,
76
  'publish_pages',
77
  $this->post_type_repo->editSlug($this->post_type)
78
  );
72
  global $submenu;
73
  if ( !$this->post_type_repo->postTypeSetting($this->post_type->name, 'hide_default') ){
74
  $submenu[$this->slug][$c] = array(
75
+ __('Default', 'wp-nested-pages') . ' ' . $this->post_type->labels->name,
76
  'publish_pages',
77
  $this->post_type_repo->editSlug($this->post_type)
78
  );
app/Entities/Confirmation/LinkDeletedConfirmation.php CHANGED
@@ -9,7 +9,7 @@ class LinkDeletedConfirmation implements ConfirmationInterface
9
  {
10
  public function setMessage()
11
  {
12
- $out = __('Link successfully deleted.', 'nestedpages');
13
  return $out;
14
  }
15
 
9
  {
10
  public function setMessage()
11
  {
12
+ $out = __('Link successfully deleted.', 'wp-nested-pages');
13
  return $out;
14
  }
15
 
app/Entities/Confirmation/TrashConfirmation.php CHANGED
@@ -17,8 +17,8 @@ class TrashConfirmation implements ConfirmationInterface
17
  $links_trashed = ( explode(',', $_GET['link_ids']) );
18
  $number_trashed = count($links_trashed);
19
  $out .= ( $number_trashed > 1 )
20
- ? ' ' . $number_trashed . ' ' . __('Links Removed.', 'nestedpages') . ' '
21
- : ' ' . $number_trashed . ' ' . __('Link Removed.', 'nestedpages') . ' ';
22
  endif;
23
 
24
  // Post(s) Moved to Trash
@@ -27,8 +27,8 @@ class TrashConfirmation implements ConfirmationInterface
27
  $post_type = get_post_type($trashed[0]);
28
  $post_type_object = get_post_type_object($post_type);
29
  $out .= ( count($trashed) > 1 )
30
- ? count($trashed) . ' ' . esc_html($post_type_object->labels->name) . ' ' . __('moved to the Trash.', 'nestedpages')
31
- : '<strong>' . get_the_title($trashed[0]) . ' </strong>' . __('moved to the Trash.', 'nestedpages');
32
  // Undo Link
33
  if ( current_user_can('delete_pages') ) {
34
  $ids = preg_replace( '/[^0-9,]/', '', $_GET['ids'] );
17
  $links_trashed = ( explode(',', $_GET['link_ids']) );
18
  $number_trashed = count($links_trashed);
19
  $out .= ( $number_trashed > 1 )
20
+ ? ' ' . $number_trashed . ' ' . __('Links Removed.', 'wp-nested-pages') . ' '
21
+ : ' ' . $number_trashed . ' ' . __('Link Removed.', 'wp-nested-pages') . ' ';
22
  endif;
23
 
24
  // Post(s) Moved to Trash
27
  $post_type = get_post_type($trashed[0]);
28
  $post_type_object = get_post_type_object($post_type);
29
  $out .= ( count($trashed) > 1 )
30
+ ? count($trashed) . ' ' . esc_html($post_type_object->labels->name) . ' ' . __('moved to the Trash.', 'wp-nested-pages')
31
+ : '<strong>' . get_the_title($trashed[0]) . ' </strong>' . __('moved to the Trash.', 'wp-nested-pages');
32
  // Undo Link
33
  if ( current_user_can('delete_pages') ) {
34
  $ids = preg_replace( '/[^0-9,]/', '', $_GET['ids'] );
app/Entities/Confirmation/TrashRestoredConfirmation.php CHANGED
@@ -11,8 +11,8 @@ class TrashRestoredConfirmation implements ConfirmationInterface
11
  public function setMessage()
12
  {
13
  $untrashed = sanitize_text_field($_GET['untrashed']);
14
- $label = ( intval($untrashed) > 1 ) ? __('items', 'nestedpages') : __('item', 'nestedpages');
15
- $out = $untrashed . ' ' . $label . ' ' . __('restored from trash.', 'nestedpages');
16
  return $out;
17
  }
18
 
11
  public function setMessage()
12
  {
13
  $untrashed = sanitize_text_field($_GET['untrashed']);
14
+ $label = ( intval($untrashed) > 1 ) ? __('items', 'wp-nested-pages') : __('item', 'wp-nested-pages');
15
+ $out = $untrashed . ' ' . $label . ' ' . __('restored from trash.', 'wp-nested-pages');
16
  return $out;
17
  }
18
 
app/Entities/Post/PostUpdateRepository.php CHANGED
@@ -89,7 +89,7 @@ class PostUpdateRepository
89
  );
90
 
91
  if ( isset($data['post_title']) && $data['post_title'] == "" ){
92
- $this->validation->checkEmpty($data['post_title'], __('Title', 'nestedpages'));
93
  } elseif ( isset($data['post_title']) ){
94
  $updated_post['post_title'] = sanitize_text_field($data['post_title']);
95
  }
89
  );
90
 
91
  if ( isset($data['post_title']) && $data['post_title'] == "" ){
92
+ $this->validation->checkEmpty($data['post_title'], __('Title', 'wp-nested-pages'));
93
  } elseif ( isset($data['post_title']) ){
94
  $updated_post['post_title'] = sanitize_text_field($data['post_title']);
95
  }
app/Entities/PostType/PostTypeRepository.php CHANGED
@@ -314,7 +314,7 @@ class PostTypeRepository
314
  */
315
  public function getSubmenuText($post_type)
316
  {
317
- return ( $post_type->hierarchical ) ? __('Nested View', 'nestedpages') : __('Sort View', 'nestedpages');
318
  }
319
 
320
  /**
314
  */
315
  public function getSubmenuText($post_type)
316
  {
317
+ return ( $post_type->hierarchical ) ? __('Nested View', 'wp-nested-pages') : __('Sort View', 'wp-nested-pages');
318
  }
319
 
320
  /**
app/Entities/PostType/RegisterPostTypes.php CHANGED
@@ -19,8 +19,8 @@ class RegisterPostTypes
19
  public function registerRedirects()
20
  {
21
  $labels = array(
22
- 'name' => __('Redirects', 'nestedpages'),
23
- 'singular_name' => __('Redirect', 'nestedpages'),
24
  'add_new_item'=> 'Add Redirect',
25
  'edit_item' => 'Edit Redirect',
26
  'view_item' => 'View Redirect'
19
  public function registerRedirects()
20
  {
21
  $labels = array(
22
+ 'name' => __('Redirects', 'wp-nested-pages'),
23
+ 'singular_name' => __('Redirect', 'wp-nested-pages'),
24
  'add_new_item'=> 'Add Redirect',
25
  'edit_item' => 'Edit Redirect',
26
  'view_item' => 'View Redirect'
app/Entities/User/UserRepository.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
 
3
  namespace NestedPages\Entities\User;
4
 
@@ -6,7 +6,7 @@ namespace NestedPages\Entities\User;
6
  * User Repository
7
  * @since 1.1.7
8
  */
9
- class UserRepository
10
  {
11
 
12
  /**
@@ -17,6 +17,12 @@ class UserRepository
17
  public function getRoles()
18
  {
19
  global $current_user;
 
 
 
 
 
 
20
  return $current_user->roles;
21
  }
22
 
@@ -54,7 +60,7 @@ class UserRepository
54
  $roles = $this->getRoles();
55
  $cansort = get_option('nestedpages_allowsorting', array());
56
  if ( $cansort == "" ) $cansort = array();
57
-
58
  foreach($roles as $role){
59
  if ( $role == 'administrator' ) return true;
60
  if ( in_array($role, $cansort) ) return true;
@@ -66,7 +72,7 @@ class UserRepository
66
  * Get an array of all users/ids
67
  * @since 1.3.0
68
  * @return array
69
- */
70
  public function allUsers()
71
  {
72
  $users = get_users(array(
@@ -99,4 +105,4 @@ class UserRepository
99
  );
100
  }
101
 
102
- }
1
+ <?php
2
 
3
  namespace NestedPages\Entities\User;
4
 
6
  * User Repository
7
  * @since 1.1.7
8
  */
9
+ class UserRepository
10
  {
11
 
12
  /**
17
  public function getRoles()
18
  {
19
  global $current_user;
20
+
21
+ // If current user is superadmin (WP Multisite) add administrator to the roles array
22
+ if (function_exists('is_multisite') && is_multisite() && is_super_admin()) {
23
+ $current_user->roles[] = 'administrator';
24
+ }
25
+
26
  return $current_user->roles;
27
  }
28
 
60
  $roles = $this->getRoles();
61
  $cansort = get_option('nestedpages_allowsorting', array());
62
  if ( $cansort == "" ) $cansort = array();
63
+
64
  foreach($roles as $role){
65
  if ( $role == 'administrator' ) return true;
66
  if ( in_array($role, $cansort) ) return true;
72
  * Get an array of all users/ids
73
  * @since 1.3.0
74
  * @return array
75
+ */
76
  public function allUsers()
77
  {
78
  $users = get_users(array(
105
  );
106
  }
107
 
108
+ }
app/Form/Listeners/BaseHandler.php CHANGED
@@ -77,7 +77,7 @@ abstract class BaseHandler
77
  protected function validateNonce()
78
  {
79
  if ( ! wp_verify_nonce( $this->nonce, 'nestedpages-nonce' ) ){
80
- $this->response = array( 'status' => 'error', 'message' => __('Incorrect Form Field', 'nestedpages') );
81
  $this->sendResponse();
82
  die();
83
  }
@@ -110,7 +110,7 @@ abstract class BaseHandler
110
  {
111
  $this->response = array(
112
  'status' => 'error',
113
- 'message' => __('There was an error updating the page.', 'nestedpages')
114
  );
115
  $this->sendResponse();
116
  }
77
  protected function validateNonce()
78
  {
79
  if ( ! wp_verify_nonce( $this->nonce, 'nestedpages-nonce' ) ){
80
+ $this->response = array( 'status' => 'error', 'message' => __('Incorrect Form Field', 'wp-nested-pages') );
81
  $this->sendResponse();
82
  die();
83
  }
110
  {
111
  $this->response = array(
112
  'status' => 'error',
113
+ 'message' => __('There was an error updating the page.', 'wp-nested-pages')
114
  );
115
  $this->sendResponse();
116
  }
app/Form/Listeners/EmptyTrash.php CHANGED
@@ -16,7 +16,7 @@ class EmptyTrash extends BaseHandler
16
  if ( $this->post_repo->emptyTrash($_POST['posttype']) ){
17
  return wp_send_json(array(
18
  'status'=>'success',
19
- 'message'=> __('Trash successfully emptied.')
20
  ));
21
  }
22
  $this->sendErrorResponse();
16
  if ( $this->post_repo->emptyTrash($_POST['posttype']) ){
17
  return wp_send_json(array(
18
  'status'=>'success',
19
+ 'message'=> __('Trash successfully emptied.', 'wp-nested-pages')
20
  ));
21
  }
22
  $this->sendErrorResponse();
app/Form/Listeners/NewMenuItem.php CHANGED
@@ -24,8 +24,8 @@ class NewMenuItem extends BaseHandler
24
  */
25
  private function validateFields()
26
  {
27
- if ( $_POST['menuType'] == 'custom' && $_POST['navigationLabel'] == "" ) return wp_send_json(array('status' => 'error', 'message' => __('Custom Links must have a label.', 'nestedpages')));
28
- if ( $_POST['menuType'] == 'custom' && $_POST['url'] == "" ) return wp_send_json(array('status' => 'error', 'message' => __('Please provide a valid URL.', 'nestedpages')));
29
  }
30
 
31
  /**
@@ -44,7 +44,7 @@ class NewMenuItem extends BaseHandler
44
 
45
  $this->response = array(
46
  'status' => 'success',
47
- 'message' => __('Link successfully updated.', 'nestedpages'),
48
  'post_data' => $this->data['post']
49
  );
50
  }
24
  */
25
  private function validateFields()
26
  {
27
+ if ( $_POST['menuType'] == 'custom' && $_POST['navigationLabel'] == "" ) return wp_send_json(array('status' => 'error', 'message' => __('Custom Links must have a label.', 'wp-nested-pages')));
28
+ if ( $_POST['menuType'] == 'custom' && $_POST['url'] == "" ) return wp_send_json(array('status' => 'error', 'message' => __('Please provide a valid URL.', 'wp-nested-pages')));
29
  }
30
 
31
  /**
44
 
45
  $this->response = array(
46
  'status' => 'success',
47
+ 'message' => __('Link successfully updated.', 'wp-nested-pages'),
48
  'post_data' => $this->data['post']
49
  );
50
  }
app/Form/Listeners/QuickEditLink.php CHANGED
@@ -27,7 +27,7 @@ class QuickEditLink extends BaseHandler
27
  $this->addData();
28
  $this->response = array(
29
  'status' => 'success',
30
- 'message' => __('Link successfully updated.', 'nestedpages'),
31
  'post_data' => $this->data
32
  );
33
  }
27
  $this->addData();
28
  $this->response = array(
29
  'status' => 'success',
30
+ 'message' => __('Link successfully updated.', 'wp-nested-pages'),
31
  'post_data' => $this->data
32
  );
33
  }
app/Form/Listeners/Sort.php CHANGED
@@ -26,9 +26,9 @@ class Sort extends BaseHandler
26
  $posts = $this->data['list'];
27
  $order = $this->post_update_repo->updateOrder($posts);
28
  if ( $order ){
29
- $this->response = array('status' => 'success', 'message' => __('Page order successfully updated.','nestedpages') );
30
  } else {
31
- $this->response = array('status'=>'error', 'message'=> __('There was an error updating the page order.','nestedpages') );
32
  }
33
  }
34
 
26
  $posts = $this->data['list'];
27
  $order = $this->post_update_repo->updateOrder($posts);
28
  if ( $order ){
29
+ $this->response = array('status' => 'success', 'message' => __('Page order successfully updated.','wp-nested-pages') );
30
  } else {
31
+ $this->response = array('status'=>'error', 'message'=> __('There was an error updating the page order.','wp-nested-pages') );
32
  }
33
  }
34
 
app/Form/Listeners/SyncMenu.php CHANGED
@@ -33,7 +33,7 @@ class SyncMenu extends BaseHandler
33
  {
34
  update_option('nestedpages_menusync', 'sync');
35
  $this->syncMenu();
36
- $this->response = array('status'=>'success', 'message'=> __('Menu sync enabled.'));
37
  }
38
 
39
  }
33
  {
34
  update_option('nestedpages_menusync', 'sync');
35
  $this->syncMenu();
36
+ $this->response = array('status'=>'success', 'message'=> __('Menu sync enabled.', 'wp-nested-pages'));
37
  }
38
 
39
  }
app/Form/Validation/Validation.php CHANGED
@@ -131,7 +131,7 @@ class Validation
131
  {
132
  wp_send_json(array(
133
  'status' => 'error',
134
- 'message' => __('Please provide a valid date.', 'nestedpages')
135
  ));
136
  die();
137
  }
@@ -142,10 +142,10 @@ class Validation
142
  public function validateRedirect($data)
143
  {
144
  if ( (!isset($data['np_link_title'])) || ($data['np_link_title'] == "") ){
145
- return wp_send_json(array('status' => 'error', 'message' => __('Please provide a menu title.', 'nestedpages') ));
146
  }
147
  if ( (!isset($data['np_link_content'])) || ($data['np_link_content'] == "") ){
148
- return wp_send_json(array('status' => 'error', 'message' => __('Please provide a valid URL.', 'nestedpages') ));
149
  }
150
  }
151
 
@@ -155,7 +155,7 @@ class Validation
155
  public function checkEmpty($var, $title)
156
  {
157
  if ( $var == "" ){
158
- $message = __('Please provide a ', 'nestedpages') . $title;
159
  return wp_send_json(array('status' => 'error', 'message' => $message));
160
  die();
161
  }
@@ -168,14 +168,14 @@ class Validation
168
  {
169
  // Check for Parent ID
170
  if ( (!isset($data['parent_id'])) || (!is_numeric($data['parent_id'])) ){
171
- $message = __('A valid parent page was not provided.', 'nestedpages');
172
  return wp_send_json(array('status' => 'error', 'message' => $message));
173
  die();
174
  }
175
 
176
  // Make sure there's at least one page
177
  if ( !isset($data['post_title']) ){
178
- $message = __('Please provide at least one page title.', 'nestedpages');
179
  return wp_send_json(array('status' => 'error', 'message' => $message));
180
  die();
181
  }
@@ -183,7 +183,7 @@ class Validation
183
  // Page fields cannot be blank
184
  foreach ( $data['post_title'] as $title ){
185
  if ( $title == "" ){
186
- $message = __('Page titles cannot be blank.', 'nestedpages');
187
  return wp_send_json(array('status' => 'error', 'message' => $message));
188
  die();
189
  }
131
  {
132
  wp_send_json(array(
133
  'status' => 'error',
134
+ 'message' => __('Please provide a valid date.', 'wp-nested-pages')
135
  ));
136
  die();
137
  }
142
  public function validateRedirect($data)
143
  {
144
  if ( (!isset($data['np_link_title'])) || ($data['np_link_title'] == "") ){
145
+ return wp_send_json(array('status' => 'error', 'message' => __('Please provide a menu title.', 'wp-nested-pages') ));
146
  }
147
  if ( (!isset($data['np_link_content'])) || ($data['np_link_content'] == "") ){
148
+ return wp_send_json(array('status' => 'error', 'message' => __('Please provide a valid URL.', 'wp-nested-pages') ));
149
  }
150
  }
151
 
155
  public function checkEmpty($var, $title)
156
  {
157
  if ( $var == "" ){
158
+ $message = __('Please provide a ', 'wp-nested-pages') . $title;
159
  return wp_send_json(array('status' => 'error', 'message' => $message));
160
  die();
161
  }
168
  {
169
  // Check for Parent ID
170
  if ( (!isset($data['parent_id'])) || (!is_numeric($data['parent_id'])) ){
171
+ $message = __('A valid parent page was not provided.', 'wp-nested-pages');
172
  return wp_send_json(array('status' => 'error', 'message' => $message));
173
  die();
174
  }
175
 
176
  // Make sure there's at least one page
177
  if ( !isset($data['post_title']) ){
178
+ $message = __('Please provide at least one page title.', 'wp-nested-pages');
179
  return wp_send_json(array('status' => 'error', 'message' => $message));
180
  die();
181
  }
183
  // Page fields cannot be blank
184
  foreach ( $data['post_title'] as $title ){
185
  if ( $title == "" ){
186
+ $message = __('Page titles cannot be blank.', 'wp-nested-pages');
187
  return wp_send_json(array('status' => 'error', 'message' => $message));
188
  die();
189
  }
app/NestedPages.php CHANGED
@@ -12,7 +12,7 @@ class NestedPages
12
  $np_env = 'live';
13
 
14
  global $np_version;
15
- $np_version = '1.6.6';
16
 
17
  if ( is_admin() ) $app = new NestedPages\Bootstrap;
18
  // if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
12
  $np_env = 'live';
13
 
14
  global $np_version;
15
+ $np_version = '1.6.7';
16
 
17
  if ( is_admin() ) $app = new NestedPages\Bootstrap;
18
  // if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
app/Views/forms/clone-form.php CHANGED
@@ -6,12 +6,12 @@
6
  <div class="np-modal fade nestedpages np-modal-form" id="np-clone-modal">
7
  <div class="modal-dialog">
8
  <div class="modal-content clone-modal">
9
- <h3><?php _e('Clone', 'nestedpages'); ?> <span data-clone-parent></span></h3>
10
 
11
  <div class="modal-body">
12
 
13
  <div class="form-control">
14
- <label for="clone-quantity"><?php _e('Number of Copies', 'nestedpages'); ?></label>
15
  <select id="clone-quantity" data-clone-quantity>
16
  <option value="1" selected="">1</option>
17
  <?php
@@ -62,7 +62,7 @@
62
  <?php _e('Cancel'); ?>
63
  </button>
64
  <a accesskey="s" class="button-primary alignright" data-confirm-clone>
65
- <?php _e( 'Clone', 'nestedpages' ); ?>
66
  </a>
67
  <span class="np-qe-loading np-link-loading" data-clone-loading></span>
68
  </div>
6
  <div class="np-modal fade nestedpages np-modal-form" id="np-clone-modal">
7
  <div class="modal-dialog">
8
  <div class="modal-content clone-modal">
9
+ <h3><?php _e('Clone', 'wp-nested-pages'); ?> <span data-clone-parent></span></h3>
10
 
11
  <div class="modal-body">
12
 
13
  <div class="form-control">
14
+ <label for="clone-quantity"><?php _e('Number of Copies', 'wp-nested-pages'); ?></label>
15
  <select id="clone-quantity" data-clone-quantity>
16
  <option value="1" selected="">1</option>
17
  <?php
62
  <?php _e('Cancel'); ?>
63
  </button>
64
  <a accesskey="s" class="button-primary alignright" data-confirm-clone>
65
+ <?php _e( 'Clone', 'wp-nested-pages' ); ?>
66
  </a>
67
  <span class="np-qe-loading np-link-loading" data-clone-loading></span>
68
  </div>
app/Views/forms/delete-confirmation-modal.php CHANGED
@@ -8,8 +8,8 @@
8
  <div class="modal-content">
9
  <div class="modal-body">
10
  <p data-np-link-delete-text></p>
11
- <a href="#" class="np-cancel-trash button modal-close" data-dismiss="modal"><?php _e('Cancel', 'nestedpages'); ?></a>
12
- <a href="#" class="button-primary" data-delete-confirmation><?php _e('Delete', 'nestedpages'); ?></a>
13
  </div>
14
  </div><!-- /.modal-content -->
15
  </div><!-- /.modal-dialog -->
8
  <div class="modal-content">
9
  <div class="modal-body">
10
  <p data-np-link-delete-text></p>
11
+ <a href="#" class="np-cancel-trash button modal-close" data-dismiss="modal"><?php _e('Cancel', 'wp-nested-pages'); ?></a>
12
+ <a href="#" class="button-primary" data-delete-confirmation><?php _e('Delete', 'wp-nested-pages'); ?></a>
13
  </div>
14
  </div><!-- /.modal-content -->
15
  </div><!-- /.modal-dialog -->
app/Views/forms/empty-trash-modal.php CHANGED
@@ -8,8 +8,8 @@
8
  <div class="modal-content">
9
  <div class="modal-body">
10
  <p>Are you sure you would like to empty the trash? This action is not reversable.</p>
11
- <a href="#" class="np-cancel-trash button modal-close" data-dismiss="modal"><?php _e('Cancel', 'nestedpages'); ?></a>
12
- <a href="#" class="np-trash-confirm button-primary"><?php _e('Empty Trash', 'nestedpages'); ?></a>
13
  <input type="hidden" id="np-trash-posttype" value="<?php echo esc_attr($this->post_type->name); ?>">
14
  </div>
15
  </div><!-- /.modal-content -->
8
  <div class="modal-content">
9
  <div class="modal-body">
10
  <p>Are you sure you would like to empty the trash? This action is not reversable.</p>
11
+ <a href="#" class="np-cancel-trash button modal-close" data-dismiss="modal"><?php _e('Cancel', 'wp-nested-pages'); ?></a>
12
+ <a href="#" class="np-trash-confirm button-primary"><?php _e('Empty Trash', 'wp-nested-pages'); ?></a>
13
  <input type="hidden" id="np-trash-posttype" value="<?php echo esc_attr($this->post_type->name); ?>">
14
  </div>
15
  </div><!-- /.modal-content -->
app/Views/forms/link-form.php CHANGED
@@ -15,7 +15,7 @@ $can_publish = current_user_can( $post_type_object->cap->publish_posts );
15
  <div class="np-menu-type-selection">
16
  <ul data-np-menu-accordion>
17
 
18
- <li><a href="#" class="np-custom-link" data-np-menu-object="custom" data-np-menu-type="custom" data-np-menu-objectid="" data-np-permalink="" data-np-menu-selection><?php _e('Custom Link', 'nestedpages'); ?></a></li>
19
 
20
  <?php
21
  // Post Types
@@ -24,7 +24,7 @@ $can_publish = current_user_can( $post_type_object->cap->publish_posts );
24
  if ( !$recent_posts ) continue;
25
  $out = '<li><a href="#" data-np-menu-accordion-item>' . esc_html($type->labels->name) . '</a>';
26
  $out .= '<ul>';
27
- $out .= '<li class="np-menu-search"><input type="text" data-np-menu-search data-search-type="post_type" data-search-object="' . esc_attr($name) . '" placeholder="' . __('Search', 'nestedpages') . ' ' . esc_attr($type->labels->name) . '" /><div class="np-menu-search-loading"></div><div class="np-menu-search-noresults">' . __('No Results', 'nestedpages') . '</div></li>';
28
  foreach ( $recent_posts as $post ){
29
  $out .= '<li data-default-result><a href="#" data-np-menu-object="' . esc_attr($name) . '" data-np-menu-type="post_type" data-np-menu-objectid="' . esc_attr($post->ID) . '" data-np-permalink="' . get_the_permalink($post->ID) . '" data-np-object-name="' . esc_attr($type->labels->singular_name) . '" data-np-menu-selection>' . esc_html($post->post_title) . '</a></li>';
30
  }
@@ -41,7 +41,7 @@ $can_publish = current_user_can( $post_type_object->cap->publish_posts );
41
  if ( !$terms ) continue;
42
  $out = '<li><a href="#" data-np-menu-accordion-item>' . esc_html($taxonomy->labels->name) . '</a>';
43
  $out .= '<ul>';
44
- $out .= '<li class="np-menu-search"><input type="text" data-np-menu-search data-search-type="taxonomy" data-search-object="' . esc_attr($name) . '" placeholder="' . __('Search', 'nestedpages') . ' ' . esc_attr($taxonomy->labels->name) . '" /><div class="np-menu-search-loading"></div><div class="np-menu-search-noresults">' . __('No Results', 'nestedpages') . '</div></li>';
45
  foreach ( $terms as $term ){
46
  $out .= '<li data-default-result><a href="#" data-np-menu-object="' . esc_attr($name) . '" data-np-menu-type="taxonomy" data-np-menu-objectid="' . esc_attr($term->term_id) . '" data-np-permalink="' . esc_attr(get_term_link($term)) . '" data-np-object-name="' . esc_attr($taxonomy->labels->name) . '" data-np-menu-selection>' . esc_html($term->name) . '</a></li>';
47
  }
@@ -55,29 +55,29 @@ $can_publish = current_user_can( $post_type_object->cap->publish_posts );
55
  </div><!-- .np-menu-type-selection -->
56
  <div class="np-menu-link-object">
57
  <div class="np-menu-link-object-placeholder">
58
- <?php _e('Select an item', 'nestedpages'); ?>
59
  </div>
60
  <div class="np-menu-link-details" style="display:none;">
61
  <h3><span data-np-menu-title></span> <em></em></h3>
62
  <div class="original-link">
63
- <?php _e('Original', 'nestedpages'); ?>: <span data-np-original-link></span>
64
  </div>
65
  <div class="np-quickedit-error" data-np-error style="clear:both;display:none;"></div>
66
  <div class="fields">
67
  <p data-np-menu-url-cont style="display:none;">
68
- <label><?php _e('URL', 'nestedpages'); ?></label>
69
  <input type="text" name="url" data-np-menu-url />
70
  </p>
71
  <p>
72
- <label><?php _e('Navigation Label', 'nestedpages'); ?></label>
73
  <input type="text" name="navigationLabel" data-np-menu-navigation-label />
74
  </p>
75
  <p>
76
- <label><?php _e('Title Attribute', 'nestedpages'); ?></label>
77
  <input type="text" name="titleAttribute" data-np-menu-title-attr />
78
  </p>
79
  <p>
80
- <label><?php _e('CSS Classes (optional)', 'nestedpages'); ?></label>
81
  <input type="text" name="cssClasses" data-np-menu-css-classes />
82
  </p>
83
  <?php if ( $this->user->canSortPages() ) : // Menu Options Button ?>
@@ -102,7 +102,7 @@ $can_publish = current_user_can( $post_type_object->cap->publish_posts );
102
  </button>
103
 
104
  <a accesskey="s" class="button-primary" data-np-save-link style="display:none;float:right;">
105
- <?php _e( 'Add', 'nestedpages' ); ?>
106
  </a>
107
  <span class="np-qe-loading"></span>
108
 
15
  <div class="np-menu-type-selection">
16
  <ul data-np-menu-accordion>
17
 
18
+ <li><a href="#" class="np-custom-link" data-np-menu-object="custom" data-np-menu-type="custom" data-np-menu-objectid="" data-np-permalink="" data-np-menu-selection><?php _e('Custom Link', 'wp-nested-pages'); ?></a></li>
19
 
20
  <?php
21
  // Post Types
24
  if ( !$recent_posts ) continue;
25
  $out = '<li><a href="#" data-np-menu-accordion-item>' . esc_html($type->labels->name) . '</a>';
26
  $out .= '<ul>';
27
+ $out .= '<li class="np-menu-search"><input type="text" data-np-menu-search data-search-type="post_type" data-search-object="' . esc_attr($name) . '" placeholder="' . __('Search', 'wp-nested-pages') . ' ' . esc_attr($type->labels->name) . '" /><div class="np-menu-search-loading"></div><div class="np-menu-search-noresults">' . __('No Results', 'wp-nested-pages') . '</div></li>';
28
  foreach ( $recent_posts as $post ){
29
  $out .= '<li data-default-result><a href="#" data-np-menu-object="' . esc_attr($name) . '" data-np-menu-type="post_type" data-np-menu-objectid="' . esc_attr($post->ID) . '" data-np-permalink="' . get_the_permalink($post->ID) . '" data-np-object-name="' . esc_attr($type->labels->singular_name) . '" data-np-menu-selection>' . esc_html($post->post_title) . '</a></li>';
30
  }
41
  if ( !$terms ) continue;
42
  $out = '<li><a href="#" data-np-menu-accordion-item>' . esc_html($taxonomy->labels->name) . '</a>';
43
  $out .= '<ul>';
44
+ $out .= '<li class="np-menu-search"><input type="text" data-np-menu-search data-search-type="taxonomy" data-search-object="' . esc_attr($name) . '" placeholder="' . __('Search', 'wp-nested-pages') . ' ' . esc_attr($taxonomy->labels->name) . '" /><div class="np-menu-search-loading"></div><div class="np-menu-search-noresults">' . __('No Results', 'wp-nested-pages') . '</div></li>';
45
  foreach ( $terms as $term ){
46
  $out .= '<li data-default-result><a href="#" data-np-menu-object="' . esc_attr($name) . '" data-np-menu-type="taxonomy" data-np-menu-objectid="' . esc_attr($term->term_id) . '" data-np-permalink="' . esc_attr(get_term_link($term)) . '" data-np-object-name="' . esc_attr($taxonomy->labels->name) . '" data-np-menu-selection>' . esc_html($term->name) . '</a></li>';
47
  }
55
  </div><!-- .np-menu-type-selection -->
56
  <div class="np-menu-link-object">
57
  <div class="np-menu-link-object-placeholder">
58
+ <?php _e('Select an item', 'wp-nested-pages'); ?>
59
  </div>
60
  <div class="np-menu-link-details" style="display:none;">
61
  <h3><span data-np-menu-title></span> <em></em></h3>
62
  <div class="original-link">
63
+ <?php _e('Original', 'wp-nested-pages'); ?>: <span data-np-original-link></span>
64
  </div>
65
  <div class="np-quickedit-error" data-np-error style="clear:both;display:none;"></div>
66
  <div class="fields">
67
  <p data-np-menu-url-cont style="display:none;">
68
+ <label><?php _e('URL', 'wp-nested-pages'); ?></label>
69
  <input type="text" name="url" data-np-menu-url />
70
  </p>
71
  <p>
72
+ <label><?php _e('Navigation Label', 'wp-nested-pages'); ?></label>
73
  <input type="text" name="navigationLabel" data-np-menu-navigation-label />
74
  </p>
75
  <p>
76
+ <label><?php _e('Title Attribute', 'wp-nested-pages'); ?></label>
77
  <input type="text" name="titleAttribute" data-np-menu-title-attr />
78
  </p>
79
  <p>
80
+ <label><?php _e('CSS Classes (optional)', 'wp-nested-pages'); ?></label>
81
  <input type="text" name="cssClasses" data-np-menu-css-classes />
82
  </p>
83
  <?php if ( $this->user->canSortPages() ) : // Menu Options Button ?>
102
  </button>
103
 
104
  <a accesskey="s" class="button-primary" data-np-save-link style="display:none;float:right;">
105
+ <?php _e( 'Add', 'wp-nested-pages' ); ?>
106
  </a>
107
  <span class="np-qe-loading"></span>
108
 
app/Views/forms/new-child.php CHANGED
@@ -4,7 +4,7 @@
4
  ?>
5
  <form method="get" action="" class="np-new-child-form">
6
  <div class="form-interior">
7
- <h3><strong><?php _e('Add Child', 'nestedpages'); ?></strong><span class="parent_name"></span></h3>
8
 
9
  <div class="np-quickedit-error" style="clear:both;display:none;"></div>
10
 
@@ -18,14 +18,14 @@
18
  <div class="form-control new-child-row">
19
  <label><?php _e( 'Title' ); ?></label>
20
  <div>
21
- <input type="text" name="post_title[]" class="np_title" placeholder="<?php _e('Title', 'nestedpages'); ?>" value="" tabindex="1" />
22
  <a href="#" class="button-secondary np-remove-child">-</a>
23
  </div>
24
  </div>
25
  </li>
26
  </ol>
27
 
28
- <a href="#" class="add-new-child-row button-primary" style="clear:both;"><?php _e('+', 'nestedpages'); ?></a>
29
  </div><!-- .left -->
30
 
31
 
@@ -80,7 +80,7 @@
80
  <div class="form-control full checkbox">
81
  <label>
82
  <input type="checkbox" name="nav_status" class="np_nav_status" value="hide" />
83
- <span class="checkbox-title"><?php _e( 'Hide in Nav Menu', 'nestedpages' ); ?></span>
84
  </label>
85
  </div>
86
  <?php endif; ?>
@@ -99,10 +99,10 @@
99
  <?php _e( 'Cancel' ); ?>
100
  </a>
101
  <a accesskey="s" href="#" class="button-primary np-save-newchild alignright" style="margin-left:10px;">
102
- <?php _e( 'Add', 'nestedpages' ); ?>
103
  </a>
104
  <a href="#" class="button-secondary np-save-newchild add-edit alignright">
105
- <?php _e( 'Add & Edit', 'nestedpages' ); ?>
106
  </a>
107
  <span class="np-qe-loading"></span>
108
  </div>
4
  ?>
5
  <form method="get" action="" class="np-new-child-form">
6
  <div class="form-interior">
7
+ <h3><strong><?php _e('Add Child', 'wp-nested-pages'); ?></strong><span class="parent_name"></span></h3>
8
 
9
  <div class="np-quickedit-error" style="clear:both;display:none;"></div>
10
 
18
  <div class="form-control new-child-row">
19
  <label><?php _e( 'Title' ); ?></label>
20
  <div>
21
+ <input type="text" name="post_title[]" class="np_title" placeholder="<?php _e('Title', 'wp-nested-pages'); ?>" value="" tabindex="1" />
22
  <a href="#" class="button-secondary np-remove-child">-</a>
23
  </div>
24
  </div>
25
  </li>
26
  </ol>
27
 
28
+ <a href="#" class="add-new-child-row button-primary" style="clear:both;"><?php _e('+', 'wp-nested-pages'); ?></a>
29
  </div><!-- .left -->
30
 
31
 
80
  <div class="form-control full checkbox">
81
  <label>
82
  <input type="checkbox" name="nav_status" class="np_nav_status" value="hide" />
83
+ <span class="checkbox-title"><?php _e( 'Hide in Nav Menu', 'wp-nested-pages' ); ?></span>
84
  </label>
85
  </div>
86
  <?php endif; ?>
99
  <?php _e( 'Cancel' ); ?>
100
  </a>
101
  <a accesskey="s" href="#" class="button-primary np-save-newchild alignright" style="margin-left:10px;">
102
+ <?php _e( 'Add', 'wp-nested-pages' ); ?>
103
  </a>
104
  <a href="#" class="button-secondary np-save-newchild add-edit alignright">
105
+ <?php _e( 'Add & Edit', 'wp-nested-pages' ); ?>
106
  </a>
107
  <span class="np-qe-loading"></span>
108
  </div>
app/Views/forms/quickedit-link.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  <form method="get" action="">
7
  <div class="form-interior">
8
- <h3><?php _e('Link', 'nestedpages'); ?></h3>
9
 
10
  <div class="np-quickedit-error" style="clear:both;display:none;"></div>
11
 
@@ -51,13 +51,13 @@
51
  <div class="comments">
52
  <label>
53
  <input type="checkbox" name="nav_status" class="np_nav_status" value="hide" />
54
- <span class="checkbox-title"><?php _e( 'Hide in Nav Menu', 'nestedpages' ); ?></span>
55
  </label>
56
  </div>
57
  <div class="comments">
58
  <label>
59
  <input type="checkbox" name="nested_pages_status" class="np_status" value="hide" />
60
- <span class="checkbox-title"><?php _e( 'Hide in Nested Pages', 'nestedpages' ); ?></span>
61
  </label>
62
  </div>
63
  <div class="comments">
5
 
6
  <form method="get" action="">
7
  <div class="form-interior">
8
+ <h3><?php _e('Link', 'wp-nested-pages'); ?></h3>
9
 
10
  <div class="np-quickedit-error" style="clear:both;display:none;"></div>
11
 
51
  <div class="comments">
52
  <label>
53
  <input type="checkbox" name="nav_status" class="np_nav_status" value="hide" />
54
+ <span class="checkbox-title"><?php _e( 'Hide in Nav Menu', 'wp-nested-pages' ); ?></span>
55
  </label>
56
  </div>
57
  <div class="comments">
58
  <label>
59
  <input type="checkbox" name="nested_pages_status" class="np_status" value="hide" />
60
+ <span class="checkbox-title"><?php _e( 'Hide in Nested Pages', 'wp-nested-pages' ); ?></span>
61
  </label>
62
  </div>
63
  <div class="comments">
app/Views/forms/quickedit-post.php CHANGED
@@ -36,11 +36,11 @@
36
  <label><?php _e( 'Date' ); ?></label>
37
  <div class="datetime">
38
  <input type="text" name="np_date" class="np_datepicker" value="" />
39
- <span><?php _e('@', 'nestedpages'); ?></span>
40
  <div class="np-time-container">
41
  <select name="np_ampm" class="np_ampm">
42
- <option value="am"><?php _e('am', 'nestedpages'); ?></option>
43
- <option value="pm"><?php _e('pm', 'nestedpages'); ?></option>
44
  </select>
45
  <input type="text" name="np_time" class="np_time" value="" />
46
  </div>
@@ -135,18 +135,18 @@
135
  <div class="comments">
136
  <label>
137
  <input type="checkbox" name="nested_pages_status" class="np_status" value="hide" />
138
- <span class="checkbox-title"><?php _e( 'Hide in Nested Pages', 'nestedpages' ); ?></span>
139
  </label>
140
  </div>
141
  <?php endif; // Edit theme options ?>
142
 
143
  <div class="form-control np-toggle-options">
144
  <?php if ( $this->user->canSortPages() && $this->post_type->name == 'page' && !$this->isSearch() && !array_key_exists('menu_options', $this->disabled_standard_fields) ) : ?>
145
- <a href="#" class="np-btn np-btn-half np-toggle-menuoptions"><?php _e('Menu Options', 'nestedpages'); ?></a>
146
  <?php endif; ?>
147
 
148
  <?php if ( !empty($this->h_taxonomies) && !array_key_exists('hide_taxonomies', $this->disabled_standard_fields) ) : ?>
149
- <a href="#" class="np-btn np-btn-half btn-right np-toggle-taxonomies"><?php _e('Taxonomies', 'nestedpages'); ?></a>
150
  <?php endif; ?>
151
  </div>
152
 
@@ -208,7 +208,7 @@
208
  <div class="form-control">
209
  <label>
210
  <input type="checkbox" name="nav_status" class="np_nav_status" value="hide" />
211
- <span class="checkbox-title"><?php _e( 'Hide in Nav Menu', 'nestedpages' ); ?></span>
212
  </label>
213
  </div>
214
  <div class="form-control">
36
  <label><?php _e( 'Date' ); ?></label>
37
  <div class="datetime">
38
  <input type="text" name="np_date" class="np_datepicker" value="" />
39
+ <span><?php _e('@', 'wp-nested-pages'); ?></span>
40
  <div class="np-time-container">
41
  <select name="np_ampm" class="np_ampm">
42
+ <option value="am"><?php _e('am', 'wp-nested-pages'); ?></option>
43
+ <option value="pm"><?php _e('pm', 'wp-nested-pages'); ?></option>
44
  </select>
45
  <input type="text" name="np_time" class="np_time" value="" />
46
  </div>
135
  <div class="comments">
136
  <label>
137
  <input type="checkbox" name="nested_pages_status" class="np_status" value="hide" />
138
+ <span class="checkbox-title"><?php _e( 'Hide in Nested Pages', 'wp-nested-pages' ); ?></span>
139
  </label>
140
  </div>
141
  <?php endif; // Edit theme options ?>
142
 
143
  <div class="form-control np-toggle-options">
144
  <?php if ( $this->user->canSortPages() && $this->post_type->name == 'page' && !$this->isSearch() && !array_key_exists('menu_options', $this->disabled_standard_fields) ) : ?>
145
+ <a href="#" class="np-btn np-btn-half np-toggle-menuoptions"><?php _e('Menu Options', 'wp-nested-pages'); ?></a>
146
  <?php endif; ?>
147
 
148
  <?php if ( !empty($this->h_taxonomies) && !array_key_exists('hide_taxonomies', $this->disabled_standard_fields) ) : ?>
149
+ <a href="#" class="np-btn np-btn-half btn-right np-toggle-taxonomies"><?php _e('Taxonomies', 'wp-nested-pages'); ?></a>
150
  <?php endif; ?>
151
  </div>
152
 
208
  <div class="form-control">
209
  <label>
210
  <input type="checkbox" name="nav_status" class="np_nav_status" value="hide" />
211
+ <span class="checkbox-title"><?php _e( 'Hide in Nav Menu', 'wp-nested-pages' ); ?></span>
212
  </label>
213
  </div>
214
  <div class="form-control">
app/Views/listing.php CHANGED
@@ -7,14 +7,14 @@
7
  </a>
8
 
9
  <?php if ( current_user_can('publish_pages') && !$this->isSearch() ) : ?>
10
- <a href="#" class="add-new-h2 open-bulk-modal" title="<?php _e('Add Multiple', 'nestedpages'); ?>" data-parentid="0">
11
- <?php esc_html_e('Add Multiple', 'nestedpages'); ?>
12
  </a>
13
  <?php endif; ?>
14
 
15
  <?php if ( current_user_can('publish_pages') && $this->post_type->name == 'page' && !$this->isSearch() && !$this->settings->menusDisabled() ) : ?>
16
- <a href="#" class="add-new-h2 open-redirect-modal" title="<?php _e('Add Link', 'nestedpages'); ?>" data-parentid="0">
17
- <?php esc_html_e('Add Link', 'nestedpages'); ?>
18
  </a>
19
  <?php endif; ?>
20
 
@@ -28,24 +28,24 @@
28
 
29
  <div class="nestedpages-top-toggles">
30
  <?php if ( $this->post_type->hierarchical && !$this->isSearch() ) : ?>
31
- <a href="#" class="np-btn nestedpages-toggleall" data-toggle="closed"><?php esc_html_e('Expand All', 'nestedpages'); ?></a>
32
  <?php endif; ?>
33
 
34
  <?php if ( $this->user->canSortPages() && !$this->isSearch() && !$this->isFiltered() ) : ?>
35
  <div class="np-sync-menu-cont" <?php if ( $this->confirmation->getMessage() ) echo 'style="margin-top:2px;"';?>>
36
 
37
  <?php if ( $this->settings->autoPageOrderDisabled() ) : ?>
38
- <a href="#" class="np-btn" data-np-manual-order-sync><?php echo __('Sync', 'nestedpages') . ' ' . esc_html($this->post_type->labels->singular_name) . ' ' . __('Order', 'nestedpages'); ?></a>
39
  <?php endif; ?>
40
 
41
  <?php if ( $this->post_type->name == 'page' && !$this->settings->hideMenuSync() && !$this->settings->menusDisabled() ) : ?>
42
 
43
  <?php if ( !$this->settings->autoMenuDisabled() ) : ?>
44
  <label>
45
- <input type="checkbox" name="np_sync_menu" class="np-sync-menu" value="sync" <?php if ( get_option('nestedpages_menusync') == 'sync' ) echo 'checked'; ?>/> <?php esc_html_e('Sync Menu', 'nestedpages'); ?>
46
  </label>
47
  <?php else : ?>
48
- <a href="#" class="np-btn" data-np-manual-menu-sync><?php esc_html_e('Sync Menu', 'nestedpages'); ?></a>
49
  <?php endif; ?>
50
 
51
  <?php endif; ?>
7
  </a>
8
 
9
  <?php if ( current_user_can('publish_pages') && !$this->isSearch() ) : ?>
10
+ <a href="#" class="add-new-h2 open-bulk-modal" title="<?php _e('Add Multiple', 'wp-nested-pages'); ?>" data-parentid="0">
11
+ <?php esc_html_e('Add Multiple', 'wp-nested-pages'); ?>
12
  </a>
13
  <?php endif; ?>
14
 
15
  <?php if ( current_user_can('publish_pages') && $this->post_type->name == 'page' && !$this->isSearch() && !$this->settings->menusDisabled() ) : ?>
16
+ <a href="#" class="add-new-h2 open-redirect-modal" title="<?php _e('Add Link', 'wp-nested-pages'); ?>" data-parentid="0">
17
+ <?php esc_html_e('Add Link', 'wp-nested-pages'); ?>
18
  </a>
19
  <?php endif; ?>
20
 
28
 
29
  <div class="nestedpages-top-toggles">
30
  <?php if ( $this->post_type->hierarchical && !$this->isSearch() ) : ?>
31
+ <a href="#" class="np-btn nestedpages-toggleall" data-toggle="closed"><?php esc_html_e('Expand All', 'wp-nested-pages'); ?></a>
32
  <?php endif; ?>
33
 
34
  <?php if ( $this->user->canSortPages() && !$this->isSearch() && !$this->isFiltered() ) : ?>
35
  <div class="np-sync-menu-cont" <?php if ( $this->confirmation->getMessage() ) echo 'style="margin-top:2px;"';?>>
36
 
37
  <?php if ( $this->settings->autoPageOrderDisabled() ) : ?>
38
+ <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>
39
  <?php endif; ?>
40
 
41
  <?php if ( $this->post_type->name == 'page' && !$this->settings->hideMenuSync() && !$this->settings->menusDisabled() ) : ?>
42
 
43
  <?php if ( !$this->settings->autoMenuDisabled() ) : ?>
44
  <label>
45
+ <input type="checkbox" name="np_sync_menu" class="np-sync-menu" value="sync" <?php if ( get_option('nestedpages_menusync') == 'sync' ) echo 'checked'; ?>/> <?php esc_html_e('Sync Menu', 'wp-nested-pages'); ?>
46
  </label>
47
  <?php else : ?>
48
+ <a href="#" class="np-btn" data-np-manual-menu-sync><?php esc_html_e('Sync Menu', 'wp-nested-pages'); ?></a>
49
  <?php endif; ?>
50
 
51
  <?php endif; ?>
app/Views/partials/bulk-edit.php CHANGED
@@ -7,10 +7,10 @@
7
  <input type="hidden" name="page" value="<?php echo $this->pageURL(); ?>">
8
  <input type="hidden" name="post_type" value="<?php echo $this->post_type->name; ?>">
9
 
10
- <h3><?php _e('Bulk Edit', 'nestedpages'); ?></h3>
11
 
12
  <div class="np-bulk-edit-link-info">
13
- <div class="np-quickedit-info" data-bulk-edit-link-count><?php _e('There are links selected. Bulk edit will not apply to links.', 'nestedpages'); ?></div>
14
  </div>
15
 
16
  <ul class="np-bulk-titles" data-np-bulk-titles></ul>
@@ -79,7 +79,7 @@
79
 
80
  <?php if ( current_user_can('edit_theme_options') ) : ?>
81
  <div class="form-control">
82
- <label><?php _e( 'Display in Nested View', 'nestedpages' ); ?></label>
83
  <select name="nested_pages_status">
84
  <option value="">&mdash; <?php _e('No Change'); ?> &mdash;</option>
85
  <option value="hide"><?php _e('Hide'); ?></option>
@@ -89,7 +89,7 @@
89
 
90
  <?php if ( $this->user->canSortPages() && $this->post_type->name == 'page' ) : ?>
91
  <div class="form-control">
92
- <label><?php _e( 'Hide in Nav Menu', 'nestedpages' ); ?></label>
93
  <select name="nav_status">
94
  <option value="">&mdash; <?php _e('No Change'); ?> &mdash;</option>
95
  <option value="hide"><?php _e('Hide'); ?></option>
@@ -124,10 +124,10 @@
124
 
125
  <div class="np-bulk-footer">
126
  <button class="button pull-left" data-np-cancel-bulk-edit>
127
- <?php _e('Cancel', 'nestedpages'); ?>
128
  </button>
129
  <button type="submit" class="button button-primary">
130
- <?php _e('Update', 'nestedpages'); ?>
131
  </button>
132
  </div><!-- .np-bulk-footer -->
133
 
7
  <input type="hidden" name="page" value="<?php echo $this->pageURL(); ?>">
8
  <input type="hidden" name="post_type" value="<?php echo $this->post_type->name; ?>">
9
 
10
+ <h3><?php _e('Bulk Edit', 'wp-nested-pages'); ?></h3>
11
 
12
  <div class="np-bulk-edit-link-info">
13
+ <div class="np-quickedit-info" data-bulk-edit-link-count><?php _e('There are links selected. Bulk edit will not apply to links.', 'wp-nested-pages'); ?></div>
14
  </div>
15
 
16
  <ul class="np-bulk-titles" data-np-bulk-titles></ul>
79
 
80
  <?php if ( current_user_can('edit_theme_options') ) : ?>
81
  <div class="form-control">
82
+ <label><?php _e( 'Display in Nested View', 'wp-nested-pages' ); ?></label>
83
  <select name="nested_pages_status">
84
  <option value="">&mdash; <?php _e('No Change'); ?> &mdash;</option>
85
  <option value="hide"><?php _e('Hide'); ?></option>
89
 
90
  <?php if ( $this->user->canSortPages() && $this->post_type->name == 'page' ) : ?>
91
  <div class="form-control">
92
+ <label><?php _e( 'Hide in Nav Menu', 'wp-nested-pages' ); ?></label>
93
  <select name="nav_status">
94
  <option value="">&mdash; <?php _e('No Change'); ?> &mdash;</option>
95
  <option value="hide"><?php _e('Hide'); ?></option>
124
 
125
  <div class="np-bulk-footer">
126
  <button class="button pull-left" data-np-cancel-bulk-edit>
127
+ <?php _e('Cancel', 'wp-nested-pages'); ?>
128
  </button>
129
  <button type="submit" class="button button-primary">
130
+ <?php _e('Update', 'wp-nested-pages'); ?>
131
  </button>
132
  </div><!-- .np-bulk-footer -->
133
 
app/Views/partials/list-header.php CHANGED
@@ -8,13 +8,13 @@
8
  <input type="hidden" name="redirect_post_ids" value="" data-np-bulk-redirect-ids>
9
  <input type="hidden" name="post_ids" value="" data-np-bulk-ids>
10
  <select id="np_bulk" name="np_bulk_action" class="nestedpages-sort">
11
- <option value="no-action"><?php _e('Bulk Actions', 'nestedpages'); ?></option>
12
  <?php if ( current_user_can('delete_pages') ) : ?>
13
- <option value="trash"><?php _e('Move to Trash', 'nestedpages'); ?></option>
14
  <?php endif; ?>
15
- <option value="edit"><?php _e('Edit', 'nestedpages'); ?></option>
16
  </select>
17
  <input type="submit" class="button" value="Apply">
18
  </form>
19
- <p class="np-hidden-select-count" data-np-hidden-count-parent><span data-np-hidden-count></span> <?php _e('Nested Items Selected', 'nestedpages'); ?>. <a href="#" class="nestedpages-toggleall"><?php _e('Expand All', 'nestedpages'); ?></a></p>
20
  </div>
8
  <input type="hidden" name="redirect_post_ids" value="" data-np-bulk-redirect-ids>
9
  <input type="hidden" name="post_ids" value="" data-np-bulk-ids>
10
  <select id="np_bulk" name="np_bulk_action" class="nestedpages-sort">
11
+ <option value="no-action"><?php _e('Bulk Actions', 'wp-nested-pages'); ?></option>
12
  <?php if ( current_user_can('delete_pages') ) : ?>
13
+ <option value="trash"><?php _e('Move to Trash', 'wp-nested-pages'); ?></option>
14
  <?php endif; ?>
15
+ <option value="edit"><?php _e('Edit', 'wp-nested-pages'); ?></option>
16
  </select>
17
  <input type="submit" class="button" value="Apply">
18
  </form>
19
+ <p class="np-hidden-select-count" data-np-hidden-count-parent><span data-np-hidden-count></span> <?php _e('Nested Items Selected', 'wp-nested-pages'); ?>. <a href="#" class="nestedpages-toggleall"><?php _e('Expand All', 'wp-nested-pages'); ?></a></p>
20
  </div>
app/Views/partials/row-link.php CHANGED
@@ -37,7 +37,7 @@ $link = ( $this->post->nav_type && $this->post->nav_type !== 'custom' )
37
 
38
  // Nav Status
39
  if ( $this->post->nav_status == 'hide' ){
40
- echo '<span class="nav-status">(' . __('Hidden', 'nestedpages') . ')</span>';
41
  } else {
42
  echo '<span class="nav-status"></span>';
43
  }
37
 
38
  // Nav Status
39
  if ( $this->post->nav_status == 'hide' ){
40
+ echo '<span class="nav-status">(' . __('Hidden', 'wp-nested-pages') . ')</span>';
41
  } else {
42
  echo '<span class="nav-status"></span>';
43
  }
app/Views/partials/row.php CHANGED
@@ -28,8 +28,8 @@ if ( $this->isSearch() ) $row_classes .= ' search';
28
  <span class="title">
29
  <?php
30
  echo apply_filters( 'the_title', $this->post->title, $this->post->id, $view = 'nestedpages_title' );
31
- if ( $this->post->id == get_option('page_on_front') ) echo ' <em class="np-page-type"><strong>&ndash; ' . __('Front Page', 'nestedpages') . '</strong></em>';
32
- if ( $this->post->id == get_option('page_for_posts') ) echo ' <em class="np-page-type"><strong>&ndash; ' . __('Posts Page', 'nestedpages') . '</strong></em>';
33
  ?>
34
  </span>
35
  <?php
@@ -45,7 +45,7 @@ if ( $this->isSearch() ) $row_classes .= ' search';
45
 
46
  // Nav Status
47
  if ( $this->post->nav_status == 'hide' ){
48
- echo '<span class="nav-status">' . __('Hidden', 'nestedpages') . '</span>';
49
  } else {
50
  echo '<span class="nav-status"></span>';
51
  }
@@ -53,7 +53,7 @@ if ( $this->isSearch() ) $row_classes .= ' search';
53
  // Post Lock
54
  if ( $user = wp_check_post_lock($this->post->id) ){
55
  $u = get_userdata($user);
56
- echo '<span class="locked"><i class="np-icon-lock"></i><em> ' . esc_html($u->display_name) . ' ' . __('currently editing', 'nestedpages') . '</em></span>';
57
  } elseif ( !$this->integrations->plugins->editorial_access_manager->hasAccess($this->post->id) ){
58
  echo '<span class="locked"><i class="np-icon-lock"></i></span>';
59
  } else {
@@ -99,12 +99,12 @@ if ( $this->isSearch() ) $row_classes .= ' search';
99
  <a href="#" class="np-btn open-redirect-modal" data-parentid="<?php echo $this->post->id; ?>"><i class="np-icon-link"></i></a>
100
  <?php endif; ?>
101
 
102
- <a href="#" class="np-btn add-new-child" data-id="<?php echo get_the_id(); ?>" data-parentname="<?php echo $this->post->title; ?>"><?php _e('Add Child', 'nestedpages'); ?></a>
103
 
104
  <?php endif; ?>
105
 
106
  <?php if ( current_user_can('edit_pages') && current_user_can('edit_posts') ) : ?>
107
- <a href="#" class="np-btn clone-post" data-id="<?php echo get_the_id(); ?>" data-parentname="<?php echo $this->post->title; ?>"><?php _e('Clone', 'nestedpages'); ?></a>
108
  <?php endif; ?>
109
 
110
  <?php if ( !$user = wp_check_post_lock($this->post->id) || !$this->integrations->plugins->editorial_access_manager->hasAccess($this->post->id) ) : ?>
28
  <span class="title">
29
  <?php
30
  echo apply_filters( 'the_title', $this->post->title, $this->post->id, $view = 'nestedpages_title' );
31
+ if ( $this->post->id == get_option('page_on_front') ) echo ' <em class="np-page-type"><strong>&ndash; ' . __('Front Page', 'wp-nested-pages') . '</strong></em>';
32
+ if ( $this->post->id == get_option('page_for_posts') ) echo ' <em class="np-page-type"><strong>&ndash; ' . __('Posts Page', 'wp-nested-pages') . '</strong></em>';
33
  ?>
34
  </span>
35
  <?php
45
 
46
  // Nav Status
47
  if ( $this->post->nav_status == 'hide' ){
48
+ echo '<span class="nav-status">' . __('Hidden', 'wp-nested-pages') . '</span>';
49
  } else {
50
  echo '<span class="nav-status"></span>';
51
  }
53
  // Post Lock
54
  if ( $user = wp_check_post_lock($this->post->id) ){
55
  $u = get_userdata($user);
56
+ echo '<span class="locked"><i class="np-icon-lock"></i><em> ' . esc_html($u->display_name) . ' ' . __('currently editing', 'wp-nested-pages') . '</em></span>';
57
  } elseif ( !$this->integrations->plugins->editorial_access_manager->hasAccess($this->post->id) ){
58
  echo '<span class="locked"><i class="np-icon-lock"></i></span>';
59
  } else {
99
  <a href="#" class="np-btn open-redirect-modal" data-parentid="<?php echo $this->post->id; ?>"><i class="np-icon-link"></i></a>
100
  <?php endif; ?>
101
 
102
+ <a href="#" class="np-btn add-new-child" data-id="<?php echo get_the_id(); ?>" data-parentname="<?php echo $this->post->title; ?>"><?php _e('Add Child', 'wp-nested-pages'); ?></a>
103
 
104
  <?php endif; ?>
105
 
106
  <?php if ( current_user_can('edit_pages') && current_user_can('edit_posts') ) : ?>
107
+ <a href="#" class="np-btn clone-post" data-id="<?php echo get_the_id(); ?>" data-parentname="<?php echo $this->post->title; ?>"><?php _e('Clone', 'wp-nested-pages'); ?></a>
108
  <?php endif; ?>
109
 
110
  <?php if ( !$user = wp_check_post_lock($this->post->id) || !$this->integrations->plugins->editorial_access_manager->hasAccess($this->post->id) ) : ?>
app/Views/partials/tool-list.php CHANGED
@@ -16,9 +16,9 @@
16
 
17
  <li> |
18
  <?php if ( !$this->isSearch() ) : ?>
19
- <a href="#hide" class="np-toggle-hidden"><?php _e('Show Hidden', 'nestedpages'); ?> </a>
20
  <?php else : ?>
21
- <a href="#show" class="np-toggle-hidden"><?php _e('Hide Hidden', 'nestedpages'); ?> </a>
22
  <?php endif; ?>
23
  <span class="count">(<?php echo absint($this->post_repo->getHiddenCount(array($this->post_type->name))); ?>)</span>
24
  </li>
@@ -27,7 +27,7 @@
27
  <li class="np-trash-links">
28
  |
29
  <a href="<?php echo esc_url($this->post_type_repo->trashLink($this->post_type->name)); ?>"><?php _e('Trash'); ?> </a>
30
- <span class="count">(<a href="#" class="np-empty-trash" data-posttype="<?php echo esc_attr($this->post_type->name); ?>"><?php _e('Empty', 'nestedpages'); ?></a> <?php echo absint($trashedCount); ?>)</span>
31
  </li>
32
  <?php endif; ?>
33
 
@@ -49,7 +49,7 @@
49
  <div class="select first">
50
  <select id="np_sortauthor" name="np_author" class="nestedpages-sort">
51
  <?php
52
- $out = '<option value="all">' . __('All Authors', 'nestedpages') . '</option>';
53
  $users = $this->user->allUsers();
54
  foreach( $users as $user ){
55
  $out .= '<option value="' . $user->ID . '"';
@@ -64,11 +64,11 @@
64
  <select id="np_orderby" name="np_orderby" class="nestedpages-sort">
65
  <?php
66
  $options = array(
67
- 'menu_order' => __('Menu Order', 'nestedpages'),
68
- 'date' => __('Date', 'nestedpages'),
69
- 'title' => __('Title', 'nestedpages')
70
  );
71
- $out = '<option value="">' . __('Order By', 'nestedpages') . '</option>';
72
  foreach ( $options as $key => $option ){
73
  $out .= '<option value="' . $key . '"';
74
  if ( isset($_GET['orderby']) && ($_GET['orderby'] == $key) ) $out .= ' selected';
@@ -82,8 +82,8 @@
82
  <select id="np_order" name="np_order" class="nestedpages-sort">
83
  <?php
84
  $options = array(
85
- 'ASC' => __('Ascending', 'nestedpages'),
86
- 'DESC' => __('Descending', 'nestedpages')
87
  );
88
  $out = '';
89
  foreach ( $options as $key => $option ){
@@ -112,7 +112,7 @@
112
  <select id="np_category" name="np_category" class="nestedpages-sort">
113
  <?php
114
  $tax = get_taxonomy('category');
115
- $out = '<option value="all">' . __('All ', 'nestedpages') . esc_html($tax->labels->name) . '</option>';
116
  $terms = get_terms('category');
117
  foreach( $terms as $term ){
118
  $out .= '<option value="' . esc_attr($term->term_id) . '"';
16
 
17
  <li> |
18
  <?php if ( !$this->isSearch() ) : ?>
19
+ <a href="#hide" class="np-toggle-hidden"><?php _e('Show Hidden', 'wp-nested-pages'); ?> </a>
20
  <?php else : ?>
21
+ <a href="#show" class="np-toggle-hidden"><?php _e('Hide Hidden', 'wp-nested-pages'); ?> </a>
22
  <?php endif; ?>
23
  <span class="count">(<?php echo absint($this->post_repo->getHiddenCount(array($this->post_type->name))); ?>)</span>
24
  </li>
27
  <li class="np-trash-links">
28
  |
29
  <a href="<?php echo esc_url($this->post_type_repo->trashLink($this->post_type->name)); ?>"><?php _e('Trash'); ?> </a>
30
+ <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>
31
  </li>
32
  <?php endif; ?>
33
 
49
  <div class="select first">
50
  <select id="np_sortauthor" name="np_author" class="nestedpages-sort">
51
  <?php
52
+ $out = '<option value="all">' . __('All Authors', 'wp-nested-pages') . '</option>';
53
  $users = $this->user->allUsers();
54
  foreach( $users as $user ){
55
  $out .= '<option value="' . $user->ID . '"';
64
  <select id="np_orderby" name="np_orderby" class="nestedpages-sort">
65
  <?php
66
  $options = array(
67
+ 'menu_order' => __('Menu Order', 'wp-nested-pages'),
68
+ 'date' => __('Date', 'wp-nested-pages'),
69
+ 'title' => __('Title', 'wp-nested-pages')
70
  );
71
+ $out = '<option value="">' . __('Order By', 'wp-nested-pages') . '</option>';
72
  foreach ( $options as $key => $option ){
73
  $out .= '<option value="' . $key . '"';
74
  if ( isset($_GET['orderby']) && ($_GET['orderby'] == $key) ) $out .= ' selected';
82
  <select id="np_order" name="np_order" class="nestedpages-sort">
83
  <?php
84
  $options = array(
85
+ 'ASC' => __('Ascending', 'wp-nested-pages'),
86
+ 'DESC' => __('Descending', 'wp-nested-pages')
87
  );
88
  $out = '';
89
  foreach ( $options as $key => $option ){
112
  <select id="np_category" name="np_category" class="nestedpages-sort">
113
  <?php
114
  $tax = get_taxonomy('category');
115
+ $out = '<option value="all">' . __('All ', 'wp-nested-pages') . esc_html($tax->labels->name) . '</option>';
116
  $terms = get_terms('category');
117
  foreach( $terms as $term ){
118
  $out .= '<option value="' . esc_attr($term->term_id) . '"';
app/Views/settings/settings-general.php CHANGED
@@ -1,63 +1,63 @@
1
  <?php
2
  $allowsorting = get_option('nestedpages_allowsorting', array());
3
  if ( $allowsorting == "" ) $allowsorting = array();
4
- $sync_status = ( $this->settings->menuSyncEnabled() ) ? __('Currently Enabled', 'nestedpages') : __('Currently Disabled', 'nestedpages');
5
  settings_fields( 'nestedpages-general' );
6
  ?>
7
  <table class="form-table">
8
  <tr valign="top">
9
- <th scope="row"><?php _e('Nested Pages Version', 'nestedpages'); ?></th>
10
  <td><strong><?php echo get_option('nestedpages_version'); ?></strong></td>
11
  </tr>
12
  <?php if ( !$this->settings->menusDisabled() ) : ?>
13
  <tr valign="top">
14
- <th scope="row"><?php _e('Menu Name', 'nestedpages'); ?></th>
15
  <td>
16
  <input type="text" name="nestedpages_menu" id="nestedpages_menu" value="<?php echo $this->menu->name; ?>">
17
- <p><em><?php _e('Important: Once the menu name has changed, theme files should be updated to reference the new name.', 'nestedpages'); ?></em></p>
18
  </td>
19
  </tr>
20
  <?php endif; ?>
21
  <tr valign="top">
22
- <th scope="row"><?php _e('Display Options', 'nestedpages'); ?></th>
23
  <td>
24
  <label>
25
  <input type="checkbox" name="nestedpages_ui[datepicker]" value="true" <?php if ( $this->settings->datepickerEnabled() ) echo 'checked'; ?> />
26
- <?php _e('Enable Date Picker in Quick Edit', 'nestedpages'); ?>
27
  </label>
28
  </td>
29
  </tr>
30
  <tr valign="top">
31
- <th scope="row"><?php _e('Menu Sync', 'nestedpages'); ?></th>
32
  <td>
33
  <p data-menu-enabled-option data-menu-hide-checkbox>
34
  <label>
35
  <input type="checkbox" name="nestedpages_ui[hide_menu_sync]" value="true" <?php if ( $this->settings->hideMenuSync() ) echo 'checked'; ?> />
36
- <?php _e('Hide Menu Sync Checkbox', 'nestedpages'); ?> (<?php echo esc_html($sync_status); ?>)
37
  </label>
38
  </p>
39
  <p data-menu-enabled-option data-menu-disable-auto>
40
  <label>
41
  <input type="checkbox" name="nestedpages_ui[manual_menu_sync]" value="true" <?php if ( $this->settings->autoMenuDisabled() ) echo 'checked'; ?> data-menu-disable-auto-checkbox />
42
- <?php _e('Manually sync menu.', 'nestedpages'); ?>
43
  </label>
44
  </p>
45
  <p>
46
  <label>
47
  <input type="checkbox" name="nestedpages_ui[manual_page_order_sync]" value="true" <?php if ( $this->settings->autoPageOrderDisabled() ) echo 'checked'; ?> />
48
- <?php _e('Manually sync page order.', 'nestedpages'); ?>
49
  </label>
50
  </p>
51
  <p>
52
  <label>
53
  <input type="checkbox" name="nestedpages_disable_menu" value="true" <?php if ( $this->settings->menusDisabled() ) echo 'checked'; ?> data-disable-menu-checkbox />
54
- <?php _e('Disable menu sync completely', 'nestedpages'); ?>
55
  </label>
56
  </p>
57
  </td>
58
  </tr>
59
  <tr valign="top">
60
- <th scope="row"><?php _e('Allow Page Sorting', 'nestedpages'); ?></th>
61
  <td>
62
  <?php foreach ( $this->user_repo->allRoles() as $role ) : ?>
63
  <label>
@@ -67,7 +67,7 @@ settings_fields( 'nestedpages-general' );
67
  <br />
68
  <?php endforeach; ?>
69
  <input type="hidden" name="nestedpages_menusync" value="<?php echo get_option('nestedpages_menusync'); ?>">
70
- <p><em><?php _e('Admins always have sorting ability.', 'nestedpages'); ?></em></p>
71
  </td>
72
  </tr>
73
  </table>
1
  <?php
2
  $allowsorting = get_option('nestedpages_allowsorting', array());
3
  if ( $allowsorting == "" ) $allowsorting = array();
4
+ $sync_status = ( $this->settings->menuSyncEnabled() ) ? __('Currently Enabled', 'wp-nested-pages') : __('Currently Disabled', 'wp-nested-pages');
5
  settings_fields( 'nestedpages-general' );
6
  ?>
7
  <table class="form-table">
8
  <tr valign="top">
9
+ <th scope="row"><?php _e('Nested Pages Version', 'wp-nested-pages'); ?></th>
10
  <td><strong><?php echo get_option('nestedpages_version'); ?></strong></td>
11
  </tr>
12
  <?php if ( !$this->settings->menusDisabled() ) : ?>
13
  <tr valign="top">
14
+ <th scope="row"><?php _e('Menu Name', 'wp-nested-pages'); ?></th>
15
  <td>
16
  <input type="text" name="nestedpages_menu" id="nestedpages_menu" value="<?php echo $this->menu->name; ?>">
17
+ <p><em><?php _e('Important: Once the menu name has changed, theme files should be updated to reference the new name.', 'wp-nested-pages'); ?></em></p>
18
  </td>
19
  </tr>
20
  <?php endif; ?>
21
  <tr valign="top">
22
+ <th scope="row"><?php _e('Display Options', 'wp-nested-pages'); ?></th>
23
  <td>
24
  <label>
25
  <input type="checkbox" name="nestedpages_ui[datepicker]" value="true" <?php if ( $this->settings->datepickerEnabled() ) echo 'checked'; ?> />
26
+ <?php _e('Enable Date Picker in Quick Edit', 'wp-nested-pages'); ?>
27
  </label>
28
  </td>
29
  </tr>
30
  <tr valign="top">
31
+ <th scope="row"><?php _e('Menu Sync', 'wp-nested-pages'); ?></th>
32
  <td>
33
  <p data-menu-enabled-option data-menu-hide-checkbox>
34
  <label>
35
  <input type="checkbox" name="nestedpages_ui[hide_menu_sync]" value="true" <?php if ( $this->settings->hideMenuSync() ) echo 'checked'; ?> />
36
+ <?php _e('Hide Menu Sync Checkbox', 'wp-nested-pages'); ?> (<?php echo esc_html($sync_status); ?>)
37
  </label>
38
  </p>
39
  <p data-menu-enabled-option data-menu-disable-auto>
40
  <label>
41
  <input type="checkbox" name="nestedpages_ui[manual_menu_sync]" value="true" <?php if ( $this->settings->autoMenuDisabled() ) echo 'checked'; ?> data-menu-disable-auto-checkbox />
42
+ <?php _e('Manually sync menu.', 'wp-nested-pages'); ?>
43
  </label>
44
  </p>
45
  <p>
46
  <label>
47
  <input type="checkbox" name="nestedpages_ui[manual_page_order_sync]" value="true" <?php if ( $this->settings->autoPageOrderDisabled() ) echo 'checked'; ?> />
48
+ <?php _e('Manually sync page order.', 'wp-nested-pages'); ?>
49
  </label>
50
  </p>
51
  <p>
52
  <label>
53
  <input type="checkbox" name="nestedpages_disable_menu" value="true" <?php if ( $this->settings->menusDisabled() ) echo 'checked'; ?> data-disable-menu-checkbox />
54
+ <?php _e('Disable menu sync completely', 'wp-nested-pages'); ?>
55
  </label>
56
  </p>
57
  </td>
58
  </tr>
59
  <tr valign="top">
60
+ <th scope="row"><?php _e('Allow Page Sorting', 'wp-nested-pages'); ?></th>
61
  <td>
62
  <?php foreach ( $this->user_repo->allRoles() as $role ) : ?>
63
  <label>
67
  <br />
68
  <?php endforeach; ?>
69
  <input type="hidden" name="nestedpages_menusync" value="<?php echo get_option('nestedpages_menusync'); ?>">
70
+ <p><em><?php _e('Admins always have sorting ability.', 'wp-nested-pages'); ?></em></p>
71
  </td>
72
  </tr>
73
  </table>
app/Views/settings/settings-posttypes.php CHANGED
@@ -4,7 +4,7 @@ $thumbnail_sizes = get_intermediate_image_sizes();
4
  settings_fields( 'nestedpages-posttypes' );
5
  ?>
6
 
7
- <h3><?php _e('Enable Nested Pages for:', 'nestedpages'); ?></h3>
8
 
9
  <div class="nestedpages-settings-posttypes">
10
  <?php foreach ($types as $type) : ?>
@@ -16,32 +16,32 @@ settings_fields( 'nestedpages-posttypes' );
16
  <label for="post-type-<?php echo $type->name; ?>">
17
  <?php
18
  echo esc_html($type->label);
19
- if ( $type->hierarchical ) echo ' <em>(' . __('Hierarchical', 'nestedpages') . ')</em>';
20
  ?>
21
  </label>
22
- <a href="#" class="button" data-toggle-nestedpages-pt-settings><?php _e('Settings', 'nestedpages'); ?></a>
23
  </div><!-- .head -->
24
  <div class="body">
25
  <ul class="post-type-settings">
26
  <li>
27
  <div class="row">
28
  <div class="description">
29
- <p><strong><?php _e('Replace Default Menu', 'nestedpages'); ?>*</strong><br />
30
- <?php _e('Replace the default top-level item with the nested view link.', 'nestedpages'); ?></p>
31
  </div>
32
  <div class="field">
33
- <label><input type="checkbox" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][replace_menu]" value="true" <?php if ( $type->replace_menu ) echo 'checked'; ?> /><?php echo __('Replace Default') . ' ' . esc_html($type->label) . ' ' . __('Menu', 'nestedpages'); ?></label>
34
  </div><!-- .field -->
35
  </div><!-- .row -->
36
  </li>
37
  <li>
38
  <div class="row">
39
  <div class="description">
40
- <p><strong><?php _e('Remove Default Link', 'nestedpages'); ?></strong><br />
41
- <?php _e('If the default menu is replaced, a link to the default view will be added. Select this to remove the link', 'nestedpages'); ?>
42
  </div>
43
  <div class="field">
44
- <label><input type="checkbox" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][hide_default]" value="true" <?php if ( $type->hide_default ) echo 'checked'; ?> /><?php echo __('Hide Default', 'nestedpages') . ' ' . esc_html($type->label) . ' ' . __('Link', 'nestedpages'); ?></label>
45
  </div>
46
  </div><!-- .row -->
47
  </li>
@@ -49,11 +49,11 @@ settings_fields( 'nestedpages-posttypes' );
49
  <li>
50
  <div class="row">
51
  <div class="description">
52
- <p><strong><?php _e('Disable Nesting', 'nestedpages'); ?>**</strong><br>
53
- <?php _e('To disable nesting on hierarchical post types, select this option.', 'nestedpages'); ?></p>
54
  </div>
55
  <div class="field">
56
- <label><input type="checkbox" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][disable_nesting]" value="true" <?php if ( $type->disable_nesting ) echo 'checked '; ?>/><?php echo __('Disable Nesting for', 'nestedpages') . ' ' . esc_html($type->label); ?></label>
57
  </div>
58
  </div><!-- .row -->
59
  </li>
@@ -66,15 +66,15 @@ settings_fields( 'nestedpages-posttypes' );
66
  ?>
67
  <div class="row">
68
  <div class="description">
69
- <p><strong><?php _e('Display Thumbnails', 'nestedpages'); ?></strong><br>
70
- <?php _e('Display the thumbnail in the list sort view.', 'nestedpages'); ?><br><br>
71
- <?php _e('Note: Thumbnail width is displayed at a maximum of 80px in the nested pages view. The image is scaled proportionally.', 'nestedpages'); ?></p>
72
  </div>
73
  <div class="field">
74
- <label><input type="checkbox" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][thumbnails][display]" value="true" <?php if ( $thumbnails_enabled ) echo 'checked'; ?> data-enable-thumbnails /><?php echo __('Display Thumbnails for', 'nestedpages') . ' ' . esc_html($type->label); ?></label>
75
 
76
  <div class="thumbnail-options" data-thumbnail-options <?php if ( !$thumbnails_enabled ) echo 'style="display:none;"'; ?>>
77
- <label><?php _e('Thumbnail Source', 'nestedpages'); ?></label>
78
  <select name="nestedpages_posttypes[<?php echo $type->name; ?>][thumbnails][size]">
79
  <?php
80
  foreach ( $thumbnail_sizes as $size ){
@@ -85,11 +85,11 @@ settings_fields( 'nestedpages-posttypes' );
85
  ?>
86
  </select>
87
 
88
- <label><?php _e('Thumbnail Display Size', 'nestedpages'); ?></label>
89
  <select name="nestedpages_posttypes[<?php echo $type->name; ?>][thumbnails][display_size]">
90
- <option value="small" <?php if ( $thumbnail_size == 'small' ) echo ' selected';?>><?php _e('Small', 'nestedpages'); ?>(50px)</option>
91
- <option value="medium" <?php if ( $thumbnail_size == 'medium' ) echo ' selected';?>><?php _e('Medium', 'nestedpages'); ?>(80px)</option>
92
- <option value="large" <?php if ( $thumbnail_size == 'large' ) echo ' selected';?>><?php _e('Large', 'nestedpages'); ?>(150px)</option>
93
  </select>
94
  </div><!-- .thumbnail-options -->
95
  </div>
@@ -98,14 +98,14 @@ settings_fields( 'nestedpages-posttypes' );
98
  <li>
99
  <div class="row">
100
  <div class="description">
101
- <p><strong><?php _e('Configure Standard Fields', 'nestedpages'); ?></strong><br>
102
- <?php _e('Remove standard fields from the quick edit form.', 'nestedpages'); ?></p>
103
  </div>
104
  <div class="field">
105
- <label><input type="checkbox" data-toggle-nestedpages-sf-settings name="nestedpages_posttypes[<?php echo $type->name; ?>][standard_fields_enabled]" value="true" <?php if ( $type->standard_fields_enabled ) echo 'checked '; ?>/><?php _e('Configure Standard Fields', 'nestedpages'); ?></label>
106
 
107
  <div class="standard-fields">
108
- <h5><?php _e('Check to remove from Quick Edit.', 'nestedpages'); ?></h5>
109
  <div class="custom-field-group">
110
  <ul>
111
  <?php
@@ -147,20 +147,20 @@ settings_fields( 'nestedpages-posttypes' );
147
  <li>
148
  <div class="row">
149
  <div class="description">
150
- <p><strong><?php _e('Configure Custom Fields', 'nestedpages'); ?></strong><br>
151
- <?php _e('Set which custom fields display in the quick edit form.', 'nestedpages'); ?></p>
152
  </div>
153
  <div class="field">
154
- <label><input type="checkbox" data-toggle-nestedpages-cf-settings name="nestedpages_posttypes[<?php echo $type->name; ?>][custom_fields_enabled]" value="true" <?php if ( $type->custom_fields_enabled ) echo 'checked'; ?> /><?php _e('Configure Custom Fields', 'nestedpages'); ?></label>
155
 
156
  <div class="custom-fields">
157
- <h5><?php _e('Check to Include in Quick Edit.', 'nestedpages'); ?></h5>
158
  <?php
159
  // Advanced Custom Fields
160
  $acf_fields = $this->integrations->plugins->acf->getFieldsForPostType($type->name);
161
  if ( $acf_fields ) :
162
  $out = '<div class="custom-field-group">';
163
- $out .= '<p>' . __('Advanced Custom Fields', 'nestedpages') . '</p>';
164
  $out .= '<ul class="indented">';
165
  foreach ($acf_fields as $field){
166
  $out .= '<li>';
@@ -175,7 +175,7 @@ settings_fields( 'nestedpages-posttypes' );
175
  $out .= '</div><!-- .custom-field-group -->';
176
  echo $out;
177
  else :
178
- echo __('No ACF Fields configured for this post type', 'nestedpages');
179
  endif;
180
  ?>
181
  </div><!-- .custom-fields -->
@@ -191,9 +191,9 @@ settings_fields( 'nestedpages-posttypes' );
191
 
192
  <div class="nestedpages-settings-disclaimers">
193
  <p style="font-size:12px;margin-bottom:15px;">
194
- *<?php _e('If default menu is not replaced, an additional submenu item will be added for "Nested/Sort View"', 'nestedpages'); ?>
195
  </p>
196
  <p style="font-size:12px;">
197
- **<?php _e('<strong>Important:</strong> Changing page structures on live sites may effect SEO and existing inbound links. Limit URL structure changes on live sites by disabling nesting. Sorting within the current nesting structure will still be available. If nesting changes are made to a live site, it may help to add a 301 redirect from the old location to the new one.', 'nestedpages'); ?>
198
  </p>
199
  </div>
4
  settings_fields( 'nestedpages-posttypes' );
5
  ?>
6
 
7
+ <h3><?php _e('Enable Nested Pages for:', 'wp-nested-pages'); ?></h3>
8
 
9
  <div class="nestedpages-settings-posttypes">
10
  <?php foreach ($types as $type) : ?>
16
  <label for="post-type-<?php echo $type->name; ?>">
17
  <?php
18
  echo esc_html($type->label);
19
+ if ( $type->hierarchical ) echo ' <em>(' . __('Hierarchical', 'wp-nested-pages') . ')</em>';
20
  ?>
21
  </label>
22
+ <a href="#" class="button" data-toggle-nestedpages-pt-settings><?php _e('Settings', 'wp-nested-pages'); ?></a>
23
  </div><!-- .head -->
24
  <div class="body">
25
  <ul class="post-type-settings">
26
  <li>
27
  <div class="row">
28
  <div class="description">
29
+ <p><strong><?php _e('Replace Default Menu', 'wp-nested-pages'); ?>*</strong><br />
30
+ <?php _e('Replace the default top-level item with the nested view link.', 'wp-nested-pages'); ?></p>
31
  </div>
32
  <div class="field">
33
+ <label><input type="checkbox" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][replace_menu]" value="true" <?php if ( $type->replace_menu ) echo 'checked'; ?> /><?php echo __('Replace Default') . ' ' . esc_html($type->label) . ' ' . __('Menu', 'wp-nested-pages'); ?></label>
34
  </div><!-- .field -->
35
  </div><!-- .row -->
36
  </li>
37
  <li>
38
  <div class="row">
39
  <div class="description">
40
+ <p><strong><?php _e('Remove Default Link', 'wp-nested-pages'); ?></strong><br />
41
+ <?php _e('If the default menu is replaced, a link to the default view will be added. Select this to remove the link', 'wp-nested-pages'); ?>
42
  </div>
43
  <div class="field">
44
+ <label><input type="checkbox" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][hide_default]" value="true" <?php if ( $type->hide_default ) echo 'checked'; ?> /><?php echo __('Hide Default', 'wp-nested-pages') . ' ' . esc_html($type->label) . ' ' . __('Link', 'wp-nested-pages'); ?></label>
45
  </div>
46
  </div><!-- .row -->
47
  </li>
49
  <li>
50
  <div class="row">
51
  <div class="description">
52
+ <p><strong><?php _e('Disable Nesting', 'wp-nested-pages'); ?>**</strong><br>
53
+ <?php _e('To disable nesting on hierarchical post types, select this option.', 'wp-nested-pages'); ?></p>
54
  </div>
55
  <div class="field">
56
+ <label><input type="checkbox" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][disable_nesting]" value="true" <?php if ( $type->disable_nesting ) echo 'checked '; ?>/><?php echo __('Disable Nesting for', 'wp-nested-pages') . ' ' . esc_html($type->label); ?></label>
57
  </div>
58
  </div><!-- .row -->
59
  </li>
66
  ?>
67
  <div class="row">
68
  <div class="description">
69
+ <p><strong><?php _e('Display Thumbnails', 'wp-nested-pages'); ?></strong><br>
70
+ <?php _e('Display the thumbnail in the list sort view.', 'wp-nested-pages'); ?><br><br>
71
+ <?php _e('Note: Thumbnail width is displayed at a maximum of 80px in the nested pages view. The image is scaled proportionally.', 'wp-nested-pages'); ?></p>
72
  </div>
73
  <div class="field">
74
+ <label><input type="checkbox" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][thumbnails][display]" value="true" <?php if ( $thumbnails_enabled ) echo 'checked'; ?> data-enable-thumbnails /><?php echo __('Display Thumbnails for', 'wp-nested-pages') . ' ' . esc_html($type->label); ?></label>
75
 
76
  <div class="thumbnail-options" data-thumbnail-options <?php if ( !$thumbnails_enabled ) echo 'style="display:none;"'; ?>>
77
+ <label><?php _e('Thumbnail Source', 'wp-nested-pages'); ?></label>
78
  <select name="nestedpages_posttypes[<?php echo $type->name; ?>][thumbnails][size]">
79
  <?php
80
  foreach ( $thumbnail_sizes as $size ){
85
  ?>
86
  </select>
87
 
88
+ <label><?php _e('Thumbnail Display Size', 'wp-nested-pages'); ?></label>
89
  <select name="nestedpages_posttypes[<?php echo $type->name; ?>][thumbnails][display_size]">
90
+ <option value="small" <?php if ( $thumbnail_size == 'small' ) echo ' selected';?>><?php _e('Small', 'wp-nested-pages'); ?>(50px)</option>
91
+ <option value="medium" <?php if ( $thumbnail_size == 'medium' ) echo ' selected';?>><?php _e('Medium', 'wp-nested-pages'); ?>(80px)</option>
92
+ <option value="large" <?php if ( $thumbnail_size == 'large' ) echo ' selected';?>><?php _e('Large', 'wp-nested-pages'); ?>(150px)</option>
93
  </select>
94
  </div><!-- .thumbnail-options -->
95
  </div>
98
  <li>
99
  <div class="row">
100
  <div class="description">
101
+ <p><strong><?php _e('Configure Standard Fields', 'wp-nested-pages'); ?></strong><br>
102
+ <?php _e('Remove standard fields from the quick edit form.', 'wp-nested-pages'); ?></p>
103
  </div>
104
  <div class="field">
105
+ <label><input type="checkbox" data-toggle-nestedpages-sf-settings name="nestedpages_posttypes[<?php echo $type->name; ?>][standard_fields_enabled]" value="true" <?php if ( $type->standard_fields_enabled ) echo 'checked '; ?>/><?php _e('Configure Standard Fields', 'wp-nested-pages'); ?></label>
106
 
107
  <div class="standard-fields">
108
+ <h5><?php _e('Check to remove from Quick Edit.', 'wp-nested-pages'); ?></h5>
109
  <div class="custom-field-group">
110
  <ul>
111
  <?php
147
  <li>
148
  <div class="row">
149
  <div class="description">
150
+ <p><strong><?php _e('Configure Custom Fields', 'wp-nested-pages'); ?></strong><br>
151
+ <?php _e('Set which custom fields display in the quick edit form.', 'wp-nested-pages'); ?></p>
152
  </div>
153
  <div class="field">
154
+ <label><input type="checkbox" data-toggle-nestedpages-cf-settings name="nestedpages_posttypes[<?php echo $type->name; ?>][custom_fields_enabled]" value="true" <?php if ( $type->custom_fields_enabled ) echo 'checked'; ?> /><?php _e('Configure Custom Fields', 'wp-nested-pages'); ?></label>
155
 
156
  <div class="custom-fields">
157
+ <h5><?php _e('Check to Include in Quick Edit.', 'wp-nested-pages'); ?></h5>
158
  <?php
159
  // Advanced Custom Fields
160
  $acf_fields = $this->integrations->plugins->acf->getFieldsForPostType($type->name);
161
  if ( $acf_fields ) :
162
  $out = '<div class="custom-field-group">';
163
+ $out .= '<p>' . __('Advanced Custom Fields', 'wp-nested-pages') . '</p>';
164
  $out .= '<ul class="indented">';
165
  foreach ($acf_fields as $field){
166
  $out .= '<li>';
175
  $out .= '</div><!-- .custom-field-group -->';
176
  echo $out;
177
  else :
178
+ echo __('No ACF Fields configured for this post type', 'wp-nested-pages');
179
  endif;
180
  ?>
181
  </div><!-- .custom-fields -->
191
 
192
  <div class="nestedpages-settings-disclaimers">
193
  <p style="font-size:12px;margin-bottom:15px;">
194
+ *<?php _e('If default menu is not replaced, an additional submenu item will be added for "Nested/Sort View"', 'wp-nested-pages'); ?>
195
  </p>
196
  <p style="font-size:12px;">
197
+ **<?php _e('<strong>Important:</strong> Changing page structures on live sites may effect SEO and existing inbound links. Limit URL structure changes on live sites by disabling nesting. Sorting within the current nesting structure will still be available. If nesting changes are made to a live site, it may help to add a 301 redirect from the old location to the new one.', 'wp-nested-pages'); ?>
198
  </p>
199
  </div>
app/Views/settings/settings.php CHANGED
@@ -1,13 +1,13 @@
1
  <div class="wrap">
2
- <h1><?php _e('Nested Pages Settings', 'nestedpages'); ?></h1>
3
 
4
  <h2 class="nav-tab-wrapper">
5
  <a class="nav-tab <?php if ( $tab == 'general' ) echo 'nav-tab-active'; ?>" href="options-general.php?page=nested-pages-settings">
6
- <?php _e('General', 'nestedpages'); ?>
7
  </a>
8
  <?php if ( count($this->getPostTypes()) > 0 ) : ?>
9
  <a class="nav-tab <?php if ( $tab == 'posttypes' ) echo 'nav-tab-active'; ?>" href="options-general.php?page=nested-pages-settings&tab=posttypes">
10
- <?php _e('Post Types', 'nestedpages'); ?>
11
  </a>
12
  <?php endif; ?>
13
  </h2>
1
  <div class="wrap">
2
+ <h1><?php _e('Nested Pages Settings', 'wp-nested-pages'); ?></h1>
3
 
4
  <h2 class="nav-tab-wrapper">
5
  <a class="nav-tab <?php if ( $tab == 'general' ) echo 'nav-tab-active'; ?>" href="options-general.php?page=nested-pages-settings">
6
+ <?php _e('General', 'wp-nested-pages'); ?>
7
  </a>
8
  <?php if ( count($this->getPostTypes()) > 0 ) : ?>
9
  <a class="nav-tab <?php if ( $tab == 'posttypes' ) echo 'nav-tab-active'; ?>" href="options-general.php?page=nested-pages-settings&tab=posttypes">
10
+ <?php _e('Post Types', 'wp-nested-pages'); ?>
11
  </a>
12
  <?php endif; ?>
13
  </h2>
nestedpages.php CHANGED
@@ -3,10 +3,10 @@
3
  Plugin Name: Nested Pages
4
  Plugin URI: http://nestedpages.com
5
  Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while enhancing quick edit. Includes an auto-generated menu to match the nested interface, support for all post types and more.
6
- Version: 1.6.6
7
  Author: Kyle Phillips
8
  Author URI: https://github.com/kylephillips
9
- Text Domain: nestedpages
10
  Domain Path: /languages/
11
  License: GPLv2 or later.
12
  Copyright: Kyle Phillips
3
  Plugin Name: Nested Pages
4
  Plugin URI: http://nestedpages.com
5
  Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while enhancing quick edit. Includes an auto-generated menu to match the nested interface, support for all post types and more.
6
+ Version: 1.6.7
7
  Author: Kyle Phillips
8
  Author URI: https://github.com/kylephillips
9
+ Text Domain: wp-nested-pages
10
  Domain Path: /languages/
11
  License: GPLv2 or later.
12
  Copyright: Kyle Phillips
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: kylephillips
3
  Donate link: http://nestedpages.com/
4
  Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
5
  Requires at least: 3.8
6
- Tested up to: 4.6
7
- Stable tag: 1.6.5.1
8
 
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -99,6 +99,10 @@ As of version 1.6, yes. Visit Settings > Nested Pages > Post Types to configure
99
 
100
  == Changelog ==
101
 
 
 
 
 
102
  = 1.6.6 =
103
  * Important security update: XSS vulnerability fix
104
 
3
  Donate link: http://nestedpages.com/
4
  Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
5
  Requires at least: 3.8
6
+ Tested up to: 4.7
7
+ Stable tag: 1.6.6
8
 
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
99
 
100
  == Changelog ==
101
 
102
+ = 1.6.7 =
103
+ * Multisite superadmins treated as admins (Thanks to Kristoffer Svanmark)
104
+ * Text domain change from v1.6.4 integrated
105
+
106
  = 1.6.6 =
107
  * Important security update: XSS vulnerability fix
108