Nested Pages - Version 1.5.4

Version Description

  • Spanish translation added (Thanks to Ral Martnez)
  • Various bug fixes related to WordPress 4.4 update
  • Duplicate menu items bug fix
Download this release

Release Info

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

Code changes from version 1.5.3 to 1.5.4

app/Entities/Confirmation/TrashConfirmation.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
 
3
  namespace NestedPages\Entities\Confirmation;
4
 
5
  /**
6
  * Confirm page(s) moved to trash
7
  */
8
- class TrashConfirmation implements ConfirmationInterface
9
  {
10
 
11
  public function setMessage()
@@ -13,9 +13,9 @@ class TrashConfirmation implements ConfirmationInterface
13
  $out = '';
14
  $trashed = ( explode(',', $_GET['ids']) );
15
  if ( count($trashed) > 1 ){
16
- $out .= count($trashed) . ' ' . __('pages moved to the Trash', 'nestedpages');
17
  } else {
18
- $out .= '<strong>' . get_the_title($trashed[0]) . ' </strong>' . __('moved to the Trash', 'nestedpages');
19
 
20
  // Undo Link
21
  if ( current_user_can('delete_pages') ) {
@@ -26,4 +26,4 @@ class TrashConfirmation implements ConfirmationInterface
26
  return $out;
27
  }
28
 
29
- }
1
+ <?php
2
 
3
  namespace NestedPages\Entities\Confirmation;
4
 
5
  /**
6
  * Confirm page(s) moved to trash
7
  */
8
+ class TrashConfirmation implements ConfirmationInterface
9
  {
10
 
11
  public function setMessage()
13
  $out = '';
14
  $trashed = ( explode(',', $_GET['ids']) );
15
  if ( count($trashed) > 1 ){
16
+ $out .= count($trashed) . ' ' . __('pages moved to the Trash.', 'nestedpages');
17
  } else {
18
+ $out .= '<strong>' . get_the_title($trashed[0]) . ' </strong>' . __('moved to the Trash.', 'nestedpages');
19
 
20
  // Undo Link
21
  if ( current_user_can('delete_pages') ) {
26
  return $out;
27
  }
28
 
29
+ }
app/Entities/Confirmation/TrashRestoredConfirmation.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
 
3
  namespace NestedPages\Entities\Confirmation;
4
 
5
  /**
6
  * Confirm page(s) restored from trash
7
  */
8
- class TrashRestoredConfirmation implements ConfirmationInterface
9
  {
10
 
11
  public function setMessage()
12
  {
13
  $untrashed = sanitize_text_field($_GET['untrashed']);
14
  $page = ( intval($untrashed) > 1 ) ? __('pages', 'nestedpages') : __('page', 'nestedpages');
15
- $out = $untrashed . ' ' . $page . ' ' . __('restored from trash', 'nestedpages');
16
  return $out;
17
  }
18
 
19
- }
1
+ <?php
2
 
3
  namespace NestedPages\Entities\Confirmation;
4
 
5
  /**
6
  * Confirm page(s) restored from trash
7
  */
8
+ class TrashRestoredConfirmation implements ConfirmationInterface
9
  {
10
 
11
  public function setMessage()
12
  {
13
  $untrashed = sanitize_text_field($_GET['untrashed']);
14
  $page = ( intval($untrashed) > 1 ) ? __('pages', 'nestedpages') : __('page', 'nestedpages');
15
+ $out = $untrashed . ' ' . $page . ' ' . __('restored from trash.', 'nestedpages');
16
  return $out;
17
  }
18
 
19
+ }
app/Entities/Listing/Listing.php CHANGED
@@ -247,7 +247,7 @@ class Listing
247
  * Loop through all the pages and create the nested / sortable list
248
  * Recursive Method, called in page.php view
249
  */
250
- private function loopPosts($parent_id = 0, $count = 0)
251
  {
252
  $this->setTaxonomies();
253
 
@@ -271,10 +271,11 @@ class Listing
271
  if ( $this->isSearch() ) $query_args = $this->searchParams($query_args);
272
  if ( $this->isFiltered() ) $query_args = $this->filterParams($query_args);
273
 
274
- $pages = new \WP_Query(apply_filters('nestedpages_page_listing', $query_args));
275
 
276
  if ( $pages->have_posts() ) :
277
  $count++;
 
278
 
279
  if ( $this->publishCount($pages) > 1 ){
280
  $this->listOpening($pages, $count);
@@ -309,7 +310,7 @@ class Listing
309
 
310
  endif; // trash status
311
 
312
- if ( !$this->isSearch() ) $this->loopPosts($this->post->id, $count);
313
 
314
  if ( $this->post->status !== 'trash' ) {
315
  echo '</li>';
247
  * Loop through all the pages and create the nested / sortable list
248
  * Recursive Method, called in page.php view
249
  */
250
+ private function loopPosts($parent_id = 0, $count = 0, $nest_count = 0)
251
  {
252
  $this->setTaxonomies();
253
 
271
  if ( $this->isSearch() ) $query_args = $this->searchParams($query_args);
272
  if ( $this->isFiltered() ) $query_args = $this->filterParams($query_args);
273
 
274
+ $pages = new \WP_Query(apply_filters('nestedpages_page_listing', $query_args, $nest_count));
275
 
276
  if ( $pages->have_posts() ) :
277
  $count++;
278
+ $nest_count++;
279
 
280
  if ( $this->publishCount($pages) > 1 ){
281
  $this->listOpening($pages, $count);
310
 
311
  endif; // trash status
312
 
313
+ if ( !$this->isSearch() ) $this->loopPosts($this->post->id, $count, $nest_count);
314
 
315
  if ( $this->post->status !== 'trash' ) {
316
  echo '</li>';
app/Entities/NavMenu/NavMenuRepository.php CHANGED
@@ -41,8 +41,9 @@ class NavMenuRepository
41
  $prefix = $wpdb->prefix;
42
  $meta_table = $prefix . 'postmeta';
43
  $term_relationships_table = $prefix . 'term_relationships';
 
44
  $terms_table = $prefix . 'terms';
45
- $sql = "SELECT
46
  pm.post_id,
47
  t.term_id,
48
  t.name,
@@ -50,8 +51,10 @@ class NavMenuRepository
50
  FROM $meta_table AS pm
51
  LEFT JOIN $term_relationships_table AS tr
52
  ON tr.object_id = pm.post_id
 
 
53
  LEFT JOIN $terms_table AS t
54
- ON t.term_id = tr.term_taxonomy_id
55
  LEFT JOIN $meta_table AS pmx
56
  ON pmx.post_id = pm.post_id AND pmx.meta_key = '_menu_item_xfn'
57
  WHERE pm.meta_value = $id AND pm.meta_key = '_menu_item_object_id'
41
  $prefix = $wpdb->prefix;
42
  $meta_table = $prefix . 'postmeta';
43
  $term_relationships_table = $prefix . 'term_relationships';
44
+ $term_taxonomy_table = $prefix . 'term_taxonomy';
45
  $terms_table = $prefix . 'terms';
46
+ $sql = "SELECT
47
  pm.post_id,
48
  t.term_id,
49
  t.name,
51
  FROM $meta_table AS pm
52
  LEFT JOIN $term_relationships_table AS tr
53
  ON tr.object_id = pm.post_id
54
+ LEFT JOIN $term_taxonomy_table AS tt
55
+ ON tt.term_taxonomy_id = tr.term_taxonomy_id
56
  LEFT JOIN $terms_table AS t
57
+ ON t.term_id = tt.term_id
58
  LEFT JOIN $meta_table AS pmx
59
  ON pmx.post_id = pm.post_id AND pmx.meta_key = '_menu_item_xfn'
60
  WHERE pm.meta_value = $id AND pm.meta_key = '_menu_item_object_id'
app/Entities/NavMenu/NavMenuSyncListing.php CHANGED
@@ -38,36 +38,42 @@ class NavMenuSyncListing extends NavMenuSync
38
  /**
39
  * Recursive function loops through pages/links and their children
40
  */
41
- public function sync($parent = 0, $menu_parent = 0)
42
- {
43
- $this->count = $this->count + 1;
44
- $page_q = new \WP_Query(array(
45
- 'post_type' => array('page', 'np-redirect'),
46
- 'posts_per_page' => -1,
47
- 'post_status' => 'publish',
48
- 'orderby' => 'menu_order',
49
- 'order' => 'ASC',
50
- 'post_parent' => $parent
51
- ));
52
- if ( $page_q->have_posts() ) : while ( $page_q->have_posts() ) : $page_q->the_post();
53
- global $post;
54
- $this->post = $this->post_factory->build($post);
55
- $this->syncPost($menu_parent);
56
- endwhile; endif; wp_reset_postdata();
 
 
 
 
 
 
57
  }
58
 
59
  /**
60
  * Sync an individual item
61
  * @since 1.3.4
62
  */
63
- private function syncPost($menu_parent)
64
  {
65
  // Get the Menu Item
66
  $query_type = ( $this->post->type == 'np-redirect' ) ? 'xfn' : 'object_id';
67
  $menu_item_id = $this->nav_menu_repo->getMenuItem($this->post->id, $query_type);
68
  if ( $this->post->nav_status == 'hide' ) return $this->removeItem($menu_item_id);
69
  $menu = $this->syncMenuItem($menu_parent, $menu_item_id);
70
- $this->sync( $this->post->id, $menu );
71
  }
72
 
73
  /**
@@ -91,11 +97,14 @@ class NavMenuSyncListing extends NavMenuSync
91
  $xfn = 'page';
92
  }
93
 
 
 
 
94
  $args = array(
95
  'menu-item-title' => $title,
96
  'menu-item-position' => $this->count,
97
  'menu-item-url' => $url,
98
- 'menu-item-attr-title' => $this->post->nav_title_attr,
99
  'menu-item-status' => 'publish',
100
  'menu-item-classes' => $this->post->nav_css,
101
  'menu-item-type' => $type,
@@ -103,7 +112,8 @@ class NavMenuSyncListing extends NavMenuSync
103
  'menu-item-object-id' => $object_id,
104
  'menu-item-parent-id' => $menu_parent,
105
  'menu-item-xfn' => $xfn,
106
- 'menu-item-target' => $this->post->link_target
 
107
  );
108
  $menu = wp_update_nav_menu_item($this->id, $menu_item_id, $args);
109
  return $menu;
38
  /**
39
  * Recursive function loops through pages/links and their children
40
  */
41
+ public function sync($parent = 0, $menu_parent = 0, $nest_level = 0)
42
+ {
43
+ try {
44
+ $this->count = $this->count + 1;
45
+ $args = array(
46
+ 'post_type' => array('page', 'np-redirect'),
47
+ 'posts_per_page' => -1,
48
+ 'post_status' => 'publish',
49
+ 'orderby' => 'menu_order',
50
+ 'order' => 'ASC',
51
+ 'post_parent' => $parent
52
+ );
53
+ $page_q = new \WP_Query(apply_filters('nestedpages_menu_sync', $args, $nest_level));
54
+ if ( $page_q->have_posts() ) : while ( $page_q->have_posts() ) : $page_q->the_post();
55
+ $nest_level++;
56
+ global $post;
57
+ $this->post = $this->post_factory->build($post);
58
+ $this->syncPost($menu_parent, $nest_level);
59
+ endwhile; endif; wp_reset_postdata();
60
+ } catch ( \Exception $e ){
61
+ throw new \Exception($e->getMessage());
62
+ }
63
  }
64
 
65
  /**
66
  * Sync an individual item
67
  * @since 1.3.4
68
  */
69
+ private function syncPost($menu_parent, $nest_level)
70
  {
71
  // Get the Menu Item
72
  $query_type = ( $this->post->type == 'np-redirect' ) ? 'xfn' : 'object_id';
73
  $menu_item_id = $this->nav_menu_repo->getMenuItem($this->post->id, $query_type);
74
  if ( $this->post->nav_status == 'hide' ) return $this->removeItem($menu_item_id);
75
  $menu = $this->syncMenuItem($menu_parent, $menu_item_id);
76
+ $this->sync( $this->post->id, $menu, $nest_level );
77
  }
78
 
79
  /**
97
  $xfn = 'page';
98
  }
99
 
100
+ // WP 4.4 Fix, empty nav title attribute causing post_excerpt null error
101
+ $attr_title = ( $this->post->nav_title_attr ) ? $this->post->nav_title_attr : '';
102
+
103
  $args = array(
104
  'menu-item-title' => $title,
105
  'menu-item-position' => $this->count,
106
  'menu-item-url' => $url,
107
+ 'menu-item-attr-title' => $attr_title,
108
  'menu-item-status' => 'publish',
109
  'menu-item-classes' => $this->post->nav_css,
110
  'menu-item-type' => $type,
112
  'menu-item-object-id' => $object_id,
113
  'menu-item-parent-id' => $menu_parent,
114
  'menu-item-xfn' => $xfn,
115
+ 'menu-item-target' => $this->post->link_target,
116
+ 'menu-item-description' => ' '
117
  );
118
  $menu = wp_update_nav_menu_item($this->id, $menu_item_id, $args);
119
  return $menu;
app/Entities/Post/PostTrashActions.php CHANGED
@@ -76,6 +76,7 @@ class PostTrashActions
76
  private function resetToggles($post_id, $post_type)
77
  {
78
  $visible_pages = $this->user_repo->getVisiblePages();
 
79
  $visible_pages = $visible_pages[$post_type];
80
 
81
  if ( !isset($visible_pages[$post_type]) ) return;
76
  private function resetToggles($post_id, $post_type)
77
  {
78
  $visible_pages = $this->user_repo->getVisiblePages();
79
+ if ( !isset($visible_pages[$post_type]) ) return;
80
  $visible_pages = $visible_pages[$post_type];
81
 
82
  if ( !isset($visible_pages[$post_type]) ) return;
app/Entities/PostType/RegisterPostTypes.php CHANGED
@@ -34,6 +34,7 @@ class RegisterPostTypes
34
  'hierarchical' => true,
35
  'has_archive' => false,
36
  'supports' => array('title','editor'),
 
37
  'rewrite' => array('slug' => 'np-redirect', 'with_front' => false)
38
  );
39
  register_post_type( 'np-redirect' , $args );
34
  'hierarchical' => true,
35
  'has_archive' => false,
36
  'supports' => array('title','editor'),
37
+ '_edit_link' => 'post.php?post=%d',
38
  'rewrite' => array('slug' => 'np-redirect', 'with_front' => false)
39
  );
40
  register_post_type( 'np-redirect' , $args );
app/Form/Listeners/BaseHandler.php CHANGED
@@ -89,13 +89,17 @@ abstract class BaseHandler
89
  protected function syncMenu()
90
  {
91
  if ( $_POST['post_type'] == 'page' ) {
92
- if ( $_POST['syncmenu'] == 'sync' ){
 
 
 
 
93
  $menu = new NavMenuSyncListing;
94
  $menu->sync();
95
- update_option('nestedpages_menusync', 'sync');
96
- } else {
97
- update_option('nestedpages_menusync', 'nosync');
98
  }
 
99
  }
100
  }
101
 
@@ -111,6 +115,17 @@ abstract class BaseHandler
111
  $this->sendResponse();
112
  }
113
 
 
 
 
 
 
 
 
 
 
 
 
114
  /**
115
  * Return Response
116
  */
89
  protected function syncMenu()
90
  {
91
  if ( $_POST['post_type'] == 'page' ) {
92
+ if ( $_POST['syncmenu'] !== 'sync' ){
93
+ return update_option('nestedpages_menusync', 'nosync');
94
+ }
95
+ update_option('nestedpages_menusync', 'sync');
96
+ try {
97
  $menu = new NavMenuSyncListing;
98
  $menu->sync();
99
+ } catch ( \Exception $e ){
100
+ return $this->exception($e->getMessage());
 
101
  }
102
+ return;
103
  }
104
  }
105
 
115
  $this->sendResponse();
116
  }
117
 
118
+ /**
119
+ * Send Error from Exception
120
+ */
121
+ protected function exception($message)
122
+ {
123
+ return wp_send_json(array(
124
+ 'status' => 'error',
125
+ 'message' => $message
126
+ ));
127
+ }
128
+
129
  /**
130
  * Return Response
131
  */
app/Form/Listeners/NewMenuItem.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
 
3
  namespace NestedPages\Form\Listeners;
4
 
@@ -8,7 +8,7 @@ use NestedPages\Helpers;
8
  * Creates new Menu item and saves redirect post
9
  * @return json response
10
  */
11
- class NewMenuItem extends BaseHandler
12
  {
13
  public function __construct()
14
  {
@@ -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
  /**
@@ -35,16 +35,16 @@ class NewMenuItem extends BaseHandler
35
  {
36
  $new_link = $this->post_update_repo->saveRedirect($this->data);
37
  if ( !$new_link ) $this->sendErrorResponse();
38
-
39
  $this->data['post'] = $_POST;
40
  $this->data['post']['id'] = $new_link;
41
  $this->data['post']['content'] = esc_url($_POST['url']);
42
  $this->data['post']['delete_link'] = get_delete_post_link($new_link, '', true);
43
  $this->addExtras($new_link);
44
-
45
  $this->response = array(
46
- 'status' => 'success',
47
- 'message' => __('Link successfully updated', 'nestedpages'),
48
  'post_data' => $this->data['post']
49
  );
50
  }
@@ -61,7 +61,7 @@ class NewMenuItem extends BaseHandler
61
  if ( $type == 'custom' ){
62
  $this->data['post']['original_link'] = null;
63
  $this->data['post']['original_title'] = null;
64
- return;
65
  }
66
  if ( $type == 'taxonomy' ){
67
  $term = get_term_by('id', $this->data['post']['objectId'], $this->data['post']['objectType']);
@@ -74,4 +74,4 @@ class NewMenuItem extends BaseHandler
74
  $this->data['post']['original_title'] = get_the_title($id);
75
  }
76
 
77
- }
1
+ <?php
2
 
3
  namespace NestedPages\Form\Listeners;
4
 
8
  * Creates new Menu item and saves redirect post
9
  * @return json response
10
  */
11
+ class NewMenuItem extends BaseHandler
12
  {
13
  public function __construct()
14
  {
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
  /**
35
  {
36
  $new_link = $this->post_update_repo->saveRedirect($this->data);
37
  if ( !$new_link ) $this->sendErrorResponse();
38
+
39
  $this->data['post'] = $_POST;
40
  $this->data['post']['id'] = $new_link;
41
  $this->data['post']['content'] = esc_url($_POST['url']);
42
  $this->data['post']['delete_link'] = get_delete_post_link($new_link, '', true);
43
  $this->addExtras($new_link);
44
+
45
  $this->response = array(
46
+ 'status' => 'success',
47
+ 'message' => __('Link successfully updated.', 'nestedpages'),
48
  'post_data' => $this->data['post']
49
  );
50
  }
61
  if ( $type == 'custom' ){
62
  $this->data['post']['original_link'] = null;
63
  $this->data['post']['original_title'] = null;
64
+ return;
65
  }
66
  if ( $type == 'taxonomy' ){
67
  $term = get_term_by('id', $this->data['post']['objectId'], $this->data['post']['objectType']);
74
  $this->data['post']['original_title'] = get_the_title($id);
75
  }
76
 
77
+ }
app/Form/Listeners/QuickEdit.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
 
3
  namespace NestedPages\Form\Listeners;
4
 
@@ -6,7 +6,7 @@ namespace NestedPages\Form\Listeners;
6
  * Handles processing the quick edit form
7
  * @return json response
8
  */
9
- class QuickEdit extends BaseHandler
10
  {
11
 
12
  public function __construct()
@@ -28,8 +28,8 @@ class QuickEdit extends BaseHandler
28
  if ( isset($this->data['tax_input']) ) $this->addFlatTaxonomies();
29
  $this->addData();
30
  $this->response = array(
31
- 'status' => 'success',
32
- 'message' => __('Post successfully updated'),
33
  'post_data' => $this->data
34
  );
35
  }
@@ -69,4 +69,4 @@ class QuickEdit extends BaseHandler
69
  if ( !isset($_POST['comment_status']) ) $this->data['comment_status'] = 'closed';
70
  }
71
 
72
- }
1
+ <?php
2
 
3
  namespace NestedPages\Form\Listeners;
4
 
6
  * Handles processing the quick edit form
7
  * @return json response
8
  */
9
+ class QuickEdit extends BaseHandler
10
  {
11
 
12
  public function __construct()
28
  if ( isset($this->data['tax_input']) ) $this->addFlatTaxonomies();
29
  $this->addData();
30
  $this->response = array(
31
+ 'status' => 'success',
32
+ 'message' => __('Post successfully updated.'),
33
  'post_data' => $this->data
34
  );
35
  }
69
  if ( !isset($_POST['comment_status']) ) $this->data['comment_status'] = 'closed';
70
  }
71
 
72
+ }
app/Form/Listeners/QuickEditLink.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
 
3
  namespace NestedPages\Form\Listeners;
4
 
@@ -6,7 +6,7 @@ namespace NestedPages\Form\Listeners;
6
  * Handles processing the quick edit form for redirects
7
  * @return json response
8
  */
9
- class QuickEditLink extends BaseHandler
10
  {
11
 
12
  public function __construct()
@@ -26,8 +26,8 @@ class QuickEditLink extends BaseHandler
26
  if ( !$updated ) $this->sendErrorResponse();
27
  $this->addData();
28
  $this->response = array(
29
- 'status' => 'success',
30
- 'message' => __('Link successfully updated', 'nestedpages'),
31
  'post_data' => $this->data
32
  );
33
  }
@@ -42,4 +42,4 @@ class QuickEditLink extends BaseHandler
42
  $this->data['linkTarget'] = ( isset($this->data['linkTarget']) ) ? '_blank' : 'none';
43
  }
44
 
45
- }
1
+ <?php
2
 
3
  namespace NestedPages\Form\Listeners;
4
 
6
  * Handles processing the quick edit form for redirects
7
  * @return json response
8
  */
9
+ class QuickEditLink extends BaseHandler
10
  {
11
 
12
  public function __construct()
26
  if ( !$updated ) $this->sendErrorResponse();
27
  $this->addData();
28
  $this->response = array(
29
+ 'status' => 'success',
30
+ 'message' => __('Link successfully updated.', 'nestedpages'),
31
  'post_data' => $this->data
32
  );
33
  }
42
  $this->data['linkTarget'] = ( isset($this->data['linkTarget']) ) ? '_blank' : 'none';
43
  }
44
 
45
+ }
app/Form/Listeners/SyncMenu.php CHANGED
@@ -21,14 +21,19 @@ class SyncMenu extends BaseHandler
21
  */
22
  private function updateSync()
23
  {
24
- if ( $this->data['syncmenu'] == 'sync' ){
25
- update_option('nestedpages_menusync', 'sync');
26
- $this->syncMenu();
27
- $this->response = array('status'=>'success', 'message'=> __('Menu sync enabled.'));
28
- } else {
29
- update_option('nestedpages_menusync', 'nosync');
30
- $this->response = array('status'=>'success', 'message'=> __('Menu sync disabled.'));
31
- }
 
 
 
 
 
32
  }
33
 
34
  }
21
  */
22
  private function updateSync()
23
  {
24
+ if ( $this->data['syncmenu'] == 'sync' ) return $this->sync();
25
+ update_option('nestedpages_menusync', 'nosync');
26
+ $this->response = array('status'=>'success', 'message'=> __('Menu sync disabled.'));
27
+ }
28
+
29
+ /**
30
+ * Sync the Menu
31
+ */
32
+ private function sync()
33
+ {
34
+ update_option('nestedpages_menusync', 'sync');
35
+ $this->syncMenu();
36
+ $this->response = array('status'=>'success', 'message'=> __('Menu sync enabled.'));
37
  }
38
 
39
  }
app/Helpers.php CHANGED
@@ -23,7 +23,7 @@ class Helpers
23
  */
24
  public static function plugin_url()
25
  {
26
- return plugins_url('/', NESTEDPAGES_DIR);
27
  }
28
 
29
  /**
23
  */
24
  public static function plugin_url()
25
  {
26
+ return plugins_url('/', NESTEDPAGES_URI);
27
  }
28
 
29
  /**
app/NestedPages.php CHANGED
@@ -12,9 +12,9 @@ class NestedPages
12
  $np_env = 'live';
13
 
14
  global $np_version;
15
- $np_version = '1.5.3';
16
 
17
  if ( is_admin() ) $app = new NestedPages\Bootstrap;
18
- if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
19
  }
20
  }
12
  $np_env = 'live';
13
 
14
  global $np_version;
15
+ $np_version = '1.5.4';
16
 
17
  if ( is_admin() ) $app = new NestedPages\Bootstrap;
18
+ //if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
19
  }
20
  }
app/RedirectsFrontEnd.php CHANGED
@@ -28,7 +28,7 @@ class RedirectsFrontEnd
28
  if ( $parent_type == 'np-redirect' ){
29
  $parent_post = get_post($post->post_parent);
30
  $slug = str_replace($parent_post->post_name . '/', '', $slug);
31
- return $this->removeParentSlugs($parent_post, $slug);
32
  }
33
  return $slug;
34
  }
@@ -56,4 +56,4 @@ class RedirectsFrontEnd
56
  $query->set('post_type', 'page');
57
  }
58
 
59
- }
28
  if ( $parent_type == 'np-redirect' ){
29
  $parent_post = get_post($post->post_parent);
30
  $slug = str_replace($parent_post->post_name . '/', '', $slug);
31
+ return $slug;
32
  }
33
  return $slug;
34
  }
56
  $query->set('post_type', 'page');
57
  }
58
 
59
+ }
app/Views/listing.php CHANGED
@@ -24,6 +24,8 @@
24
  <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">Dismiss this notice.</span></button></div>
25
  <?php endif; ?>
26
 
 
 
27
  <div class="nestedpages-top-toggles">
28
  <?php if ( $this->post_type->hierarchical && !$this->isSearch() ) : ?>
29
  <a href="#" class="np-btn nestedpages-toggleall" data-toggle="closed"><?php _e('Expand All', 'nestedpages'); ?></a>
24
  <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">Dismiss this notice.</span></button></div>
25
  <?php endif; ?>
26
 
27
+ <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">Dismiss this notice.</span></button></div>
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 _e('Expand All', 'nestedpages'); ?></a>
app/Views/partials/tool-list.php CHANGED
@@ -3,27 +3,27 @@
3
 
4
  <ul class="subsubsub">
5
  <li>
6
- <a href="#all" class="np-toggle-publish active"><?php _e('All'); ?></a> |
7
  </li>
8
-
9
  <li>
10
- <a href="#published" class="np-toggle-publish"><?php _e('Published'); ?></a> |
11
  </li>
12
 
13
  <li>
14
- <a href="#draft" class="np-toggle-publish"><?php _e('Draft'); ?></a> |
15
  </li>
16
-
17
  <li>
18
  <a href="#show" class="np-toggle-hidden"><?php _e('Show Hidden', 'nestedpages'); ?> </a>
19
- <span class="count">(<?php echo $this->post_repo->getHiddenCount(array($this->post_type->name)); ?>)</span> |
20
  </li>
21
-
22
  <?php if ( current_user_can('delete_pages') && $trashedCount > 0) : ?>
23
  <li class="np-trash-links">
24
  <a href="<?php echo $this->post_type_repo->trashLink($this->post_type->name); ?>"><?php _e('Trash'); ?> </a>
25
  <span class="count">(<a href="#" class="np-empty-trash" data-posttype="<?php echo $this->post_type->name; ?>"><?php _e('Empty', 'nestedpages'); ?></a> <?php echo $trashedCount; ?>)</span>
26
- |
27
  </li>
28
  <?php endif; ?>
29
 
@@ -59,7 +59,7 @@
59
  <select id="np_orderby" name="np_orderby" class="nestedpages-sort">
60
  <?php
61
  $options = array(
62
- 'menu_order' => __('Menu Order', 'nestedpages'),
63
  'date' => __('Date', 'nestedpages'),
64
  'title' => __('Title', 'nestedpages')
65
  );
@@ -77,8 +77,8 @@
77
  <select id="np_order" name="np_order" class="nestedpages-sort">
78
  <?php
79
  $options = array(
80
- 'ASC' => __('Ascending', 'nestedpages'),
81
- 'DESC' => __('Decending', 'nestedpages')
82
  );
83
  $out = '';
84
  foreach ( $options as $key => $option ){
@@ -138,4 +138,4 @@
138
  </div><!-- .np-tools-search -->
139
 
140
 
141
- </div><!-- .nestedpages-tools -->
3
 
4
  <ul class="subsubsub">
5
  <li>
6
+ <a href="#all" class="np-toggle-publish active"><?php _e('All'); ?></a> |
7
  </li>
8
+
9
  <li>
10
+ <a href="#published" class="np-toggle-publish"><?php _e('Published'); ?></a> |
11
  </li>
12
 
13
  <li>
14
+ <a href="#draft" class="np-toggle-publish"><?php _e('Draft'); ?></a> |
15
  </li>
16
+
17
  <li>
18
  <a href="#show" class="np-toggle-hidden"><?php _e('Show Hidden', 'nestedpages'); ?> </a>
19
+ <span class="count">(<?php echo $this->post_repo->getHiddenCount(array($this->post_type->name)); ?>)</span> |
20
  </li>
21
+
22
  <?php if ( current_user_can('delete_pages') && $trashedCount > 0) : ?>
23
  <li class="np-trash-links">
24
  <a href="<?php echo $this->post_type_repo->trashLink($this->post_type->name); ?>"><?php _e('Trash'); ?> </a>
25
  <span class="count">(<a href="#" class="np-empty-trash" data-posttype="<?php echo $this->post_type->name; ?>"><?php _e('Empty', 'nestedpages'); ?></a> <?php echo $trashedCount; ?>)</span>
26
+ |
27
  </li>
28
  <?php endif; ?>
29
 
59
  <select id="np_orderby" name="np_orderby" class="nestedpages-sort">
60
  <?php
61
  $options = array(
62
+ 'menu_order' => __('Menu Order', 'nestedpages'),
63
  'date' => __('Date', 'nestedpages'),
64
  'title' => __('Title', 'nestedpages')
65
  );
77
  <select id="np_order" name="np_order" class="nestedpages-sort">
78
  <?php
79
  $options = array(
80
+ 'ASC' => __('Ascending', 'nestedpages'),
81
+ 'DESC' => __('Descending', 'nestedpages')
82
  );
83
  $out = '';
84
  foreach ( $options as $key => $option ){
138
  </div><!-- .np-tools-search -->
139
 
140
 
141
+ </div><!-- .nestedpages-tools -->
assets/js/lib/nestedpages-factory.js CHANGED
@@ -29,6 +29,7 @@ NestedPages.selectors = {
29
  errorDiv : '#np-error', // Error Alert
30
  loadingIndicator : '#nested-loading', // Loading Indicator,
31
  syncCheckbox : '.np-sync-menu', // Sync menu checkbox
 
32
 
33
  // Responsive Toggle
34
  toggleEditButtons : '.np-toggle-edit', // Button that toggles responsive buttons
@@ -168,6 +169,9 @@ NestedPages.Factory = function()
168
  plugin.formatter.removeQuickEdit();
169
  plugin.newPage.cancelNewPage();
170
  });
 
 
 
171
  }
172
 
173
 
29
  errorDiv : '#np-error', // Error Alert
30
  loadingIndicator : '#nested-loading', // Loading Indicator,
31
  syncCheckbox : '.np-sync-menu', // Sync menu checkbox
32
+ ajaxError : '[data-nestedpages-error]', // AJAX error notification
33
 
34
  // Responsive Toggle
35
  toggleEditButtons : '.np-toggle-edit', // Button that toggles responsive buttons
169
  plugin.formatter.removeQuickEdit();
170
  plugin.newPage.cancelNewPage();
171
  });
172
+ $(document).ready(function(){
173
+ plugin.formatter.hideAjaxError();
174
+ });
175
  }
176
 
177
 
assets/js/lib/nestedpages.formatter.js CHANGED
@@ -121,4 +121,19 @@ NestedPages.Formatter = function()
121
  }
122
 
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  }
121
  }
122
 
123
 
124
+ // Show an error message
125
+ plugin.showAjaxError = function(message)
126
+ {
127
+ $(NestedPages.selectors.ajaxError).find('p').text(message);
128
+ $(NestedPages.selectors.ajaxError).show();
129
+ }
130
+
131
+
132
+ // Hide the error message
133
+ plugin.hideAjaxError = function(message)
134
+ {
135
+ $(NestedPages.selectors.ajaxError).hide();
136
+ }
137
+
138
+
139
  }
assets/js/lib/nestedpages.new-page.js CHANGED
@@ -156,9 +156,10 @@ NestedPages.NewPage = function()
156
  plugin.posts = data.new_pages;
157
  plugin.addPosts();
158
  },
159
- error: function(){
 
160
  plugin.toggleLoading(false);
161
- $(form).find(NestedPages.selectors.quickEditErrorDiv).text('The form could not be saved at this time.').show();
162
  }
163
  });
164
  }
156
  plugin.posts = data.new_pages;
157
  plugin.addPosts();
158
  },
159
+ error: function(data){
160
+ console.log(data);
161
  plugin.toggleLoading(false);
162
+ $(plugin.form).find(NestedPages.selectors.quickEditErrorDiv).text('The form could not be saved at this time.').show();
163
  }
164
  });
165
  }
assets/js/lib/nestedpages.sync-menu-setting.js CHANGED
@@ -10,6 +10,8 @@ NestedPages.SyncMenuSetting = function()
10
  var plugin = this;
11
  var $ = jQuery;
12
 
 
 
13
  plugin.init = function()
14
  {
15
  plugin.bindEvents();
@@ -46,7 +48,7 @@ NestedPages.SyncMenuSetting = function()
46
  },
47
  success: function(data){
48
  if (data.status === 'error'){
49
- alert('There was an error saving the sync setting.')
50
  }
51
  },
52
  });
10
  var plugin = this;
11
  var $ = jQuery;
12
 
13
+ plugin.formatter = new NestedPages.Formatter;
14
+
15
  plugin.init = function()
16
  {
17
  plugin.bindEvents();
48
  },
49
  success: function(data){
50
  if (data.status === 'error'){
51
+ plugin.formatter.showAjaxError(data.message);
52
  }
53
  },
54
  });
assets/js/nestedpages.min.js CHANGED
@@ -1,2 +1,2 @@
1
- var NestedPages=NestedPages||{};NestedPages.Responsive=function(){var e=this,t=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.toggleEditButtons,function(a){a.preventDefault(),e.toggleEdit(t(this))}),t(window).resize(function(){e.timer(function(){t(".action-buttons").removeAttr("style"),t(".np-toggle-edit").removeClass("active")},500)})},e.toggleEdit=function(e){var a=t(e).siblings(".action-buttons");return t(a).is(":visible")?(t(e).removeClass("active"),void t(a).hide()):(t(e).addClass("active"),void t(a).show())},e.timer=function(){var e=0;return function(t,a){clearTimeout(e),e=setTimeout(t,a)}}(),e.init()};var NestedPages=NestedPages||{};NestedPages.Formatter=function(){var e=this,t=jQuery;e.updateSubMenuToggle=function(){for(var e=t(NestedPages.selectors.childToggle),a=0;a<e.length;a++){var s=e[a],n=t(s).parent(".row").parent("li");if(t(n).children("ol").length>0){var o=t(n).children("ol:visible").length>0?NestedPages.cssClasses.iconToggleDown:NestedPages.cssClasses.iconToggleRight;t(s).html('<a href="#"><i class="'+o+'"></i></a>'),t(n).children("ol").children(".np-hide").length>0&&0===t(n).children("ol").children(".np-hide.shown").length?t(s).find("a").hide():t(n).children("ol").children(".np-hide").length>0&&t(n).children("ol").children(".np-hide.shown").length>0&&t(s).find("a").show()}else t(s).empty()}},e.setBorders=function(){t(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder),t.each(t(NestedPages.selectors.lists),function(){t(this).find(".page-row:visible:first").addClass(NestedPages.cssClasses.noborder)})},e.setNestedMargins=function(){t.each(t(NestedPages.selectors.lists),function(){var e=t(this).parents(NestedPages.selectors.lists).length,a=56;if(e>0){var a=20*e+a;return void t(this).find(".row-inner").css("padding-left",a+"px")}t(this).find(".row-inner").css("padding-left","0px")})},e.updatePlaceholderWidth=function(a){if(NestedPages.jsData.nestable){var s=t(a.placeholder).parents("ol").length,n=t(NestedPages.selectors.sortable).width(),o=40*s-40,i=n-o;t(a.placeholder).width(i).css("margin-left",o+"px")}e.updateListVisibility(a)},e.updateListVisibility=function(e){var a=t(e.placeholder).parent("ol");t(a).is(":visible")||(t(a).addClass("nplist"),t(a).show())},e.removeQuickEdit=function(){t(NestedPages.selectors.quickEditOverlay).removeClass("active").remove(),t(".sortable .quick-edit").remove(),t(".row").show()},e.showQuickEdit=function(){t("body").append('<div class="np-inline-overlay"></div>'),setTimeout(function(){t(".np-inline-overlay").addClass("active")},50)},e.flashRow=function(a){t(a).addClass("np-updated"),e.setBorders(),setTimeout(function(){t(a).addClass("np-updated-show")},1500)}};var NestedPages=NestedPages||{};NestedPages.MenuToggle=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.bindEvents=function(){t(document).on("click",NestedPages.selectors.childToggleLink,function(a){a.preventDefault(),e.toggleSingleMenu(t(this))}),t(document).on("click",NestedPages.selectors.toggleAll,function(t){t.preventDefault(),e.toggleAllMenus()})},e.toggleSingleMenu=function(a){var s=t(a).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings("ol");t(a).find("i").toggleClass(NestedPages.cssClasses.iconToggleDown).toggleClass(NestedPages.cssClasses.iconToggleRight),t(s).toggle(),e.formatter.setBorders(),e.formatter.setNestedMargins(),e.syncUserToggles()},e.toggleAllMenus=function(){var a=NestedPages.selectors.toggleAll;return"closed"===t(a).attr("data-toggle")?(t(NestedPages.selectors.lists).show(),t(a).attr("data-toggle","opened").text(NestedPages.jsData.collapseText),t(NestedPages.selectors.childToggle).find("i").removeClass(NestedPages.cssClasses.iconToggleRight).addClass(NestedPages.cssClasses.iconToggleDown),e.formatter.setBorders(),void e.syncUserToggles()):(t(NestedPages.selectors.lists).not(t(NestedPages.selectors.lists)[0]).hide(),t(a).attr("data-toggle","closed").text(NestedPages.jsData.expandText),t(NestedPages.selectors.childToggle).find("i").removeClass(NestedPages.cssClasses.iconToggleDown).addClass(NestedPages.cssClasses.iconToggleRight),e.formatter.setBorders(),void e.syncUserToggles())},e.visibleRowIDs=function(){var e=[],a=t(NestedPages.selectors.rows+":visible");return t.each(a,function(){var a=t(this).attr("id");e.push(a.replace("menuItem_",""))}),e},e.syncUserToggles=function(){t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncToggles,nonce:NestedPages.jsData.nonce,ids:e.visibleRowIDs(),posttype:NestedPages.jsData.posttype},success:function(e){"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},e.bindEvents()};var NestedPages=NestedPages||{};NestedPages.PageToggle=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.toggleHidden,function(t){t.preventDefault(),e.toggleHidden()}),t(document).on("click",NestedPages.selectors.toggleStatus,function(a){a.preventDefault(),e.toggleStatus(t(this))})},e.toggleHidden=function(){var a=NestedPages.selectors.toggleHidden,s=t(a).attr("href");return"show"===s?(t(a).attr("href","hide").text(NestedPages.jsData.showHiddenText),t(NestedPages.selectors.hiddenRows).removeClass("shown").hide(),e.formatter.updateSubMenuToggle(),void e.formatter.setBorders()):(t(a).attr("href","show").text(NestedPages.jsData.hideHiddenText),t(NestedPages.selectors.hiddenRows).addClass("shown").show(),e.formatter.updateSubMenuToggle(),void e.formatter.setBorders())},e.toggleStatus=function(e){var a=t(e).attr("href");return a=a.substring(1),t(NestedPages.selectors.toggleStatus).removeClass("active"),t(e).addClass("active"),"all"==a?void t(NestedPages.selectors.rows).show():(t(NestedPages.selectors.rows).hide(),void t("."+a).show())},e.init()};var NestedPages=NestedPages||{};NestedPages.Nesting=function(){var e=this,t=jQuery;e.formatter=new NestedPages.Formatter,e.initializeSortable=function(){maxLevels=NestedPages.jsData.nestable?0:1,t(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({items:NestedPages.selectors.rows,toleranceElement:"> .row",handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",maxLevels:maxLevels,tabSize:56,start:function(e,t){t.placeholder.height(t.item.height())},sort:function(t,a){e.formatter.updatePlaceholderWidth(a)},stop:function(){setTimeout(function(){e.formatter.updateSubMenuToggle(),e.formatter.setBorders(),e.formatter.setNestedMargins()},100),e.syncNesting()}})},e.disableNesting=function(){t(NestedPages.selectors.sortable).sortable("destroy")},e.syncNesting=function(){t(NestedPages.selectors.errorDiv).hide(),t(NestedPages.selectors.loadingIndicator).show(),list=t(NestedPages.selectors.sortable).nestedSortable("toHierarchy",{startDepthCount:0}),e.disableNesting(),t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncNesting,nonce:NestedPages.jsData.nonce,list:list,post_type:NestedPages.jsData.posttype,syncmenu:NestedPages.jsData.syncmenu},success:function(a){e.initializeSortable(),"error"===a.status?(t(NestedPages.selectors.errorDiv).text(a.message).show(),t(NestedPages.selectors.loadingIndicator).hide()):t(NestedPages.selectors.loadingIndicator).hide()}})}};var NestedPages=NestedPages||{};NestedPages.SyncMenuSetting=function(){var e=this,t=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).ready(function(){"1"===nestedpages.syncmenu&&e.syncSetting()}),t(document).on("change",NestedPages.selectors.syncCheckbox,function(){e.syncSetting()})},e.syncSetting=function(){"page"===NestedPages.jsData.posttype&&0!==t(NestedPages.selectors.syncCheckbox).length&&(NestedPages.jsData.syncmenu=t(NestedPages.selectors.syncCheckbox).is(":checked")?"sync":"nosync",t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncMenu,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:NestedPages.jsData.syncmenu},success:function(e){"error"===e.status&&alert("There was an error saving the sync setting.")}}))},e.bindEvents()};var NestedPages=NestedPages||{};NestedPages.NewPage=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.parent_id=0,e.posts="",e.form="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.openPageModal,function(t){t.preventDefault(),e.openModal()}),t(document).on("submit",NestedPages.selectors.newPageForm,function(e){e.preventDefault()}),t(document).on("click",NestedPages.selectors.newPageSubmitButton,function(a){a.preventDefault(),e.submitForm(t(this))}),t(document).on("click",NestedPages.selectors.newPageTitle,function(a){a.preventDefault(),e.addTitleField(t(this))}),t(document).on("click",NestedPages.selectors.newPageRemoveTitle,function(a){a.preventDefault(),e.removeTitleField(t(this))}),t(document).on("click",NestedPages.selectors.addChildButton,function(a){a.preventDefault(),e.openQuickEdit(t(this))}),t(NestedPages.selectors.newPageModal).on("hide.bs.modal",function(){e.cancelNewPage()}),t(document).on("click",NestedPages.selectors.cancelNewChildButton,function(a){a.preventDefault(),e.cancelNewPage(),t(NestedPages.selectors.newPageModal).modal("hide")})},e.openModal=function(){var a=t(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm).addClass("in-modal");t(NestedPages.selectors.newPageModal).find(".modal-body").html(a),t(NestedPages.selectors.newPageModal).find("h3").text(nestedpages.add_multiple),t(NestedPages.selectors.newPageModal).find(".page_parent_id").val(e.parent_id),t(NestedPages.selectors.newPageModal).modal("show")},e.openQuickEdit=function(a){var s=t(a).closest(NestedPages.selectors.row).parent("li"),n=t(NestedPages.selectors.newPageFormContainer).clone();if(t(s).children("ol").length>0){var o=t(s).children("ol");t(n).insertBefore(o)}else t(n).appendTo(s);t(n).siblings(NestedPages.selectors.row).hide(),e.formatter.showQuickEdit(),t(n).find(".parent_name").html("<em>Parent:</em> "+t(a).attr("data-parentname")),t(n).find(".page_parent_id").val(t(a).attr("data-id")),t(n).show(),t(n).find(".np_title").focus()},e.cancelNewPage=function(){e.formatter.removeQuickEdit(),t(NestedPages.selectors.newChildError).hide(),t(NestedPages.selectors.newPageModal).find(".modal-body").empty(),t(NestedPages.selectors.sortable).find(".new-child").remove(),t(NestedPages.selectors.row).show()},e.addTitleField=function(e){{var a=t(e).parents("form"),s=t(e).siblings(".new-page-titles").children("li").length+1,n='<li><i class="handle np-icon-menu"></i><div class="form-control new-child-row"><label>'+NestedPages.jsData.titleText+'</label><div><input type="text" name="post_title[]" class="np_title" placeholder="'+NestedPages.jsData.titleText+'" value="" tabindex="'+s+'" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';t(e).siblings(".new-page-titles").append(n)}t(a).find(".np_title").last().focus(),t(".new-page-titles").sortable({items:"li",handle:".handle"})},e.removeTitleField=function(e){t(e).parents(".new-child-row").parent("li").remove()},e.submitForm=function(a){e.toggleLoading(!0),e.form=t(a).parents("form");var s=t(a).hasClass("add-edit")?!0:!1;t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).serialize()+"&action="+NestedPages.formActions.newPage+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){if("error"===a.status)return e.toggleLoading(!1),void t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show();if(s===!0){var n=a.new_pages[0].edit_link;return n=n.replace(/&amp;/g,"&"),void window.location.replace(n)}e.toggleLoading(!1),e.posts=a.new_pages,e.addPosts()},error:function(){e.toggleLoading(!1),t(form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},e.addPosts=function(){var a=t(e.form).parent(".new-child").parent(".page-row");if(0===t(a).children("ol").length&&t(a).append('<ol class="nplist"></ol>'),t(e.form).hasClass("in-modal"))var s=t(".nplist.sortable li.page-row:first");else var s=t(a).children("ol");for(i=0;i<e.posts.length;i++)e.appendRows(s,e.posts[i]);t(s).show(),e.formatter.updateSubMenuToggle(),e.cancelNewPage(),t(NestedPages.selectors.newPageModal).modal("hide")},e.appendRows=function(e,a){var s='<li id="menuItem_'+a.id+'" class="page-row';"publish"===a.status&&(s+=" published"),s+='">',NestedPages.jsData.hierarchical?(s+='<div class="row">',s+='<div class="child-toggle"></div>'):s+='<div class="row non-hierarchical">',s+='<div class="row-inner">',s+='<i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i>',s+='<a href="'+a.edit_link+'" class="page-link page-title">',s+='<span class="title">'+a.title+"</span>",s+="Publish"!==a.status?'<span class="status">('+a.status+")</span>":'<span class="status"></span>',s+='<span class="nav-status"></span><span class="edit-indicator"><i class="np-icon-pencil"></i>Edit</span>',s+="</a>",s+='<div class="action-buttons">',s+='<a href="#" class="np-btn open-redirect-modal" data-parentid="'+a.id+'"><i class="np-icon-link"></i></a>',s+='<a href="#" class="np-btn add-new-child" data-id="'+a.id+'" data-parentname="'+a.title+'">'+nestedpages.add_child_short+"</a>",s+='<a href="#" class="np-btn np-quick-edit" data-id="'+a.id+'" data-template="'+a.page_template+'" data-title="'+a.title+'" data-slug="'+a.slug+'" data-commentstatus="closed" data-status="'+a.status.toLowerCase()+'" data-np-status="show" data-navstatus="show" data-author="'+a.author+'" data-template="'+a.template+'" data-month="'+a.month+'" data-day="'+a.day+'" data-year="'+a.year+'" data-hour="'+a.hour+'" data-minute="'+a.minute+'" data-datepicker="'+a.datepicker+'" data-time="'+a.time+'" data-formattedtime="'+a.formattedtime+'" data-ampm="'+a.ampm+'">'+nestedpages.quick_edit+"</a>",s+='<a href="'+a.view_link+'" class="np-btn" target="_blank">'+nestedpages.view+"</a>",s+='<a href="'+a.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',s+="</div><!-- .action-buttons -->",s+="</div><!-- .row-inner --></div><!-- .row -->",s+="</li>",t(e).append(s)},e.toggleLoading=function(e){return e?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(NestedPages.selectors.newPageSubmitButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(NestedPages.selectors.newPageSubmitButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.QuickEditPost=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.button="",e.initialData="",e.parent_li="",e.form="",e.flatTerms="",e.termNames="",e.saveButton="",e.newData="",e.row="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditOpen,function(a){a.preventDefault(),e.button=t(this),e.openForm()}),t(document).on("click",NestedPages.selectors.quickEditCancel,function(t){t.preventDefault(),e.formatter.removeQuickEdit()}),t(document).on("click",NestedPages.selectors.quickEditToggleTaxonomies,function(e){e.preventDefault(),t(this).parents("form").find(".np-taxonomies").toggle()}),t(document).on("click",NestedPages.selectors.quickEditToggleMenuOptions,function(e){e.preventDefault(),t(this).parents("form").find(".np-menuoptions").toggle()}),t(document).on("change",".keep_private",function(){this.checked?t(".post_password").val("").prop("readonly",!0):t(".post_password").prop("readonly",!1)}),t(document).on("click",NestedPages.selectors.quickEditSaveButton,function(a){a.preventDefault(),e.saveButton=t(this),e.save()}),t(document).on("keydown",function(t){27===t.keyCode&&e.formatter.removeQuickEdit()})},e.openForm=function(){e.setInitialData(),e.createForm(),e.populateForm(),e.populateFlatTaxonomies()},e.setInitialData=function(){e.initialData={id:t(e.button).attr("data-id"),title:t(e.button).attr("data-title"),slug:t(e.button).attr("data-slug"),author:t(e.button).attr("data-author"),cs:t(e.button).attr("data-commentstatus"),status:t(e.button).attr("data-status"),template:t(e.button).attr("data-template"),month:t(e.button).attr("data-month"),day:t(e.button).attr("data-day"),year:t(e.button).attr("data-year"),hour:t(e.button).attr("data-hour"),minute:t(e.button).attr("data-minute"),navstatus:t(e.button).attr("data-navstatus"),npstatus:t(e.button).attr("data-np-status"),navtitle:t(e.button).attr("data-navtitle"),navtitleattr:t(e.button).attr("data-navtitleattr"),navcss:t(e.button).attr("data-navcss"),linktarget:t(e.button).attr("data-linktarget"),password:t(e.button).attr("data-password"),datepicker:t(e.button).attr("data-datepicker"),time:t(e.button).attr("data-formattedtime"),ampm:t(e.button).attr("data-ampm")},e.initialData.h_taxonomies=[],e.initialData.f_taxonomies=[],e.parent_li=t(e.button).closest(NestedPages.selectors.row).parent("li");var a=t(e.parent_li).attr("class").split(/\s+/);for(i=0;i<a.length;i++)"in-"===a[i].substring(0,3)&&e.initialData.h_taxonomies.push(a[i]),"inf-"===a[i].substring(0,4)&&e.initialData.f_taxonomies.push(a[i])},e.createForm=function(){if(e.form=t(NestedPages.selectors.quickEditPostForm).clone(),t(e.parent_li).children("ol").length>0){var a=t(e.parent_li).children("ol");t(e.form).insertBefore(a)}else t(e.form).appendTo(e.parent_li);t(e.form).siblings(NestedPages.selectors.row).hide(),t(e.form).show()},e.populateForm=function(){if(t(e.form).find(".page_id").html("<em>ID:</em> "+e.initialData.id),t(e.form).find(".np_id").val(e.initialData.id),t(e.form).find(".np_title").val(e.initialData.title),t(e.form).find(".np_slug").val(e.initialData.slug),t(e.form).find(".np_author select").val(e.initialData.author),t(e.form).find(".np_status").val(e.initialData.status),t(e.form).find(".np_nav_title").val(e.initialData.navtitle),t(e.form).find(".np_title_attribute").val(e.initialData.navtitleattr),t(e.form).find(".np_nav_css_classes").val(e.initialData.navcss),t(e.form).find(".post_password").val(e.initialData.password),t(e.form).find(".np_datepicker").val(e.initialData.datepicker),t(e.form).find(".np_time").val(e.initialData.time),t(e.form).find(".np_ampm").val(e.initialData.ampm),"open"===e.initialData.cs&&t(e.form).find(".np_cs").attr("checked","checked"),t(e.form).find(".np_template").val(""!==e.initialData.template?e.initialData.template:"default"),"private"===e.initialData.status&&(t(e.form).find(".post_password").attr("readonly",!0),t(e.form).find(".keep_private").attr("checked",!0)),"hide"===e.initialData.npstatus?t(e.form).find(".np_status").attr("checked","checked"):t(e.form).find(".np_status").removeAttr("checked"),"hide"===e.initialData.navstatus?t(e.form).find(".np_nav_status").attr("checked","checked"):t(e.form).find(".np_nav_status").attr("checked",!1),"_blank"===e.initialData.linktarget?t(e.form).find(".link_target").attr("checked","checked"):t(e.form).find(".link_target").attr("checked",!1),"private"===e.initialData.status&&t(e.form).find(".np_status").val("publish"),t(e.form).find('select[name="mm"]').val(e.initialData.month),t(e.form).find('input[name="jj"]').val(e.initialData.day),t(e.form).find('input[name="aa"]').val(e.initialData.year),t(e.form).find('input[name="hh"]').val(e.initialData.hour),t(e.form).find('input[name="mn"]').val(e.initialData.minute),e.initialData.hasOwnProperty("h_taxonomies")){var a=e.initialData.h_taxonomies;for(i=0;i<a.length;i++){var s="#"+a[i];t(e.form).find(s).attr("checked","checked")}}t(e.form).find(".np_datepicker").datepicker({beforeShow:function(){t("#ui-datepicker-div").addClass("nestedpages-datepicker")}}),e.formatter.showQuickEdit(),t(e.form).show()},e.populateFlatTaxonomies=function(){e.initialData.hasOwnProperty("f_taxonomies")&&(e.createTaxonomyObject(),e.getTermNames(),e.setWPSuggest())},e.createTaxonomyObject=function(){var t={};for(i=0;i<e.initialData.f_taxonomies.length;i++){var a=e.initialData.f_taxonomies[i],s=a.split("-"),n=s.indexOf("nps"),o=s.splice(n+1);o=o.join("-");var r=a.split("-").splice(0,n);r.shift("inf");var d=r.join("-");d in t||(t[d]=[]);var l=t[d];l.push(o)}e.flatTerms=t},e.getTermNames=function(){t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.getTaxonomies,nonce:NestedPages.jsData.nonce,terms:e.flatTerms},success:function(t){e.termNames=t.terms,e.populateFlatTaxonomyFields()}})},e.populateFlatTaxonomyFields=function(){e.termNames&&t.each(e.termNames,function(e,a){var s=t("#"+e);t(s).val(a.join(","))})},e.setWPSuggest=function(){var a=t(e.form).find("[data-autotag]");t.each(a,function(){var e=t(this).attr("data-taxonomy");t(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+e,{multiple:!0,multipleSep:","})})},e.save=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditPost+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){"error"===a.status?(e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show()):(e.toggleLoading(!1),e.newData=a.post_data,e.updatePostRow())},error:function(e){console.log(e)}})},e.updatePostRow=function(){e.row=t(e.button).parents(".row-inner"),t(e.row).find(".title").text(e.newData.post_title);var a=t(e.row).find(".status");if(t(a).text("publish"!==e.newData._status&&"future"!==e.newData._status?"("+e.newData._status+")":"private"===e.newData.keep_private?"("+e.newData.keep_private+")":""),""!==e.newData.post_password){var s=t(a).text();s+=' <i class="np-icon-lock"></i>',t(a).html(s)}var n=t(e.row).find(".nav-status");t(n).text("hide"==e.newData.nav_status?"(Hidden)":"");var o=t(e.row).parent("li");"hide"==e.newData.np_status?(t(o).addClass("np-hide"),t(e.row).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(o).removeClass("np-hide"),t(e.row).find(".np-icon-eye-blocked").remove()),NestedPages.jsData.hierarchical||t(e.row).find(".np-author-display").text(e.newData.author_name);var i=t(e.row).find(NestedPages.selectors.quickEditOpen);t(i).attr("data-id",e.newData.post_id),t(i).attr("data-template",e.newData.page_template),t(i).attr("data-title",e.newData.post_title),t(i).attr("data-slug",e.newData.post_name),t(i).attr("data-commentstatus",e.newData.comment_status),t(i).attr("data-status",e.newData._status),"private"===e.newData.keep_private&&t(i).attr("data-status","private"),t(i).attr("data-author",e.newData.post_author),t(i).attr("data-np-status",e.newData.np_status),t(i).attr("data-password",e.newData.post_password),t(i).attr("data-navstatus",e.newData.nav_status),t(i).attr("data-navtitle",e.newData.np_nav_title),t(i).attr("data-linktarget",e.newData.link_target),t(i).attr("data-navtitleattr",e.newData.np_title_attribute),t(i).attr("data-navcss",e.newData.np_nav_css_classes),t(i).attr("data-month",e.newData.mm),t(i).attr("data-day",e.newData.jj),t(i).attr("data-year",e.newData.aa),t(i).attr("data-hour",e.newData.hh),t(i).attr("data-minute",e.newData.mn),t(i).attr("data-datepicker",e.newData.np_date),t(i).attr("data-time",e.newData.np_time),t(i).attr("data-formattedtime",e.newData.np_time),t(i).attr("data-ampm",e.newData.np_ampm),e.removeTaxonomyClasses(),e.addCategoryClasses(),e.addHierarchicalClasses(),e.addFlatClasses(),e.addStatusClass(),e.formatter.removeQuickEdit(),e.formatter.flashRow(e.row)},e.addStatusClass=function(){var a=["published","draft","pending","future"];for(i=0;i<a.length;i++)t(e.row).removeClass(a[i]);t(e.row).addClass(e.newData._status)},e.removeTaxonomyClasses=function(){taxonomies=[];var a=t(e.row).attr("class").split(/\s+/);for(i=0;i<a.length;i++)"in-"===a[i].substring(0,3)&&t(e.row).removeClass(a[i]),"inf-"===a[i].substring(0,4)&&t(e.row).removeClass(a[i])},e.addCategoryClasses=function(){if(e.newData.hasOwnProperty("post_category")){var a=e.newData.post_category;for(i=0;i<a.length;i++){var s="in-category-"+a[i];t(e.row).addClass(s)}}},e.addHierarchicalClasses=function(){if(e.newData.hasOwnProperty("tax_input")){var a=e.newData.tax_input;t.each(a,function(a,s){for(i=0;i<s.length;i++){var n="in-"+a+"-"+s[i];t(e.row).addClass(n)}})}},e.addFlatClasses=function(){if(e.newData.hasOwnProperty("flat_tax")){var a=e.newData.flat_tax;t.each(a,function(a,s){for(i=0;i<s.length;i++){var n="inf-"+a+"-nps-"+s[i];t(e.row).addClass(n)}})}},e.toggleLoading=function(a){return a?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(e.saveButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(e.saveButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.QuickEditLink=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.button="",e.postData="",e.newPostData="",e.form="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditButtonLink,function(a){a.preventDefault(),e.formatter.removeQuickEdit(),e.button=t(this),e.openQuickEdit()}),t(document).on("click",NestedPages.selectors.quickEditLinkSaveButton,function(t){t.preventDefault(),e.submitForm()}),t(document).on("keydown",function(t){27===t.keyCode&&e.formatter.removeQuickEdit()})},e.openQuickEdit=function(){e.setData(),e.createForm(),e.populateForm()},e.setData=function(){e.postData={id:t(e.button).attr("data-id"),url:t(e.button).attr("data-url"),title:t(e.button).attr("data-title"),status:t(e.button).attr("data-status"),navstatus:t(e.button).attr("data-navstatus"),npstatus:t(e.button).attr("data-np-status"),linktarget:t(e.button).attr("data-linktarget"),parentid:t(e.button).attr("data-parentid"),navtitleattr:t(e.button).attr("data-navtitleattr"),navcss:t(e.button).attr("data-navcss"),navtype:t(e.button).attr("data-nav-type"),navobject:t(e.button).attr("data-nav-object"),navobjectid:t(e.button).attr("data-nav-object-id"),navoriginallink:t(e.button).attr("data-nav-original-link"),navoriginaltitle:t(e.button).attr("data-nav-original-title")}},e.createForm=function(){var a=t(e.button).closest(NestedPages.selectors.row).parent("li");if(e.form=t(NestedPages.selectors.quickEditLinkForm).clone(),t(a).children("ol").length>0){var s=t(a).children("ol");t(e.form).insertBefore(s)}else t(e.form).appendTo(a);t(e.form).siblings(NestedPages.selectors.row).hide()},e.populateForm=function(){if(t(e.form).find(".np_id").val(e.postData.id),t(e.form).find(".np_title").val(e.postData.title),t(e.form).find(".np_author select").val(e.postData.author),t(e.form).find(".np_status").val(e.postData.status),t(e.form).find(".np_content").val(e.postData.url),t(e.form).find(".np_parent_id").val(e.postData.parentid),t(e.form).find(".np_title_attribute").val(e.postData.navtitleattr),t(e.form).find(".np_nav_css_classes").val(e.postData.navcss),"hide"===e.postData.npstatus?t(e.form).find(".np_status").prop("checked","checked"):t(e.form).find(".np_status").removeAttr("checked"),"hide"===e.postData.navstatus?t(e.form).find(".np_nav_status").prop("checked","checked"):t(e.form).find(".np_nav_status").removeAttr("checked"),"_blank"===e.postData.linktarget?t(e.form).find(".link_target").prop("checked","checked"):t(e.form).find(".link_target").removeAttr("checked"),"custom"!==e.postData.navobject&&""!==e.postData.navobject){var a='<div class="form-control original-link">Original: <a href="'+e.postData.navoriginallink+'" target="_blank">'+e.postData.navoriginaltitle+"</a></div>";t(e.form).find("[data-url-field]").remove(),t(a).insertAfter(t(e.form).find("h3")),t(e.form).find("[data-np-menu-object-input]").val(e.postData.navobject),t(e.form).find("[data-np-menu-objectid-input]").val(e.postData.navobjectid),t(e.form).find("[data-np-menu-type-input]").val(e.postData.navtype),t(e.form).find("h3").text("Link: "+e.postData.navoriginaltitle)}else t(e.form).find("h3").text("Link"),t(e.form).find("[data-np-menu-object-input]").val("custom"),t(e.form).find("[data-np-menu-type-input]").val("custom");e.formatter.showQuickEdit(),t(e.form).show()},e.submitForm=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditLink+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){"error"===a.status?(e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show()):(e.toggleLoading(!1),e.newPostData=a.post_data,e.updateRow())},error:function(){e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},e.updateRow=function(){console.log(e.newPostData);var a=t(e.form).siblings(".row");t(a).find(".title").html(e.newPostData.post_title+' <i class="np-icon-link"></i>');var s=t(a).find(".status");t(s).text("publish"!==e.newPostData._status&&"future"!==e.newPostData._status?"("+e.newPostData._status+")":"");var n=t(a).find(".nav-status");t(n).text("hide"==e.newPostData.nav_status?"("+NestedPages.jsData.hiddenText+")":"");var o=t(a).parent("li");"hide"==e.newPostData.np_status?(t(o).addClass("np-hide"),t(a).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(o).removeClass("np-hide"),t(a).find(".np-icon-eye-blocked").remove());var i=t(a).find(NestedPages.selectors.quickEditButtonLink);t(i).attr("data-id",e.newPostData.post_id),t(i).attr("data-title",e.newPostData.post_title),t(i).attr("data-url",e.newPostData.post_content),t(i).attr("data-status",e.newPostData._status),t(i).attr("data-navstatus",e.newPostData.nav_status),t(i).attr("data-np-status",e.newPostData.np_status),t(i).attr("data-linkTarget",e.newPostData.linkTarget),t(i).attr("data-navtitleattr",e.newPostData.titleAttribute),t(i).attr("data-navcss",e.newPostData.cssClasses),e.formatter.removeQuickEdit(),e.formatter.flashRow(a)},e.toggleLoading=function(e){return t(".row").removeClass("np-updated").removeClass("np-updated-show"),e?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.Clone=function(){var e=this,t=jQuery;return e.parent_id="",e.parent_title="",e.parentLi=null,e.formatter=new NestedPages.Formatter,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.cloneButton,function(a){a.preventDefault(),e.parent_id=t(this).attr("data-id"),e.parent_title=t(this).attr("data-parentname"),e.parentLi=t(this).parent(".row").parent(".page-row").parent(".npList"),e.openModal()}),t(document).on("click",NestedPages.selectors.confirmClone,function(t){t.preventDefault(),e.clone()})},e.openModal=function(){t(NestedPages.selectors.cloneModal).find("[data-clone-parent]").text(e.parent_title),t(NestedPages.selectors.cloneModal).modal("show")},e.clone=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.clonePost,parent_id:e.parent_id,quantity:t(NestedPages.selectors.cloneQuantity).val(),status:t(NestedPages.selectors.cloneStatus).val(),author:t(NestedPages.selectors.cloneAuthor).find("select").val(),nonce:NestedPages.jsData.nonce,posttype:NestedPages.jsData.posttype},success:function(){e.toggleLoading(!1),t(NestedPages.selectors.cloneModal).modal("hide"),location.reload()}})},e.toggleLoading=function(e){return e?(t(NestedPages.selectors.cloneModal).find("[data-clone-loading]").show(),void t(NestedPages.selectors.confirmClone).attr("disabled","disabled")):(t(NestedPages.selectors.cloneModal).find("[data-clone-loading]").hide(),void t(NestedPages.selectors.confirmClone).attr("disabled",!1))
2
- },e.init()};var NestedPages=NestedPages||{};NestedPages.Tabs=function(){var e=this,t=jQuery;return e.activeContent="",e.activeButton="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.tabButton,function(a){a.preventDefault(),e.activeButton=t(this),e.toggleTabs()})},e.toggleTabs=function(){e.activeContent=t(e.activeButton).attr("href"),t(NestedPages.selectors.tabContent).hide(),t(e.activeContent).show(),t(e.activeButton).parents(NestedPages.selectors.tabButtonParent).find(NestedPages.selectors.tabButton).removeClass("active"),t(e.activeButton).addClass("active")},e.init()},jQuery(document).ready(function(){new NestedPages.Factory});var NestedPages=NestedPages||{};NestedPages.selectors={childToggle:".child-toggle",childToggleLink:".child-toggle a",toggleAll:".nestedpages-toggleall",toggleHidden:".np-toggle-hidden",toggleStatus:".np-toggle-publish",lists:".nplist",rows:".page-row",row:".row",sortable:".sortable",notSortable:".no-sort",handle:".handle",published:".published",hiddenRows:".np-hide",errorDiv:"#np-error",loadingIndicator:"#nested-loading",syncCheckbox:".np-sync-menu",toggleEditButtons:".np-toggle-edit",quickEditOverlay:".np-inline-overlay",quickEditLoadingIndicator:".np-qe-loading",quickEditErrorDiv:".np-quickedit-error",quickEditCancel:".np-cancel-quickedit",quickEditToggleTaxonomies:".np-toggle-taxonomies",quickEditToggleMenuOptions:".np-toggle-menuoptions",quickEditButtonLink:".np-quick-edit-redirect",quickEditLinkForm:".quick-edit-form-redirect",quickEditLinkSaveButton:".np-save-quickedit-redirect",quickEditOpen:".np-quick-edit",quickEditPostForm:".quick-edit-form",quickEditSaveButton:".np-save-quickedit",openLinkModal:".open-redirect-modal",linkModal:"#np-link-modal",saveLink:".np-save-link",linkLoadingIndicator:".np-link-loading",linkErrorDiv:".np-new-link-error",linkForm:".np-new-link-form",openPageModal:".open-bulk-modal",newPageModal:"#np-bulk-modal",newPageFormContainer:".new-child-form",newPageForm:".np-new-child-form",newPageSubmitButton:".np-save-newchild",newPageTitle:".add-new-child-row",newPageRemoveTitle:".np-remove-child",addChildButton:".add-new-child",newChildError:".np-newchild-error",cancelNewChildButton:".np-cancel-newchild",cloneButton:".clone-post",confirmClone:"[data-confirm-clone]",cloneModal:"#np-clone-modal",cloneQuantity:"[data-clone-quantity]",cloneStatus:"[data-clone-status]",cloneAuthor:"[data-clone-author]",tabButtonParent:"[data-np-tabs]",tabButton:"[data-np-tab]",tabContent:"[data-np-tab-pane]"},NestedPages.cssClasses={iconToggleDown:"np-icon-arrow-down",iconToggleRight:"np-icon-arrow-right",noborder:"no-border"},NestedPages.jsData={ajaxurl:ajaxurl,nonce:nestedpages.np_nonce,allPostTypes:nestedpages.post_types,syncmenu:"nosync",posttype:"",nestable:!0,hierarchical:!0,expandText:nestedpages.expand_text,collapseText:nestedpages.collapse_text,showHiddenText:nestedpages.show_hidden,hideHiddenText:nestedpages.hide_hidden,quickEditText:nestedpages.quick_edit,hiddenText:nestedpages.hidden,titleText:nestedpages.title},NestedPages.formActions={syncToggles:"npnestToggle",syncNesting:"npsort",syncMenu:"npsyncMenu",newPage:"npnewChild",quickEditLink:"npquickEditLink",getTaxonomies:"npgetTaxonomies",quickEditPost:"npquickEdit",clonePost:"npclonePost",search:"npmenuSearch",newMenuItem:"npnewMenuItem"},NestedPages.Factory=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.responsive=new NestedPages.Responsive,e.menuToggle=new NestedPages.MenuToggle,e.pageToggle=new NestedPages.PageToggle,e.nesting=new NestedPages.Nesting,e.syncMenuSetting=new NestedPages.SyncMenuSetting,e.newPage=new NestedPages.NewPage,e.quickEditLink=new NestedPages.QuickEditLink,e.quickEditPost=new NestedPages.QuickEditPost,e.clone=new NestedPages.Clone,e.tabs=new NestedPages.Tabs,e.menuLinks=new NestedPages.MenuLinks,e.init=function(){e.bindEvents(),e.setPostType(),e.setMenuSync(),e.setNestable(),e.formatter.updateSubMenuToggle(),e.formatter.setBorders(),e.formatter.setNestedMargins(),e.nesting.initializeSortable()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditOverlay,function(){e.formatter.removeQuickEdit(),e.newPage.cancelNewPage()})},e.setNestable=function(){var e=!0;t.each(NestedPages.jsData.allPostTypes,function(t,a){a.name===NestedPages.jsData.posttype&&(a.hierarchical===!0&&(e=!0),a.disable_nesting===!0&&(e=!1))}),NestedPages.jsData.nestable=e},e.setPostType=function(){NestedPages.jsData.posttype=t(NestedPages.selectors.sortable).attr("id").substring(3),NestedPages.jsData.hierarchical=NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical},e.setMenuSync=function(){NestedPages.jsData.syncmenu="1"===nestedpages.syncmenu?"sync":"nosync"},e.init()};var NestedPages=NestedPages||{};NestedPages.MenuLinks=function(){var e=this,t=jQuery;return e.typeButton="",e.post="",e.formatter=new NestedPages.Formatter,e.selectors={form:"[data-np-menu-item-form]",typeSelect:"[data-np-menu-selection]",accordion:"[data-np-menu-accordion]",accordionItem:"[data-np-menu-accordion-item]",formPlaceholder:".np-menu-link-object-placeholder",formDetails:".np-menu-link-details",searchResults:"[data-np-search-result]",defaultResults:"[data-default-result]",originalLink:"[data-np-original-link]",saveButton:"[data-np-save-link]",urlInputCont:"[data-np-menu-url-cont]",errorDiv:"[data-np-error]"},e.fields={object:"[data-np-menu-object-input]",objectid:"[data-np-menu-objectid-input]",itemType:"[data-np-menu-type-input]",url:"[data-np-menu-url]",navigationLabel:"[data-np-menu-navigation-label]",titleAttribute:"[data-np-menu-title-attr]",cssClasses:"[data-np-menu-css-classes]",npStatus:"[data-np-menu-np-status]",linkTarget:"[data-np-menu-link-target]",menuTitle:"[data-np-menu-title]"},e.search=new NestedPages.MenuSearch,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.openLinkModal,function(a){a.preventDefault(),e.postParent=t(this).attr("data-parentid"),t(e.selectors.form).find(".parent_id").val(t(this).attr("data-parentid")),e.openModal()}),t(document).on("click",e.selectors.accordionItem,function(a){a.preventDefault(),e.accordion(t(this))}),t(document).on("click",e.selectors.typeSelect,function(a){a.preventDefault(),e.typeButton=t(this),e.setLinkType()}),t(document).on("keyup",e.fields.navigationLabel,function(){e.updateTitle()}),t(document).on("click",e.selectors.saveButton,function(t){t.preventDefault(),e.submitForm()}),t(document).on("keydown",function(e){27===e.keyCode&&t("#np-link-modal").modal("hide")})},e.openModal=function(){t(NestedPages.selectors.linkErrorDiv).hide(),t(NestedPages.selectors.linkModal).find("input").val(""),t(NestedPages.selectors.linkModal).find(".parent_id").val(e.postParent),e.clearForm(),t(e.selectors.accordion).find("ul").hide(),t(e.selectors.typeSelect).removeClass("active"),t(NestedPages.selectors.linkModal).modal("show")},e.accordion=function(a){e.clearForm();var s=t(a).siblings("ul");return t(s).is(":visible")?(t(a).removeClass("active"),void t(s).slideUp("fast")):(t(e.selectors.accordionItem).removeClass("active"),t(a).addClass("active"),t(a).parents(e.selectors.accordion).find("ul").slideUp("fast"),void t(s).slideDown("fast"))},e.setLinkType=function(){return t(e.typeButton).hasClass("active")?void e.clearForm():(t(e.typeButton).hasClass("np-custom-link")&&(t(e.selectors.accordionItem).removeClass("active"),t(e.selectors.accordion).find("ul").slideUp("fast")),t(e.selectors.formPlaceholder).hide(),void e.populateForm())},e.populateForm=function(){t(e.selectors.saveButton).show(),t(e.selectors.typeSelect).removeClass("active"),t(e.typeButton).addClass("active"),t(e.fields.menuTitle).text(t(e.typeButton).text()).val(t(e.typeButton).text()),t(e.selectors.form).find("h3").find("em").text(t(e.typeButton).attr("data-np-object-name")),""!==t(e.typeButton).attr("data-np-permalink")?(t(e.selectors.form).find(e.selectors.urlInputCont).hide(),t(e.selectors.form).find(e.selectors.originalLink).html('<a href="'+t(e.typeButton).attr("data-np-permalink")+'">'+t(e.typeButton).text()+"</a>"),t(e.selectors.form).find(e.selectors.originalLink).parent(".original-link").show()):(t(e.selectors.form).find(e.selectors.urlInputCont).show(),t(e.selectors.form).find(e.selectors.originalLink).parent(".original-link").hide()),t(e.fields.object).val(t(e.typeButton).attr("data-np-menu-object")),t(e.fields.objectid).val(t(e.typeButton).attr("data-np-menu-objectid")),t(e.fields.itemType).val(t(e.typeButton).attr("data-np-menu-type")),t(e.selectors.formDetails).show()},e.clearForm=function(){t(e.selectors.form).find(e.selectors.errorDiv).hide(),t(e.selectors.saveButton).hide(),t(e.selectors.formDetails).hide(),t(e.selectors.formPlaceholder).show(),t(e.selectors.form).find("input").not(".parent_id").val(""),t(e.selectors.form).find(e.fields.linkTarget).val("_blank"),t(e.selectors.form).find('input[type="checkbox"]').attr("checked",!1),t(e.selectors.typeSelect).removeClass("active"),e.search.toggleLoading(!1),t(e.selectors.searchResults).remove(),t(e.selectors.defaultResults).show()},e.updateTitle=function(){var a=t(e.fields.navigationLabel).val(),s=t(e.selectors.form).find("h3").find("span");""!==a?(t(e.fields.menuTitle).val(a),t(s).text(a)):(t(e.fields.menuTitle).val(t(e.typeButton).text()),t(s).text(t(e.typeButton).text()))},e.submitForm=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:t(e.selectors.form).serialize()+"&action="+NestedPages.formActions.newMenuItem+"&nonce="+NestedPages.jsData.nonce+"&post_type="+NestedPages.jsData.posttype+"&syncmenu="+NestedPages.jsData.syncmenu,success:function(a){return e.toggleLoading(!1),"error"===a.status?void t(e.selectors.form).find(e.selectors.errorDiv).text(a.message).show():(e.post=a.post_data,void e.createRow())},error:function(e){console.log(e)}})},e.createRow=function(){var a='<li id="menuItem_'+e.post.id+'" class="page-row published';a+='">',a+='<div class="row"><div class="child-toggle"></div><div class="row-inner"><i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i><a href="'+e.post.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+e.post.menuTitle+' <i class="np-icon-link"></i></span>',a+='</a><a href="#" class="np-toggle-edit"><i class="np-icon-pencil"></i></a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ',a+='data-id="'+e.post.id+'"',a+='data-parentid="'+e.post.parent_id+'"',a+='data-title="'+e.post.menuTitle+'" ',a+='data-url="'+e.post.url+'" ',a+='data-status="publish" ',a+='data-np-status="show" ',a+='data-navstatus="show" ',a+='data-navcss="'+e.post.cssClasses+'" ',a+='data-navtitleattr="'+e.post.titleAttribute+'" ',a+='data-nav-type="'+e.post.menuType+'" ',a+='data-nav-object="'+e.post.objectType+'" ',a+='data-nav-object-id="'+e.post.objectId+'" ',a+='data-nav-original-link="'+e.post.original_link+'" ',a+='data-nav-original-title="'+e.post.original_title+'" ',a+='data-linktarget="'+e.post.link_target+'">',a+=NestedPages.jsData.quickEditText,a+="</a>",a+='<a href="'+e.post.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',a+="</div></div></div></li>","0"===e.post.parent_id?t(".nplist:first li:first").after(a):e.appendChildRow(a),t(NestedPages.selectors.linkModal).modal("hide"),e.row=t("#menuItem_"+e.post.id).find(".row"),e.formatter.flashRow(e.row)},e.appendChildRow=function(a){var s=t("#menuItem_"+e.post.parent_id);0===t(s).children("ol").length?(a='<ol class="sortable nplist" style="display:block;">'+a+"</ol>",t(s).append(a)):t(s).find("ol:first").prepend(a),e.formatter.updateSubMenuToggle()},e.toggleLoading=function(a){return a?(t(e.selectors.form).find(e.selectors.errorDiv).hide(),t(e.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).show(),void t(e.selectors.saveButton).attr("disabled","disabled")):(t(e.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).hide(),void t(e.selectors.saveButton).attr("disabled",!1))},e.init()};var NestedPages=NestedPages||{};NestedPages.MenuSearch=function(){var e=this,t=jQuery;return e.selectors={searchForms:"*[data-np-menu-search]",defaultResults:"[data-default-result]",loadingIndicator:".np-menu-search-loading",noResults:".np-menu-search-noresults",searchType:"data-search-type",searchObject:"data-search-object",searchResults:"[data-np-search-result]"},e.activeForm="",e.results="",e.defaultResults="",e.searchType="",e.searchObject="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("keyup",e.selectors.searchForms,function(){e.activeForm=t(this),t(e.selectors.searchResults).remove(),e.performSearch()})},e.performSearch=function(){return e.defaultResults=t(e.activeForm).parent("li").siblings(e.selectors.defaultResults),t(e.activeForm).val().length>2?(t(e.defaultResults).hide(),e.toggleLoading(!0),void e.query()):(e.toggleLoading(!1),void t(e.defaultResults).show())},e.query=function(){e.searchType=t(e.activeForm).attr(e.selectors.searchType),e.searchObject=t(e.activeForm).attr(e.selectors.searchObject),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.search,nonce:NestedPages.jsData.nonce,term:t(e.activeForm).val(),searchType:e.searchType,searchObject:e.searchObject},success:function(a){console.log(a),a.results?(e.results=a.results,e.toggleLoading(!1),"post_type"===e.searchType?e.appendPosts():e.appendTaxonomies()):(e.toggleLoading(!1),t(e.activeForm).siblings(e.selectors.noResults).show())}})},e.appendPosts=function(){var a="";t.each(e.results,function(t,s){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+e.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+s.ID+'" data-np-permalink="'+s.permalink+'" data-np-object-name="'+s.singular_name+'" data-np-menu-selection>'+s.post_title+"</a></li>"}),t(a).insertAfter(t(e.activeForm).parent("li")),e.toggleLoading(!1)},e.appendTaxonomies=function(){var a="";t.each(e.results,function(t,s){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+e.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+s.term_id+'" data-np-permalink="'+s.permalink+'" data-np-object-name="'+s.taxonomy+'" data-np-menu-selection>'+s.name+"</a></li>"}),t(a).insertAfter(t(e.activeForm).parent("li")),e.toggleLoading(!1)},e.toggleLoading=function(a){var s=t(e.activeForm).siblings(e.selectors.loadingIndicator);return t(e.selectors.noResults).hide(),a?void t(s).show():void t(s).hide()},e.init()},jQuery(document).ready(function(){new NestedPagesTrash});var NestedPagesTrash=function(){var e=this,t=jQuery;return e.trashButton=".np-empty-trash",e.confirmButton=".np-trash-confirm",e.warningModal="#np-trash-modal",e.errorAlert="#np-error",e.loadingIndicator="#nested-loading",e.trashLinks=".np-trash-links",e.postType=t("#np-trash-posttype").val(),e.nonce=nestedpages.np_nonce,e.formAction="npEmptyTrash",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",e.trashButton,function(a){a.preventDefault(),t(e.warningModal).modal("show")}),t(document).on("click",e.confirmButton,function(t){t.preventDefault(),e.confirmEmpty()})},e.confirmEmpty=function(){e.loading(!0),t(e.warningModal).hide(),t(e.errorAlert).hide(),e.emptyTrash()},e.emptyTrash=function(){t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:e.formAction,nonce:e.nonce,posttype:e.postType},success:function(a){e.loading(!1),"error"===a.status?t(e.errorAlert).text(a.message).show():t(e.trashLinks).hide()}})},e.loading=function(a){return a?void t(e.loadingIndicator).show():void t(e.loadingIndicator).hide()},e.init()};jQuery(document).ready(function(){new NestedPagesConfirmDelete});var NestedPagesConfirmDelete=function(){var e=this,t=jQuery;return e.deleteButton="[data-np-confirm-delete]",e.confirmButton="[data-delete-confirmation]",e.warningModal="#np-delete-confirmation-modal",e.deleteLink="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",e.deleteButton,function(a){a.preventDefault(),e.deleteLink=t(this).attr("href"),t(e.warningModal).modal("show")}),t(document).on("click",e.confirmButton,function(t){t.preventDefault(),e.confirmEmpty()})},e.confirmEmpty=function(){window.location.replace(e.deleteLink)},e.init()};
1
+ var NestedPages=NestedPages||{};NestedPages.Responsive=function(){var e=this,t=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.toggleEditButtons,function(a){a.preventDefault(),e.toggleEdit(t(this))}),t(window).resize(function(){e.timer(function(){t(".action-buttons").removeAttr("style"),t(".np-toggle-edit").removeClass("active")},500)})},e.toggleEdit=function(e){var a=t(e).siblings(".action-buttons");return t(a).is(":visible")?(t(e).removeClass("active"),void t(a).hide()):(t(e).addClass("active"),void t(a).show())},e.timer=function(){var e=0;return function(t,a){clearTimeout(e),e=setTimeout(t,a)}}(),e.init()};var NestedPages=NestedPages||{};NestedPages.Formatter=function(){var e=this,t=jQuery;e.updateSubMenuToggle=function(){for(var e=t(NestedPages.selectors.childToggle),a=0;a<e.length;a++){var s=e[a],n=t(s).parent(".row").parent("li");if(t(n).children("ol").length>0){var o=t(n).children("ol:visible").length>0?NestedPages.cssClasses.iconToggleDown:NestedPages.cssClasses.iconToggleRight;t(s).html('<a href="#"><i class="'+o+'"></i></a>'),t(n).children("ol").children(".np-hide").length>0&&0===t(n).children("ol").children(".np-hide.shown").length?t(s).find("a").hide():t(n).children("ol").children(".np-hide").length>0&&t(n).children("ol").children(".np-hide.shown").length>0&&t(s).find("a").show()}else t(s).empty()}},e.setBorders=function(){t(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder),t.each(t(NestedPages.selectors.lists),function(){t(this).find(".page-row:visible:first").addClass(NestedPages.cssClasses.noborder)})},e.setNestedMargins=function(){t.each(t(NestedPages.selectors.lists),function(){var e=t(this).parents(NestedPages.selectors.lists).length,a=56;if(e>0){var a=20*e+a;return void t(this).find(".row-inner").css("padding-left",a+"px")}t(this).find(".row-inner").css("padding-left","0px")})},e.updatePlaceholderWidth=function(a){if(NestedPages.jsData.nestable){var s=t(a.placeholder).parents("ol").length,n=t(NestedPages.selectors.sortable).width(),o=40*s-40,i=n-o;t(a.placeholder).width(i).css("margin-left",o+"px")}e.updateListVisibility(a)},e.updateListVisibility=function(e){var a=t(e.placeholder).parent("ol");t(a).is(":visible")||(t(a).addClass("nplist"),t(a).show())},e.removeQuickEdit=function(){t(NestedPages.selectors.quickEditOverlay).removeClass("active").remove(),t(".sortable .quick-edit").remove(),t(".row").show()},e.showQuickEdit=function(){t("body").append('<div class="np-inline-overlay"></div>'),setTimeout(function(){t(".np-inline-overlay").addClass("active")},50)},e.flashRow=function(a){t(a).addClass("np-updated"),e.setBorders(),setTimeout(function(){t(a).addClass("np-updated-show")},1500)},e.showAjaxError=function(e){t(NestedPages.selectors.ajaxError).find("p").text(e),t(NestedPages.selectors.ajaxError).show()},e.hideAjaxError=function(){t(NestedPages.selectors.ajaxError).hide()}};var NestedPages=NestedPages||{};NestedPages.MenuToggle=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.bindEvents=function(){t(document).on("click",NestedPages.selectors.childToggleLink,function(a){a.preventDefault(),e.toggleSingleMenu(t(this))}),t(document).on("click",NestedPages.selectors.toggleAll,function(t){t.preventDefault(),e.toggleAllMenus()})},e.toggleSingleMenu=function(a){var s=t(a).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings("ol");t(a).find("i").toggleClass(NestedPages.cssClasses.iconToggleDown).toggleClass(NestedPages.cssClasses.iconToggleRight),t(s).toggle(),e.formatter.setBorders(),e.formatter.setNestedMargins(),e.syncUserToggles()},e.toggleAllMenus=function(){var a=NestedPages.selectors.toggleAll;return"closed"===t(a).attr("data-toggle")?(t(NestedPages.selectors.lists).show(),t(a).attr("data-toggle","opened").text(NestedPages.jsData.collapseText),t(NestedPages.selectors.childToggle).find("i").removeClass(NestedPages.cssClasses.iconToggleRight).addClass(NestedPages.cssClasses.iconToggleDown),e.formatter.setBorders(),void e.syncUserToggles()):(t(NestedPages.selectors.lists).not(t(NestedPages.selectors.lists)[0]).hide(),t(a).attr("data-toggle","closed").text(NestedPages.jsData.expandText),t(NestedPages.selectors.childToggle).find("i").removeClass(NestedPages.cssClasses.iconToggleDown).addClass(NestedPages.cssClasses.iconToggleRight),e.formatter.setBorders(),void e.syncUserToggles())},e.visibleRowIDs=function(){var e=[],a=t(NestedPages.selectors.rows+":visible");return t.each(a,function(){var a=t(this).attr("id");e.push(a.replace("menuItem_",""))}),e},e.syncUserToggles=function(){t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncToggles,nonce:NestedPages.jsData.nonce,ids:e.visibleRowIDs(),posttype:NestedPages.jsData.posttype},success:function(e){"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},e.bindEvents()};var NestedPages=NestedPages||{};NestedPages.PageToggle=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.toggleHidden,function(t){t.preventDefault(),e.toggleHidden()}),t(document).on("click",NestedPages.selectors.toggleStatus,function(a){a.preventDefault(),e.toggleStatus(t(this))})},e.toggleHidden=function(){var a=NestedPages.selectors.toggleHidden,s=t(a).attr("href");return"show"===s?(t(a).attr("href","hide").text(NestedPages.jsData.showHiddenText),t(NestedPages.selectors.hiddenRows).removeClass("shown").hide(),e.formatter.updateSubMenuToggle(),void e.formatter.setBorders()):(t(a).attr("href","show").text(NestedPages.jsData.hideHiddenText),t(NestedPages.selectors.hiddenRows).addClass("shown").show(),e.formatter.updateSubMenuToggle(),void e.formatter.setBorders())},e.toggleStatus=function(e){var a=t(e).attr("href");return a=a.substring(1),t(NestedPages.selectors.toggleStatus).removeClass("active"),t(e).addClass("active"),"all"==a?void t(NestedPages.selectors.rows).show():(t(NestedPages.selectors.rows).hide(),void t("."+a).show())},e.init()};var NestedPages=NestedPages||{};NestedPages.Nesting=function(){var e=this,t=jQuery;e.formatter=new NestedPages.Formatter,e.initializeSortable=function(){maxLevels=NestedPages.jsData.nestable?0:1,t(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({items:NestedPages.selectors.rows,toleranceElement:"> .row",handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",maxLevels:maxLevels,tabSize:56,start:function(e,t){t.placeholder.height(t.item.height())},sort:function(t,a){e.formatter.updatePlaceholderWidth(a)},stop:function(){setTimeout(function(){e.formatter.updateSubMenuToggle(),e.formatter.setBorders(),e.formatter.setNestedMargins()},100),e.syncNesting()}})},e.disableNesting=function(){t(NestedPages.selectors.sortable).sortable("destroy")},e.syncNesting=function(){t(NestedPages.selectors.errorDiv).hide(),t(NestedPages.selectors.loadingIndicator).show(),list=t(NestedPages.selectors.sortable).nestedSortable("toHierarchy",{startDepthCount:0}),e.disableNesting(),t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncNesting,nonce:NestedPages.jsData.nonce,list:list,post_type:NestedPages.jsData.posttype,syncmenu:NestedPages.jsData.syncmenu},success:function(a){e.initializeSortable(),"error"===a.status?(t(NestedPages.selectors.errorDiv).text(a.message).show(),t(NestedPages.selectors.loadingIndicator).hide()):t(NestedPages.selectors.loadingIndicator).hide()}})}};var NestedPages=NestedPages||{};NestedPages.SyncMenuSetting=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).ready(function(){"1"===nestedpages.syncmenu&&e.syncSetting()}),t(document).on("change",NestedPages.selectors.syncCheckbox,function(){e.syncSetting()})},e.syncSetting=function(){"page"===NestedPages.jsData.posttype&&0!==t(NestedPages.selectors.syncCheckbox).length&&(NestedPages.jsData.syncmenu=t(NestedPages.selectors.syncCheckbox).is(":checked")?"sync":"nosync",t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncMenu,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:NestedPages.jsData.syncmenu},success:function(t){"error"===t.status&&e.formatter.showAjaxError(t.message)}}))},e.bindEvents()};var NestedPages=NestedPages||{};NestedPages.NewPage=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.parent_id=0,e.posts="",e.form="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.openPageModal,function(t){t.preventDefault(),e.openModal()}),t(document).on("submit",NestedPages.selectors.newPageForm,function(e){e.preventDefault()}),t(document).on("click",NestedPages.selectors.newPageSubmitButton,function(a){a.preventDefault(),e.submitForm(t(this))}),t(document).on("click",NestedPages.selectors.newPageTitle,function(a){a.preventDefault(),e.addTitleField(t(this))}),t(document).on("click",NestedPages.selectors.newPageRemoveTitle,function(a){a.preventDefault(),e.removeTitleField(t(this))}),t(document).on("click",NestedPages.selectors.addChildButton,function(a){a.preventDefault(),e.openQuickEdit(t(this))}),t(NestedPages.selectors.newPageModal).on("hide.bs.modal",function(){e.cancelNewPage()}),t(document).on("click",NestedPages.selectors.cancelNewChildButton,function(a){a.preventDefault(),e.cancelNewPage(),t(NestedPages.selectors.newPageModal).modal("hide")})},e.openModal=function(){var a=t(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm).addClass("in-modal");t(NestedPages.selectors.newPageModal).find(".modal-body").html(a),t(NestedPages.selectors.newPageModal).find("h3").text(nestedpages.add_multiple),t(NestedPages.selectors.newPageModal).find(".page_parent_id").val(e.parent_id),t(NestedPages.selectors.newPageModal).modal("show")},e.openQuickEdit=function(a){var s=t(a).closest(NestedPages.selectors.row).parent("li"),n=t(NestedPages.selectors.newPageFormContainer).clone();if(t(s).children("ol").length>0){var o=t(s).children("ol");t(n).insertBefore(o)}else t(n).appendTo(s);t(n).siblings(NestedPages.selectors.row).hide(),e.formatter.showQuickEdit(),t(n).find(".parent_name").html("<em>Parent:</em> "+t(a).attr("data-parentname")),t(n).find(".page_parent_id").val(t(a).attr("data-id")),t(n).show(),t(n).find(".np_title").focus()},e.cancelNewPage=function(){e.formatter.removeQuickEdit(),t(NestedPages.selectors.newChildError).hide(),t(NestedPages.selectors.newPageModal).find(".modal-body").empty(),t(NestedPages.selectors.sortable).find(".new-child").remove(),t(NestedPages.selectors.row).show()},e.addTitleField=function(e){{var a=t(e).parents("form"),s=t(e).siblings(".new-page-titles").children("li").length+1,n='<li><i class="handle np-icon-menu"></i><div class="form-control new-child-row"><label>'+NestedPages.jsData.titleText+'</label><div><input type="text" name="post_title[]" class="np_title" placeholder="'+NestedPages.jsData.titleText+'" value="" tabindex="'+s+'" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';t(e).siblings(".new-page-titles").append(n)}t(a).find(".np_title").last().focus(),t(".new-page-titles").sortable({items:"li",handle:".handle"})},e.removeTitleField=function(e){t(e).parents(".new-child-row").parent("li").remove()},e.submitForm=function(a){e.toggleLoading(!0),e.form=t(a).parents("form");var s=t(a).hasClass("add-edit")?!0:!1;t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).serialize()+"&action="+NestedPages.formActions.newPage+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){if("error"===a.status)return e.toggleLoading(!1),void t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show();if(s===!0){var n=a.new_pages[0].edit_link;return n=n.replace(/&amp;/g,"&"),void window.location.replace(n)}e.toggleLoading(!1),e.posts=a.new_pages,e.addPosts()},error:function(a){console.log(a),e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},e.addPosts=function(){var a=t(e.form).parent(".new-child").parent(".page-row");if(0===t(a).children("ol").length&&t(a).append('<ol class="nplist"></ol>'),t(e.form).hasClass("in-modal"))var s=t(".nplist.sortable li.page-row:first");else var s=t(a).children("ol");for(i=0;i<e.posts.length;i++)e.appendRows(s,e.posts[i]);t(s).show(),e.formatter.updateSubMenuToggle(),e.cancelNewPage(),t(NestedPages.selectors.newPageModal).modal("hide")},e.appendRows=function(e,a){var s='<li id="menuItem_'+a.id+'" class="page-row';"publish"===a.status&&(s+=" published"),s+='">',NestedPages.jsData.hierarchical?(s+='<div class="row">',s+='<div class="child-toggle"></div>'):s+='<div class="row non-hierarchical">',s+='<div class="row-inner">',s+='<i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i>',s+='<a href="'+a.edit_link+'" class="page-link page-title">',s+='<span class="title">'+a.title+"</span>",s+="Publish"!==a.status?'<span class="status">('+a.status+")</span>":'<span class="status"></span>',s+='<span class="nav-status"></span><span class="edit-indicator"><i class="np-icon-pencil"></i>Edit</span>',s+="</a>",s+='<div class="action-buttons">',s+='<a href="#" class="np-btn open-redirect-modal" data-parentid="'+a.id+'"><i class="np-icon-link"></i></a>',s+='<a href="#" class="np-btn add-new-child" data-id="'+a.id+'" data-parentname="'+a.title+'">'+nestedpages.add_child_short+"</a>",s+='<a href="#" class="np-btn np-quick-edit" data-id="'+a.id+'" data-template="'+a.page_template+'" data-title="'+a.title+'" data-slug="'+a.slug+'" data-commentstatus="closed" data-status="'+a.status.toLowerCase()+'" data-np-status="show" data-navstatus="show" data-author="'+a.author+'" data-template="'+a.template+'" data-month="'+a.month+'" data-day="'+a.day+'" data-year="'+a.year+'" data-hour="'+a.hour+'" data-minute="'+a.minute+'" data-datepicker="'+a.datepicker+'" data-time="'+a.time+'" data-formattedtime="'+a.formattedtime+'" data-ampm="'+a.ampm+'">'+nestedpages.quick_edit+"</a>",s+='<a href="'+a.view_link+'" class="np-btn" target="_blank">'+nestedpages.view+"</a>",s+='<a href="'+a.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',s+="</div><!-- .action-buttons -->",s+="</div><!-- .row-inner --></div><!-- .row -->",s+="</li>",t(e).append(s)},e.toggleLoading=function(e){return e?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(NestedPages.selectors.newPageSubmitButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(NestedPages.selectors.newPageSubmitButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.QuickEditPost=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.button="",e.initialData="",e.parent_li="",e.form="",e.flatTerms="",e.termNames="",e.saveButton="",e.newData="",e.row="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditOpen,function(a){a.preventDefault(),e.button=t(this),e.openForm()}),t(document).on("click",NestedPages.selectors.quickEditCancel,function(t){t.preventDefault(),e.formatter.removeQuickEdit()}),t(document).on("click",NestedPages.selectors.quickEditToggleTaxonomies,function(e){e.preventDefault(),t(this).parents("form").find(".np-taxonomies").toggle()}),t(document).on("click",NestedPages.selectors.quickEditToggleMenuOptions,function(e){e.preventDefault(),t(this).parents("form").find(".np-menuoptions").toggle()}),t(document).on("change",".keep_private",function(){this.checked?t(".post_password").val("").prop("readonly",!0):t(".post_password").prop("readonly",!1)}),t(document).on("click",NestedPages.selectors.quickEditSaveButton,function(a){a.preventDefault(),e.saveButton=t(this),e.save()}),t(document).on("keydown",function(t){27===t.keyCode&&e.formatter.removeQuickEdit()})},e.openForm=function(){e.setInitialData(),e.createForm(),e.populateForm(),e.populateFlatTaxonomies()},e.setInitialData=function(){e.initialData={id:t(e.button).attr("data-id"),title:t(e.button).attr("data-title"),slug:t(e.button).attr("data-slug"),author:t(e.button).attr("data-author"),cs:t(e.button).attr("data-commentstatus"),status:t(e.button).attr("data-status"),template:t(e.button).attr("data-template"),month:t(e.button).attr("data-month"),day:t(e.button).attr("data-day"),year:t(e.button).attr("data-year"),hour:t(e.button).attr("data-hour"),minute:t(e.button).attr("data-minute"),navstatus:t(e.button).attr("data-navstatus"),npstatus:t(e.button).attr("data-np-status"),navtitle:t(e.button).attr("data-navtitle"),navtitleattr:t(e.button).attr("data-navtitleattr"),navcss:t(e.button).attr("data-navcss"),linktarget:t(e.button).attr("data-linktarget"),password:t(e.button).attr("data-password"),datepicker:t(e.button).attr("data-datepicker"),time:t(e.button).attr("data-formattedtime"),ampm:t(e.button).attr("data-ampm")},e.initialData.h_taxonomies=[],e.initialData.f_taxonomies=[],e.parent_li=t(e.button).closest(NestedPages.selectors.row).parent("li");var a=t(e.parent_li).attr("class").split(/\s+/);for(i=0;i<a.length;i++)"in-"===a[i].substring(0,3)&&e.initialData.h_taxonomies.push(a[i]),"inf-"===a[i].substring(0,4)&&e.initialData.f_taxonomies.push(a[i])},e.createForm=function(){if(e.form=t(NestedPages.selectors.quickEditPostForm).clone(),t(e.parent_li).children("ol").length>0){var a=t(e.parent_li).children("ol");t(e.form).insertBefore(a)}else t(e.form).appendTo(e.parent_li);t(e.form).siblings(NestedPages.selectors.row).hide(),t(e.form).show()},e.populateForm=function(){if(t(e.form).find(".page_id").html("<em>ID:</em> "+e.initialData.id),t(e.form).find(".np_id").val(e.initialData.id),t(e.form).find(".np_title").val(e.initialData.title),t(e.form).find(".np_slug").val(e.initialData.slug),t(e.form).find(".np_author select").val(e.initialData.author),t(e.form).find(".np_status").val(e.initialData.status),t(e.form).find(".np_nav_title").val(e.initialData.navtitle),t(e.form).find(".np_title_attribute").val(e.initialData.navtitleattr),t(e.form).find(".np_nav_css_classes").val(e.initialData.navcss),t(e.form).find(".post_password").val(e.initialData.password),t(e.form).find(".np_datepicker").val(e.initialData.datepicker),t(e.form).find(".np_time").val(e.initialData.time),t(e.form).find(".np_ampm").val(e.initialData.ampm),"open"===e.initialData.cs&&t(e.form).find(".np_cs").attr("checked","checked"),t(e.form).find(".np_template").val(""!==e.initialData.template?e.initialData.template:"default"),"private"===e.initialData.status&&(t(e.form).find(".post_password").attr("readonly",!0),t(e.form).find(".keep_private").attr("checked",!0)),"hide"===e.initialData.npstatus?t(e.form).find(".np_status").attr("checked","checked"):t(e.form).find(".np_status").removeAttr("checked"),"hide"===e.initialData.navstatus?t(e.form).find(".np_nav_status").attr("checked","checked"):t(e.form).find(".np_nav_status").attr("checked",!1),"_blank"===e.initialData.linktarget?t(e.form).find(".link_target").attr("checked","checked"):t(e.form).find(".link_target").attr("checked",!1),"private"===e.initialData.status&&t(e.form).find(".np_status").val("publish"),t(e.form).find('select[name="mm"]').val(e.initialData.month),t(e.form).find('input[name="jj"]').val(e.initialData.day),t(e.form).find('input[name="aa"]').val(e.initialData.year),t(e.form).find('input[name="hh"]').val(e.initialData.hour),t(e.form).find('input[name="mn"]').val(e.initialData.minute),e.initialData.hasOwnProperty("h_taxonomies")){var a=e.initialData.h_taxonomies;for(i=0;i<a.length;i++){var s="#"+a[i];t(e.form).find(s).attr("checked","checked")}}t(e.form).find(".np_datepicker").datepicker({beforeShow:function(){t("#ui-datepicker-div").addClass("nestedpages-datepicker")}}),e.formatter.showQuickEdit(),t(e.form).show()},e.populateFlatTaxonomies=function(){e.initialData.hasOwnProperty("f_taxonomies")&&(e.createTaxonomyObject(),e.getTermNames(),e.setWPSuggest())},e.createTaxonomyObject=function(){var t={};for(i=0;i<e.initialData.f_taxonomies.length;i++){var a=e.initialData.f_taxonomies[i],s=a.split("-"),n=s.indexOf("nps"),o=s.splice(n+1);o=o.join("-");var r=a.split("-").splice(0,n);r.shift("inf");var d=r.join("-");d in t||(t[d]=[]);var l=t[d];l.push(o)}e.flatTerms=t},e.getTermNames=function(){t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.getTaxonomies,nonce:NestedPages.jsData.nonce,terms:e.flatTerms},success:function(t){e.termNames=t.terms,e.populateFlatTaxonomyFields()}})},e.populateFlatTaxonomyFields=function(){e.termNames&&t.each(e.termNames,function(e,a){var s=t("#"+e);t(s).val(a.join(","))})},e.setWPSuggest=function(){var a=t(e.form).find("[data-autotag]");t.each(a,function(){var e=t(this).attr("data-taxonomy");t(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+e,{multiple:!0,multipleSep:","})})},e.save=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditPost+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){"error"===a.status?(e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show()):(e.toggleLoading(!1),e.newData=a.post_data,e.updatePostRow())},error:function(e){console.log(e)}})},e.updatePostRow=function(){e.row=t(e.button).parents(".row-inner"),t(e.row).find(".title").text(e.newData.post_title);var a=t(e.row).find(".status");if(t(a).text("publish"!==e.newData._status&&"future"!==e.newData._status?"("+e.newData._status+")":"private"===e.newData.keep_private?"("+e.newData.keep_private+")":""),""!==e.newData.post_password){var s=t(a).text();s+=' <i class="np-icon-lock"></i>',t(a).html(s)}var n=t(e.row).find(".nav-status");t(n).text("hide"==e.newData.nav_status?"(Hidden)":"");var o=t(e.row).parent("li");"hide"==e.newData.np_status?(t(o).addClass("np-hide"),t(e.row).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(o).removeClass("np-hide"),t(e.row).find(".np-icon-eye-blocked").remove()),NestedPages.jsData.hierarchical||t(e.row).find(".np-author-display").text(e.newData.author_name);var i=t(e.row).find(NestedPages.selectors.quickEditOpen);t(i).attr("data-id",e.newData.post_id),t(i).attr("data-template",e.newData.page_template),t(i).attr("data-title",e.newData.post_title),t(i).attr("data-slug",e.newData.post_name),t(i).attr("data-commentstatus",e.newData.comment_status),t(i).attr("data-status",e.newData._status),"private"===e.newData.keep_private&&t(i).attr("data-status","private"),t(i).attr("data-author",e.newData.post_author),t(i).attr("data-np-status",e.newData.np_status),t(i).attr("data-password",e.newData.post_password),t(i).attr("data-navstatus",e.newData.nav_status),t(i).attr("data-navtitle",e.newData.np_nav_title),t(i).attr("data-linktarget",e.newData.link_target),t(i).attr("data-navtitleattr",e.newData.np_title_attribute),t(i).attr("data-navcss",e.newData.np_nav_css_classes),t(i).attr("data-month",e.newData.mm),t(i).attr("data-day",e.newData.jj),t(i).attr("data-year",e.newData.aa),t(i).attr("data-hour",e.newData.hh),t(i).attr("data-minute",e.newData.mn),t(i).attr("data-datepicker",e.newData.np_date),t(i).attr("data-time",e.newData.np_time),t(i).attr("data-formattedtime",e.newData.np_time),t(i).attr("data-ampm",e.newData.np_ampm),e.removeTaxonomyClasses(),e.addCategoryClasses(),e.addHierarchicalClasses(),e.addFlatClasses(),e.addStatusClass(),e.formatter.removeQuickEdit(),e.formatter.flashRow(e.row)},e.addStatusClass=function(){var a=["published","draft","pending","future"];for(i=0;i<a.length;i++)t(e.row).removeClass(a[i]);t(e.row).addClass(e.newData._status)},e.removeTaxonomyClasses=function(){taxonomies=[];var a=t(e.row).attr("class").split(/\s+/);for(i=0;i<a.length;i++)"in-"===a[i].substring(0,3)&&t(e.row).removeClass(a[i]),"inf-"===a[i].substring(0,4)&&t(e.row).removeClass(a[i])},e.addCategoryClasses=function(){if(e.newData.hasOwnProperty("post_category")){var a=e.newData.post_category;for(i=0;i<a.length;i++){var s="in-category-"+a[i];t(e.row).addClass(s)}}},e.addHierarchicalClasses=function(){if(e.newData.hasOwnProperty("tax_input")){var a=e.newData.tax_input;t.each(a,function(a,s){for(i=0;i<s.length;i++){var n="in-"+a+"-"+s[i];t(e.row).addClass(n)}})}},e.addFlatClasses=function(){if(e.newData.hasOwnProperty("flat_tax")){var a=e.newData.flat_tax;t.each(a,function(a,s){for(i=0;i<s.length;i++){var n="inf-"+a+"-nps-"+s[i];t(e.row).addClass(n)}})}},e.toggleLoading=function(a){return a?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(e.saveButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(e.saveButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.QuickEditLink=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.button="",e.postData="",e.newPostData="",e.form="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditButtonLink,function(a){a.preventDefault(),e.formatter.removeQuickEdit(),e.button=t(this),e.openQuickEdit()}),t(document).on("click",NestedPages.selectors.quickEditLinkSaveButton,function(t){t.preventDefault(),e.submitForm()}),t(document).on("keydown",function(t){27===t.keyCode&&e.formatter.removeQuickEdit()})},e.openQuickEdit=function(){e.setData(),e.createForm(),e.populateForm()},e.setData=function(){e.postData={id:t(e.button).attr("data-id"),url:t(e.button).attr("data-url"),title:t(e.button).attr("data-title"),status:t(e.button).attr("data-status"),navstatus:t(e.button).attr("data-navstatus"),npstatus:t(e.button).attr("data-np-status"),linktarget:t(e.button).attr("data-linktarget"),parentid:t(e.button).attr("data-parentid"),navtitleattr:t(e.button).attr("data-navtitleattr"),navcss:t(e.button).attr("data-navcss"),navtype:t(e.button).attr("data-nav-type"),navobject:t(e.button).attr("data-nav-object"),navobjectid:t(e.button).attr("data-nav-object-id"),navoriginallink:t(e.button).attr("data-nav-original-link"),navoriginaltitle:t(e.button).attr("data-nav-original-title")}},e.createForm=function(){var a=t(e.button).closest(NestedPages.selectors.row).parent("li");if(e.form=t(NestedPages.selectors.quickEditLinkForm).clone(),t(a).children("ol").length>0){var s=t(a).children("ol");t(e.form).insertBefore(s)}else t(e.form).appendTo(a);t(e.form).siblings(NestedPages.selectors.row).hide()},e.populateForm=function(){if(t(e.form).find(".np_id").val(e.postData.id),t(e.form).find(".np_title").val(e.postData.title),t(e.form).find(".np_author select").val(e.postData.author),t(e.form).find(".np_status").val(e.postData.status),t(e.form).find(".np_content").val(e.postData.url),t(e.form).find(".np_parent_id").val(e.postData.parentid),t(e.form).find(".np_title_attribute").val(e.postData.navtitleattr),t(e.form).find(".np_nav_css_classes").val(e.postData.navcss),"hide"===e.postData.npstatus?t(e.form).find(".np_status").prop("checked","checked"):t(e.form).find(".np_status").removeAttr("checked"),"hide"===e.postData.navstatus?t(e.form).find(".np_nav_status").prop("checked","checked"):t(e.form).find(".np_nav_status").removeAttr("checked"),"_blank"===e.postData.linktarget?t(e.form).find(".link_target").prop("checked","checked"):t(e.form).find(".link_target").removeAttr("checked"),"custom"!==e.postData.navobject&&""!==e.postData.navobject){var a='<div class="form-control original-link">Original: <a href="'+e.postData.navoriginallink+'" target="_blank">'+e.postData.navoriginaltitle+"</a></div>";t(e.form).find("[data-url-field]").remove(),t(a).insertAfter(t(e.form).find("h3")),t(e.form).find("[data-np-menu-object-input]").val(e.postData.navobject),t(e.form).find("[data-np-menu-objectid-input]").val(e.postData.navobjectid),t(e.form).find("[data-np-menu-type-input]").val(e.postData.navtype),t(e.form).find("h3").text("Link: "+e.postData.navoriginaltitle)}else t(e.form).find("h3").text("Link"),t(e.form).find("[data-np-menu-object-input]").val("custom"),t(e.form).find("[data-np-menu-type-input]").val("custom");e.formatter.showQuickEdit(),t(e.form).show()},e.submitForm=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditLink+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){"error"===a.status?(e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show()):(e.toggleLoading(!1),e.newPostData=a.post_data,e.updateRow())},error:function(){e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},e.updateRow=function(){console.log(e.newPostData);var a=t(e.form).siblings(".row");t(a).find(".title").html(e.newPostData.post_title+' <i class="np-icon-link"></i>');var s=t(a).find(".status");t(s).text("publish"!==e.newPostData._status&&"future"!==e.newPostData._status?"("+e.newPostData._status+")":"");var n=t(a).find(".nav-status");t(n).text("hide"==e.newPostData.nav_status?"("+NestedPages.jsData.hiddenText+")":"");var o=t(a).parent("li");"hide"==e.newPostData.np_status?(t(o).addClass("np-hide"),t(a).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(o).removeClass("np-hide"),t(a).find(".np-icon-eye-blocked").remove());var i=t(a).find(NestedPages.selectors.quickEditButtonLink);t(i).attr("data-id",e.newPostData.post_id),t(i).attr("data-title",e.newPostData.post_title),t(i).attr("data-url",e.newPostData.post_content),t(i).attr("data-status",e.newPostData._status),t(i).attr("data-navstatus",e.newPostData.nav_status),t(i).attr("data-np-status",e.newPostData.np_status),t(i).attr("data-linkTarget",e.newPostData.linkTarget),t(i).attr("data-navtitleattr",e.newPostData.titleAttribute),t(i).attr("data-navcss",e.newPostData.cssClasses),e.formatter.removeQuickEdit(),e.formatter.flashRow(a)},e.toggleLoading=function(e){return t(".row").removeClass("np-updated").removeClass("np-updated-show"),e?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.Clone=function(){var e=this,t=jQuery;return e.parent_id="",e.parent_title="",e.parentLi=null,e.formatter=new NestedPages.Formatter,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.cloneButton,function(a){a.preventDefault(),e.parent_id=t(this).attr("data-id"),e.parent_title=t(this).attr("data-parentname"),e.parentLi=t(this).parent(".row").parent(".page-row").parent(".npList"),e.openModal()}),t(document).on("click",NestedPages.selectors.confirmClone,function(t){t.preventDefault(),e.clone()})},e.openModal=function(){t(NestedPages.selectors.cloneModal).find("[data-clone-parent]").text(e.parent_title),t(NestedPages.selectors.cloneModal).modal("show")},e.clone=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.clonePost,parent_id:e.parent_id,quantity:t(NestedPages.selectors.cloneQuantity).val(),status:t(NestedPages.selectors.cloneStatus).val(),author:t(NestedPages.selectors.cloneAuthor).find("select").val(),nonce:NestedPages.jsData.nonce,posttype:NestedPages.jsData.posttype},success:function(){e.toggleLoading(!1),t(NestedPages.selectors.cloneModal).modal("hide"),location.reload()
2
+ }})},e.toggleLoading=function(e){return e?(t(NestedPages.selectors.cloneModal).find("[data-clone-loading]").show(),void t(NestedPages.selectors.confirmClone).attr("disabled","disabled")):(t(NestedPages.selectors.cloneModal).find("[data-clone-loading]").hide(),void t(NestedPages.selectors.confirmClone).attr("disabled",!1))},e.init()};var NestedPages=NestedPages||{};NestedPages.Tabs=function(){var e=this,t=jQuery;return e.activeContent="",e.activeButton="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.tabButton,function(a){a.preventDefault(),e.activeButton=t(this),e.toggleTabs()})},e.toggleTabs=function(){e.activeContent=t(e.activeButton).attr("href"),t(NestedPages.selectors.tabContent).hide(),t(e.activeContent).show(),t(e.activeButton).parents(NestedPages.selectors.tabButtonParent).find(NestedPages.selectors.tabButton).removeClass("active"),t(e.activeButton).addClass("active")},e.init()},jQuery(document).ready(function(){new NestedPages.Factory});var NestedPages=NestedPages||{};NestedPages.selectors={childToggle:".child-toggle",childToggleLink:".child-toggle a",toggleAll:".nestedpages-toggleall",toggleHidden:".np-toggle-hidden",toggleStatus:".np-toggle-publish",lists:".nplist",rows:".page-row",row:".row",sortable:".sortable",notSortable:".no-sort",handle:".handle",published:".published",hiddenRows:".np-hide",errorDiv:"#np-error",loadingIndicator:"#nested-loading",syncCheckbox:".np-sync-menu",ajaxError:"[data-nestedpages-error]",toggleEditButtons:".np-toggle-edit",quickEditOverlay:".np-inline-overlay",quickEditLoadingIndicator:".np-qe-loading",quickEditErrorDiv:".np-quickedit-error",quickEditCancel:".np-cancel-quickedit",quickEditToggleTaxonomies:".np-toggle-taxonomies",quickEditToggleMenuOptions:".np-toggle-menuoptions",quickEditButtonLink:".np-quick-edit-redirect",quickEditLinkForm:".quick-edit-form-redirect",quickEditLinkSaveButton:".np-save-quickedit-redirect",quickEditOpen:".np-quick-edit",quickEditPostForm:".quick-edit-form",quickEditSaveButton:".np-save-quickedit",openLinkModal:".open-redirect-modal",linkModal:"#np-link-modal",saveLink:".np-save-link",linkLoadingIndicator:".np-link-loading",linkErrorDiv:".np-new-link-error",linkForm:".np-new-link-form",openPageModal:".open-bulk-modal",newPageModal:"#np-bulk-modal",newPageFormContainer:".new-child-form",newPageForm:".np-new-child-form",newPageSubmitButton:".np-save-newchild",newPageTitle:".add-new-child-row",newPageRemoveTitle:".np-remove-child",addChildButton:".add-new-child",newChildError:".np-newchild-error",cancelNewChildButton:".np-cancel-newchild",cloneButton:".clone-post",confirmClone:"[data-confirm-clone]",cloneModal:"#np-clone-modal",cloneQuantity:"[data-clone-quantity]",cloneStatus:"[data-clone-status]",cloneAuthor:"[data-clone-author]",tabButtonParent:"[data-np-tabs]",tabButton:"[data-np-tab]",tabContent:"[data-np-tab-pane]"},NestedPages.cssClasses={iconToggleDown:"np-icon-arrow-down",iconToggleRight:"np-icon-arrow-right",noborder:"no-border"},NestedPages.jsData={ajaxurl:ajaxurl,nonce:nestedpages.np_nonce,allPostTypes:nestedpages.post_types,syncmenu:"nosync",posttype:"",nestable:!0,hierarchical:!0,expandText:nestedpages.expand_text,collapseText:nestedpages.collapse_text,showHiddenText:nestedpages.show_hidden,hideHiddenText:nestedpages.hide_hidden,quickEditText:nestedpages.quick_edit,hiddenText:nestedpages.hidden,titleText:nestedpages.title},NestedPages.formActions={syncToggles:"npnestToggle",syncNesting:"npsort",syncMenu:"npsyncMenu",newPage:"npnewChild",quickEditLink:"npquickEditLink",getTaxonomies:"npgetTaxonomies",quickEditPost:"npquickEdit",clonePost:"npclonePost",search:"npmenuSearch",newMenuItem:"npnewMenuItem"},NestedPages.Factory=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.responsive=new NestedPages.Responsive,e.menuToggle=new NestedPages.MenuToggle,e.pageToggle=new NestedPages.PageToggle,e.nesting=new NestedPages.Nesting,e.syncMenuSetting=new NestedPages.SyncMenuSetting,e.newPage=new NestedPages.NewPage,e.quickEditLink=new NestedPages.QuickEditLink,e.quickEditPost=new NestedPages.QuickEditPost,e.clone=new NestedPages.Clone,e.tabs=new NestedPages.Tabs,e.menuLinks=new NestedPages.MenuLinks,e.init=function(){e.bindEvents(),e.setPostType(),e.setMenuSync(),e.setNestable(),e.formatter.updateSubMenuToggle(),e.formatter.setBorders(),e.formatter.setNestedMargins(),e.nesting.initializeSortable()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditOverlay,function(){e.formatter.removeQuickEdit(),e.newPage.cancelNewPage()}),t(document).ready(function(){e.formatter.hideAjaxError()})},e.setNestable=function(){var e=!0;t.each(NestedPages.jsData.allPostTypes,function(t,a){a.name===NestedPages.jsData.posttype&&(a.hierarchical===!0&&(e=!0),a.disable_nesting===!0&&(e=!1))}),NestedPages.jsData.nestable=e},e.setPostType=function(){NestedPages.jsData.posttype=t(NestedPages.selectors.sortable).attr("id").substring(3),NestedPages.jsData.hierarchical=NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical},e.setMenuSync=function(){NestedPages.jsData.syncmenu="1"===nestedpages.syncmenu?"sync":"nosync"},e.init()};var NestedPages=NestedPages||{};NestedPages.MenuLinks=function(){var e=this,t=jQuery;return e.typeButton="",e.post="",e.formatter=new NestedPages.Formatter,e.selectors={form:"[data-np-menu-item-form]",typeSelect:"[data-np-menu-selection]",accordion:"[data-np-menu-accordion]",accordionItem:"[data-np-menu-accordion-item]",formPlaceholder:".np-menu-link-object-placeholder",formDetails:".np-menu-link-details",searchResults:"[data-np-search-result]",defaultResults:"[data-default-result]",originalLink:"[data-np-original-link]",saveButton:"[data-np-save-link]",urlInputCont:"[data-np-menu-url-cont]",errorDiv:"[data-np-error]"},e.fields={object:"[data-np-menu-object-input]",objectid:"[data-np-menu-objectid-input]",itemType:"[data-np-menu-type-input]",url:"[data-np-menu-url]",navigationLabel:"[data-np-menu-navigation-label]",titleAttribute:"[data-np-menu-title-attr]",cssClasses:"[data-np-menu-css-classes]",npStatus:"[data-np-menu-np-status]",linkTarget:"[data-np-menu-link-target]",menuTitle:"[data-np-menu-title]"},e.search=new NestedPages.MenuSearch,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.openLinkModal,function(a){a.preventDefault(),e.postParent=t(this).attr("data-parentid"),t(e.selectors.form).find(".parent_id").val(t(this).attr("data-parentid")),e.openModal()}),t(document).on("click",e.selectors.accordionItem,function(a){a.preventDefault(),e.accordion(t(this))}),t(document).on("click",e.selectors.typeSelect,function(a){a.preventDefault(),e.typeButton=t(this),e.setLinkType()}),t(document).on("keyup",e.fields.navigationLabel,function(){e.updateTitle()}),t(document).on("click",e.selectors.saveButton,function(t){t.preventDefault(),e.submitForm()}),t(document).on("keydown",function(e){27===e.keyCode&&t("#np-link-modal").modal("hide")})},e.openModal=function(){t(NestedPages.selectors.linkErrorDiv).hide(),t(NestedPages.selectors.linkModal).find("input").val(""),t(NestedPages.selectors.linkModal).find(".parent_id").val(e.postParent),e.clearForm(),t(e.selectors.accordion).find("ul").hide(),t(e.selectors.typeSelect).removeClass("active"),t(NestedPages.selectors.linkModal).modal("show")},e.accordion=function(a){e.clearForm();var s=t(a).siblings("ul");return t(s).is(":visible")?(t(a).removeClass("active"),void t(s).slideUp("fast")):(t(e.selectors.accordionItem).removeClass("active"),t(a).addClass("active"),t(a).parents(e.selectors.accordion).find("ul").slideUp("fast"),void t(s).slideDown("fast"))},e.setLinkType=function(){return t(e.typeButton).hasClass("active")?void e.clearForm():(t(e.typeButton).hasClass("np-custom-link")&&(t(e.selectors.accordionItem).removeClass("active"),t(e.selectors.accordion).find("ul").slideUp("fast")),t(e.selectors.formPlaceholder).hide(),void e.populateForm())},e.populateForm=function(){t(e.selectors.saveButton).show(),t(e.selectors.typeSelect).removeClass("active"),t(e.typeButton).addClass("active"),t(e.fields.menuTitle).text(t(e.typeButton).text()).val(t(e.typeButton).text()),t(e.selectors.form).find("h3").find("em").text(t(e.typeButton).attr("data-np-object-name")),""!==t(e.typeButton).attr("data-np-permalink")?(t(e.selectors.form).find(e.selectors.urlInputCont).hide(),t(e.selectors.form).find(e.selectors.originalLink).html('<a href="'+t(e.typeButton).attr("data-np-permalink")+'">'+t(e.typeButton).text()+"</a>"),t(e.selectors.form).find(e.selectors.originalLink).parent(".original-link").show()):(t(e.selectors.form).find(e.selectors.urlInputCont).show(),t(e.selectors.form).find(e.selectors.originalLink).parent(".original-link").hide()),t(e.fields.object).val(t(e.typeButton).attr("data-np-menu-object")),t(e.fields.objectid).val(t(e.typeButton).attr("data-np-menu-objectid")),t(e.fields.itemType).val(t(e.typeButton).attr("data-np-menu-type")),t(e.selectors.formDetails).show()},e.clearForm=function(){t(e.selectors.form).find(e.selectors.errorDiv).hide(),t(e.selectors.saveButton).hide(),t(e.selectors.formDetails).hide(),t(e.selectors.formPlaceholder).show(),t(e.selectors.form).find("input").not(".parent_id").val(""),t(e.selectors.form).find(e.fields.linkTarget).val("_blank"),t(e.selectors.form).find('input[type="checkbox"]').attr("checked",!1),t(e.selectors.typeSelect).removeClass("active"),e.search.toggleLoading(!1),t(e.selectors.searchResults).remove(),t(e.selectors.defaultResults).show()},e.updateTitle=function(){var a=t(e.fields.navigationLabel).val(),s=t(e.selectors.form).find("h3").find("span");""!==a?(t(e.fields.menuTitle).val(a),t(s).text(a)):(t(e.fields.menuTitle).val(t(e.typeButton).text()),t(s).text(t(e.typeButton).text()))},e.submitForm=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:t(e.selectors.form).serialize()+"&action="+NestedPages.formActions.newMenuItem+"&nonce="+NestedPages.jsData.nonce+"&post_type="+NestedPages.jsData.posttype+"&syncmenu="+NestedPages.jsData.syncmenu,success:function(a){return e.toggleLoading(!1),"error"===a.status?void t(e.selectors.form).find(e.selectors.errorDiv).text(a.message).show():(e.post=a.post_data,void e.createRow())},error:function(e){console.log(e)}})},e.createRow=function(){var a='<li id="menuItem_'+e.post.id+'" class="page-row published';a+='">',a+='<div class="row"><div class="child-toggle"></div><div class="row-inner"><i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i><a href="'+e.post.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+e.post.menuTitle+' <i class="np-icon-link"></i></span>',a+='</a><a href="#" class="np-toggle-edit"><i class="np-icon-pencil"></i></a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ',a+='data-id="'+e.post.id+'"',a+='data-parentid="'+e.post.parent_id+'"',a+='data-title="'+e.post.menuTitle+'" ',a+='data-url="'+e.post.url+'" ',a+='data-status="publish" ',a+='data-np-status="show" ',a+='data-navstatus="show" ',a+='data-navcss="'+e.post.cssClasses+'" ',a+='data-navtitleattr="'+e.post.titleAttribute+'" ',a+='data-nav-type="'+e.post.menuType+'" ',a+='data-nav-object="'+e.post.objectType+'" ',a+='data-nav-object-id="'+e.post.objectId+'" ',a+='data-nav-original-link="'+e.post.original_link+'" ',a+='data-nav-original-title="'+e.post.original_title+'" ',a+='data-linktarget="'+e.post.link_target+'">',a+=NestedPages.jsData.quickEditText,a+="</a>",a+='<a href="'+e.post.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',a+="</div></div></div></li>","0"===e.post.parent_id?t(".nplist:first li:first").after(a):e.appendChildRow(a),t(NestedPages.selectors.linkModal).modal("hide"),e.row=t("#menuItem_"+e.post.id).find(".row"),e.formatter.flashRow(e.row)},e.appendChildRow=function(a){var s=t("#menuItem_"+e.post.parent_id);0===t(s).children("ol").length?(a='<ol class="sortable nplist" style="display:block;">'+a+"</ol>",t(s).append(a)):t(s).find("ol:first").prepend(a),e.formatter.updateSubMenuToggle()},e.toggleLoading=function(a){return a?(t(e.selectors.form).find(e.selectors.errorDiv).hide(),t(e.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).show(),void t(e.selectors.saveButton).attr("disabled","disabled")):(t(e.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).hide(),void t(e.selectors.saveButton).attr("disabled",!1))},e.init()};var NestedPages=NestedPages||{};NestedPages.MenuSearch=function(){var e=this,t=jQuery;return e.selectors={searchForms:"*[data-np-menu-search]",defaultResults:"[data-default-result]",loadingIndicator:".np-menu-search-loading",noResults:".np-menu-search-noresults",searchType:"data-search-type",searchObject:"data-search-object",searchResults:"[data-np-search-result]"},e.activeForm="",e.results="",e.defaultResults="",e.searchType="",e.searchObject="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("keyup",e.selectors.searchForms,function(){e.activeForm=t(this),t(e.selectors.searchResults).remove(),e.performSearch()})},e.performSearch=function(){return e.defaultResults=t(e.activeForm).parent("li").siblings(e.selectors.defaultResults),t(e.activeForm).val().length>2?(t(e.defaultResults).hide(),e.toggleLoading(!0),void e.query()):(e.toggleLoading(!1),void t(e.defaultResults).show())},e.query=function(){e.searchType=t(e.activeForm).attr(e.selectors.searchType),e.searchObject=t(e.activeForm).attr(e.selectors.searchObject),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.search,nonce:NestedPages.jsData.nonce,term:t(e.activeForm).val(),searchType:e.searchType,searchObject:e.searchObject},success:function(a){console.log(a),a.results?(e.results=a.results,e.toggleLoading(!1),"post_type"===e.searchType?e.appendPosts():e.appendTaxonomies()):(e.toggleLoading(!1),t(e.activeForm).siblings(e.selectors.noResults).show())}})},e.appendPosts=function(){var a="";t.each(e.results,function(t,s){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+e.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+s.ID+'" data-np-permalink="'+s.permalink+'" data-np-object-name="'+s.singular_name+'" data-np-menu-selection>'+s.post_title+"</a></li>"}),t(a).insertAfter(t(e.activeForm).parent("li")),e.toggleLoading(!1)},e.appendTaxonomies=function(){var a="";t.each(e.results,function(t,s){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+e.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+s.term_id+'" data-np-permalink="'+s.permalink+'" data-np-object-name="'+s.taxonomy+'" data-np-menu-selection>'+s.name+"</a></li>"}),t(a).insertAfter(t(e.activeForm).parent("li")),e.toggleLoading(!1)},e.toggleLoading=function(a){var s=t(e.activeForm).siblings(e.selectors.loadingIndicator);return t(e.selectors.noResults).hide(),a?void t(s).show():void t(s).hide()},e.init()},jQuery(document).ready(function(){new NestedPagesTrash});var NestedPagesTrash=function(){var e=this,t=jQuery;return e.trashButton=".np-empty-trash",e.confirmButton=".np-trash-confirm",e.warningModal="#np-trash-modal",e.errorAlert="#np-error",e.loadingIndicator="#nested-loading",e.trashLinks=".np-trash-links",e.postType=t("#np-trash-posttype").val(),e.nonce=nestedpages.np_nonce,e.formAction="npEmptyTrash",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",e.trashButton,function(a){a.preventDefault(),t(e.warningModal).modal("show")}),t(document).on("click",e.confirmButton,function(t){t.preventDefault(),e.confirmEmpty()})},e.confirmEmpty=function(){e.loading(!0),t(e.warningModal).hide(),t(e.errorAlert).hide(),e.emptyTrash()},e.emptyTrash=function(){t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:e.formAction,nonce:e.nonce,posttype:e.postType},success:function(a){e.loading(!1),"error"===a.status?t(e.errorAlert).text(a.message).show():t(e.trashLinks).hide()}})},e.loading=function(a){return a?void t(e.loadingIndicator).show():void t(e.loadingIndicator).hide()},e.init()};jQuery(document).ready(function(){new NestedPagesConfirmDelete});var NestedPagesConfirmDelete=function(){var e=this,t=jQuery;return e.deleteButton="[data-np-confirm-delete]",e.confirmButton="[data-delete-confirmation]",e.warningModal="#np-delete-confirmation-modal",e.deleteLink="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",e.deleteButton,function(a){a.preventDefault(),e.deleteLink=t(this).attr("href"),t(e.warningModal).modal("show")}),t(document).on("click",e.confirmButton,function(t){t.preventDefault(),e.confirmEmpty()})},e.confirmEmpty=function(){window.location.replace(e.deleteLink)},e.init()};
languages/nestedpages-da_DK.mo CHANGED
Binary file
languages/nestedpages-da_DK.po CHANGED
@@ -1,110 +1,111 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Nested Pages v1.1.6\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-08-31 10:47+0200\n"
6
- "PO-Revision-Date: 2015-08-31 10:48+0200\n"
7
- "Last-Translator: Thomas Blomberg Hansen <thomas@blomberg.it>\n"
8
- "Language-Team: \n"
9
  "Language: da_DK\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: Poedit 1.8.4\n"
15
- "X-Poedit-SourceCharset: utf-8\n"
16
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
17
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
18
  "X-Poedit-Basepath: ..\n"
19
  "X-Textdomain-Support: yes\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
 
22
- #: app/Activation/Dependencies.php:107 app/Views/listing.php:29
23
  msgid "Expand All"
24
  msgstr "Udvid alle"
25
 
26
- #: app/Activation/Dependencies.php:108
27
  msgid "Collapse All"
28
  msgstr "Skjul alle"
29
 
30
  # @ nestedpages
31
- #: app/Activation/Dependencies.php:109 app/Views/partials/tool-list.php:18
32
  msgid "Show Hidden"
33
  msgstr "Vis skjulte"
34
 
35
  # @ nestedpages
36
- #: app/Activation/Dependencies.php:110
37
  msgid "Hide Hidden"
38
  msgstr "Skjul skjulte"
39
 
40
  # @ nestedpages
41
  # @ default
42
- #: app/Activation/Dependencies.php:111 app/Views/forms/link-form.php:14
43
- #: app/Views/listing.php:16 app/Views/listing.php:17
44
  msgid "Add Link"
45
  msgstr "Tilføj link"
46
 
47
  # @ nestedpages
48
- #: app/Activation/Dependencies.php:112
49
  msgid "Add Child Link"
50
  msgstr "Tilføj link under"
51
 
52
  # @ nestedpages
53
  # @ default
54
- #: app/Activation/Dependencies.php:113
55
- #: app/Entities/Post/PostUpdateRepository.php:68
56
  #: app/Views/forms/new-child.php:19 app/Views/forms/new-child.php:21
57
  #: app/Views/forms/quickedit-post.php:20 app/Views/partials/tool-list.php:64
58
  msgid "Title"
59
  msgstr "Titel"
60
 
61
  # @ default
62
- #: app/Activation/Dependencies.php:114 app/Views/forms/quickedit-post.php:11
63
- #: app/Views/partials/row-link.php:60 app/Views/partials/row.php:124
64
  msgid "Quick Edit"
65
  msgstr "Lynrediger"
66
 
67
- #: app/Activation/Dependencies.php:115
68
  msgid "Page Title"
69
  msgstr "Sidetitel"
70
 
71
  # @ default
72
- #: app/Activation/Dependencies.php:116 app/Views/partials/row.php:128
73
  msgid "View"
74
  msgstr "Vis"
75
 
76
  # @ nestedpages
77
- #: app/Activation/Dependencies.php:117 app/Views/forms/new-child.php:7
78
- #: app/Views/partials/row.php:88
79
  msgid "Add Child"
80
  msgstr "Tilføj underside"
81
 
82
- #: app/Activation/Dependencies.php:118
83
  msgid "Add Child Page"
84
  msgstr "Tilføj undersider"
85
 
86
- #: app/Activation/Dependencies.php:119
87
  msgid "Add Child Pages"
88
  msgstr "Tilføj undersider"
89
 
90
- #: app/Activation/Dependencies.php:120 app/Views/forms/new-child.php:93
 
91
  msgid "Add"
92
  msgstr "Tilføj"
93
 
94
- #: app/Activation/Dependencies.php:121
95
  msgid "Add Page"
96
  msgstr "Tilføj Side"
97
 
98
- #: app/Activation/Dependencies.php:122
99
  msgid "Add Pages"
100
  msgstr "Tilføj Sider"
101
 
102
- #: app/Activation/Dependencies.php:123 app/Views/listing.php:10
103
  #: app/Views/listing.php:11
104
  msgid "Add Multiple"
105
  msgstr "Tilføj flere"
106
 
107
- #: app/Activation/Dependencies.php:124
108
  msgid ""
109
  "Are you sure you would like to empty the trash? This action is not "
110
  "reversable."
@@ -112,8 +113,8 @@ msgstr ""
112
  "Er du sikker på, at du vil tømme papirkurven? Dette kan ikke fortrydes."
113
 
114
  # @ nestedpages
115
- #: app/Activation/Dependencies.php:125 app/Views/partials/row-link.php:37
116
- #: app/Views/partials/row.php:39
117
  msgid "Hidden"
118
  msgstr "Skjult"
119
 
@@ -123,162 +124,165 @@ msgid "Settings"
123
  msgstr "Indstillinger"
124
 
125
  # @ nestedpages
126
- #: app/Config/Settings.php:52 app/Views/settings/settings.php:2
127
  msgid "Nested Pages Settings"
128
  msgstr "Nested Pages Indstillinger"
129
 
130
  # @ nestedpages
131
- #: app/Config/Settings.php:53
132
  msgid "Nested Pages"
133
  msgstr "Nested Pages"
134
 
135
  # @ default
136
- #: app/Entities/AdminMenu/AdminSubmenu.php:73
137
  #: app/Views/partials/tool-list.php:33
138
  msgid "Default"
139
  msgstr "Standard"
140
 
141
  # @ nestedpages
142
- #: app/Entities/Confirmation/LinkDeletedConfirmation.php:9
143
  msgid "Link successfully deleted."
144
  msgstr "Link slettet."
145
 
146
  # @ nestedpages
147
- #: app/Entities/Confirmation/TrashConfirmation.php:12
148
  msgid "pages moved to the Trash"
149
  msgstr "sider flyttet til papirkurven"
150
 
151
- #: app/Entities/Confirmation/TrashConfirmation.php:14
152
  msgid "moved to the Trash"
153
  msgstr "flyttet til Papirkurven"
154
 
155
  # @ default
156
- #: app/Entities/Confirmation/TrashConfirmation.php:19
157
  msgid "Undo"
158
  msgstr "Fortryd"
159
 
160
  # @ nestedpages
161
- #: app/Entities/Confirmation/TrashRestoredConfirmation.php:10
162
  msgid "pages"
163
  msgstr "sider"
164
 
165
  # @ nestedpages
166
- #: app/Entities/Confirmation/TrashRestoredConfirmation.php:10
167
  msgid "page"
168
  msgstr "side"
169
 
170
  # @ nestedpages
171
- #: app/Entities/Confirmation/TrashRestoredConfirmation.php:11
172
  msgid "restored from trash"
173
  msgstr "gendannet fra papirkurven"
174
 
175
- # @ nestedpages
176
- #: app/Entities/Post/PostUpdateRepository.php:310
177
- msgid "Label"
178
- msgstr "Label"
179
-
180
- #: app/Entities/PostType/PostTypeRepository.php:182
181
  msgid "Nested View"
182
  msgstr "Hierarkisk visning"
183
 
184
- #: app/Entities/PostType/PostTypeRepository.php:182
185
- #, fuzzy
186
  msgid "Sort View"
187
  msgstr "Sorterings visning"
188
 
189
  # @ nestedpages
190
- #: app/Entities/PostType/RegisterPostTypes.php:20
191
  msgid "Redirects"
192
  msgstr "Viderestillinger"
193
 
194
  # @ nestedpages
195
- #: app/Entities/PostType/RegisterPostTypes.php:21
196
  msgid "Redirect"
197
  msgstr "Viderestilling"
198
 
199
  # @ nestedpages
200
- #: app/Form/Handlers/BaseHandler.php:79
201
  msgid "Incorrect Form Field"
202
  msgstr "Ukorrekt formular felt"
203
 
204
  # @ nestedpages
205
- #: app/Form/Handlers/BaseHandler.php:110
206
  msgid "There was an error updating the page."
207
  msgstr "Der skete en fejl under opdateringen af siden."
208
 
209
- #: app/Form/Handlers/ClonePostHandler.php:36
210
  msgid "Post Not Found"
211
  msgstr "Indlæg ikke fundet"
212
 
213
- #: app/Form/Handlers/EmptyTrashHandler.php:16
214
  msgid "Trash successfully emptied."
215
  msgstr "Papirkurven blev tømt."
216
 
 
 
 
 
217
  # @ nestedpages
218
- #: app/Form/Handlers/NewLinkHandler.php:33
219
- #: app/Form/Handlers/QuickEditLinkHandler.php:28
 
 
 
 
 
220
  msgid "Link successfully updated"
221
  msgstr "Link opdateret."
222
 
223
  # @ default
224
- #: app/Form/Handlers/QuickEditHandler.php:31
225
  msgid "Post successfully updated"
226
  msgstr "Indlægget er opdateret"
227
 
228
  # @ nestedpages
229
- #: app/Form/Handlers/SortHandler.php:28
230
  msgid "Page order successfully updated."
231
  msgstr "Side rækkefølge opdateret."
232
 
233
  # @ nestedpages
234
- #: app/Form/Handlers/SortHandler.php:30
235
  msgid "There was an error updating the page order."
236
  msgstr "Der skete en fejl under opdateringen af side rækkefølgen."
237
 
238
  # @ default
239
- #: app/Form/Handlers/SyncMenuHandler.php:25
240
  msgid "Menu sync enabled."
241
  msgstr "Menu synkronisering aktiveret."
242
 
243
  # @ default
244
- #: app/Form/Handlers/SyncMenuHandler.php:28
245
  msgid "Menu sync disabled."
246
  msgstr "Menu synkronisering deaktiveret."
247
 
248
  # @ nestedpages
249
- #: app/Form/Validation/Validation.php:139
250
  msgid "Please provide a valid date."
251
  msgstr "Vælg venligst en gyldig dato."
252
 
253
  # @ nestedpages
254
- #: app/Form/Validation/Validation.php:151
255
  msgid "Please provide a menu title."
256
  msgstr "Angiv venligst en menu titel."
257
 
258
  # @ nestedpages
259
- #: app/Form/Validation/Validation.php:154
260
  msgid "Please provide a valid URL."
261
  msgstr "Indtast venligst en gyldig URL."
262
 
263
  # @ nestedpages
264
- #: app/Form/Validation/Validation.php:165
265
  msgid "Please provide a "
266
  msgstr "Angiv venligst"
267
 
268
- #: app/Form/Validation/Validation.php:179
269
  msgid "A valid parent page was not provided."
270
  msgstr "En gyldig forældre side blev ikke angivet."
271
 
272
- #: app/Form/Validation/Validation.php:186
273
  msgid "Please provide at least one page title."
274
  msgstr "Angiv venligst én sidetitel."
275
 
276
- #: app/Form/Validation/Validation.php:194
277
  msgid "Page titles cannot be blank."
278
  msgstr "Sidetitler kan ikke være blanke."
279
 
280
  #: app/Views/forms/clone-form.php:9 app/Views/forms/clone-form.php:65
281
- #: app/Views/partials/row.php:93
282
  msgid "Clone"
283
  msgstr "Klon"
284
 
@@ -287,29 +291,28 @@ msgid "Number of Copies"
287
  msgstr "Antal kopier"
288
 
289
  # @ default
290
- #: app/Views/forms/clone-form.php:26 app/Views/forms/link-form.php:41
291
- #: app/Views/forms/new-child.php:35 app/Views/forms/quickedit-link.php:27
292
- #: app/Views/forms/quickedit-post.php:76
293
  msgid "Status"
294
  msgstr "Status"
295
 
296
  # @ default
297
- #: app/Views/forms/clone-form.php:29 app/Views/forms/link-form.php:44
298
- #: app/Views/forms/new-child.php:38 app/Views/forms/quickedit-link.php:30
299
- #: app/Views/forms/quickedit-post.php:79 app/Views/partials/tool-list.php:10
300
  msgid "Published"
301
  msgstr "Udgivet"
302
 
303
  # @ default
304
- #: app/Views/forms/clone-form.php:31 app/Views/forms/link-form.php:47
305
- #: app/Views/forms/quickedit-link.php:33 app/Views/forms/quickedit-post.php:82
306
  msgid "Pending Review"
307
  msgstr "Afventer godkendelse"
308
 
309
  # @ default
310
- #: app/Views/forms/clone-form.php:32 app/Views/forms/link-form.php:48
311
- #: app/Views/forms/new-child.php:40 app/Views/forms/quickedit-link.php:34
312
- #: app/Views/forms/quickedit-post.php:83 app/Views/partials/tool-list.php:14
313
  msgid "Draft"
314
  msgstr "Kladde"
315
 
@@ -321,8 +324,8 @@ msgstr "Forfatter"
321
 
322
  # @ default
323
  #: app/Views/forms/clone-form.php:62 app/Views/forms/empty-trash-modal.php:11
324
- #: app/Views/forms/new-child.php:90 app/Views/forms/quickedit-link.php:81
325
- #: app/Views/forms/quickedit-post.php:207
326
  msgid "Cancel"
327
  msgstr "Annullere"
328
 
@@ -330,52 +333,55 @@ msgstr "Annullere"
330
  msgid "Empty Trash"
331
  msgstr "Tøm papirkurv"
332
 
333
- # @ default
334
- #: app/Views/forms/link-form.php:31 app/Views/forms/quickedit-link.php:17
335
- #: app/Views/forms/quickedit-post.php:171
336
- msgid "Navigation Label"
337
- msgstr "Navigation label"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
 
339
  # @ nestedpages
340
  # @ default
341
- #: app/Views/forms/link-form.php:36 app/Views/forms/quickedit-link.php:22
342
  msgid "URL"
343
  msgstr "URL"
344
 
345
  # @ default
346
- #: app/Views/forms/link-form.php:45 app/Views/forms/quickedit-link.php:31
347
- #: app/Views/forms/quickedit-post.php:80
348
- msgid "Scheduled"
349
- msgstr "Planlagt"
350
 
351
- # @ nestedpages
352
- #: app/Views/forms/link-form.php:59 app/Views/forms/quickedit-link.php:54
353
- #: app/Views/forms/quickedit-post.php:187
354
- msgid "Hide in Nav Menu"
355
- msgstr "Skjul i Menuer"
356
 
357
- # @ nestedpages
358
- #: app/Views/forms/link-form.php:64 app/Views/forms/quickedit-link.php:60
359
- #: app/Views/forms/quickedit-post.php:126
360
- msgid "Hide in Nested Pages"
361
- msgstr "Skjul i denne oversigt"
362
 
363
  # @ default
364
- #: app/Views/forms/link-form.php:69 app/Views/forms/quickedit-link.php:66
365
  #: app/Views/forms/quickedit-post.php:193
366
  msgid "Open link in a new window/tab"
367
  msgstr "Åben link i nyt vindue/faneblad"
368
 
369
- # @ default
370
- #: app/Views/forms/link-form.php:80
371
- msgid "Close"
372
- msgstr "Luk"
373
-
374
- # @ nestedpages
375
- #: app/Views/forms/link-form.php:83
376
- msgid "Save Link"
377
- msgstr "Gem link"
378
-
379
  #: app/Views/forms/new-child.php:28
380
  msgid "+"
381
  msgstr "+"
@@ -400,17 +406,27 @@ msgid "Link"
400
  msgstr "Link"
401
 
402
  # @ default
403
- #: app/Views/forms/quickedit-link.php:44 app/Views/forms/quickedit-post.php:175
404
- msgid "Title Attribute"
405
- msgstr "Titel attribut"
406
 
407
  # @ default
408
  #: app/Views/forms/quickedit-link.php:48 app/Views/forms/quickedit-post.php:179
409
  msgid "CSS Classes"
410
  msgstr "CSS Klasser"
411
 
 
 
 
 
 
 
 
 
 
 
412
  # @ default
413
- #: app/Views/forms/quickedit-link.php:84 app/Views/forms/quickedit-post.php:210
414
  msgid "Update"
415
  msgstr "Opdater"
416
 
@@ -472,13 +488,22 @@ msgstr "Taxonomier"
472
  msgid "Sync Menu"
473
  msgstr "Synkronisere til Menuer"
474
 
 
 
 
 
475
  # @ nestedpages
476
- #: app/Views/partials/row.php:47
 
 
 
 
 
477
  msgid "currently editing"
478
  msgstr "redigere siden"
479
 
480
  # @ default
481
- #: app/Views/partials/row.php:51
482
  msgid "Edit"
483
  msgstr "Rediger"
484
 
@@ -516,6 +541,11 @@ msgstr "Stigende"
516
  msgid "Decending"
517
  msgstr "Faldende"
518
 
 
 
 
 
 
519
  #: app/Views/settings/settings-general.php:4
520
  msgid "Currently Enabled"
521
  msgstr "Aktiveret"
@@ -530,12 +560,12 @@ msgid "Nested Pages Version"
530
  msgstr "Plugin version"
531
 
532
  # @ nestedpages
533
- #: app/Views/settings/settings-general.php:12
534
  msgid "Menu Name"
535
  msgstr "Menunavn"
536
 
537
  # @ nestedpages
538
- #: app/Views/settings/settings-general.php:15
539
  msgid ""
540
  "Important: Once the menu name has changed, theme files should be updated to "
541
  "reference the new name."
@@ -543,27 +573,31 @@ msgstr ""
543
  "Vigtig: Når menunavnet ændret, skal dette ajourføres i temaet, så temaet "
544
  "bruger det nye navn."
545
 
546
- #: app/Views/settings/settings-general.php:19
547
  msgid "Display Options"
548
  msgstr "Visning"
549
 
550
- #: app/Views/settings/settings-general.php:23
551
  msgid "Enable Date Picker in Quick Edit"
552
  msgstr "Aktiver \"dato-vælger\" under \"Lynrediger\""
553
 
554
- #: app/Views/settings/settings-general.php:28
555
  msgid "Menu Sync"
556
  msgstr "Menu synkronisering"
557
 
558
- #: app/Views/settings/settings-general.php:32
559
  msgid "Hide Menu Sync Checkbox"
560
  msgstr "Skjul menu synkronisering afkrydsningsfeltet"
561
 
562
- #: app/Views/settings/settings-general.php:37
 
 
 
 
563
  msgid "Allow Page Sorting"
564
  msgstr "Tillad Side sortering"
565
 
566
- #: app/Views/settings/settings-general.php:47
567
  msgid "Admins always have sorting ability."
568
  msgstr "Admins har altid tilladelse til Side sortering"
569
 
@@ -630,6 +664,18 @@ msgstr "Generelt"
630
  msgid "Post Types"
631
  msgstr "Indlægstyper"
632
 
 
 
 
 
 
 
 
 
 
 
 
 
633
  # @ nestedpages
634
  #~ msgid "page moved to the Trash"
635
  #~ msgstr "side flyttet til papirkurven"
@@ -646,10 +692,6 @@ msgstr "Indlægstyper"
646
  #~ msgid "Adding child page under:"
647
  #~ msgstr "Tilføjer side under:"
648
 
649
- # @ nestedpages
650
- #~ msgid "All Pages"
651
- #~ msgstr "Alle sider"
652
-
653
  # @ nestedpages
654
  #~ msgid "Add New"
655
  #~ msgstr "Tilføj ny"
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Nested Pages v1.5.3\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-09-23 11:34+0200\n"
6
+ "PO-Revision-Date: 2015-09-23 11:37+0200\n"
7
+ "Last-Translator: ThomasDK81 <thomasdk81@gmail.com>\n"
8
+ "Language-Team: ThomasDK81 <thomasdk81@gmail.com>\n"
9
  "Language: da_DK\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
14
  "X-Generator: Poedit 1.8.4\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
17
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
18
  "X-Poedit-Basepath: ..\n"
19
  "X-Textdomain-Support: yes\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
 
22
+ #: app/Activation/Dependencies.php:106 app/Views/listing.php:29
23
  msgid "Expand All"
24
  msgstr "Udvid alle"
25
 
26
+ #: app/Activation/Dependencies.php:107
27
  msgid "Collapse All"
28
  msgstr "Skjul alle"
29
 
30
  # @ nestedpages
31
+ #: app/Activation/Dependencies.php:108 app/Views/partials/tool-list.php:18
32
  msgid "Show Hidden"
33
  msgstr "Vis skjulte"
34
 
35
  # @ nestedpages
36
+ #: app/Activation/Dependencies.php:109
37
  msgid "Hide Hidden"
38
  msgstr "Skjul skjulte"
39
 
40
  # @ nestedpages
41
  # @ default
42
+ #: app/Activation/Dependencies.php:110 app/Views/listing.php:16
43
+ #: app/Views/listing.php:17
44
  msgid "Add Link"
45
  msgstr "Tilføj link"
46
 
47
  # @ nestedpages
48
+ #: app/Activation/Dependencies.php:111
49
  msgid "Add Child Link"
50
  msgstr "Tilføj link under"
51
 
52
  # @ nestedpages
53
  # @ default
54
+ #: app/Activation/Dependencies.php:112
55
+ #: app/Entities/Post/PostUpdateRepository.php:69
56
  #: app/Views/forms/new-child.php:19 app/Views/forms/new-child.php:21
57
  #: app/Views/forms/quickedit-post.php:20 app/Views/partials/tool-list.php:64
58
  msgid "Title"
59
  msgstr "Titel"
60
 
61
  # @ default
62
+ #: app/Activation/Dependencies.php:113 app/Views/forms/quickedit-post.php:11
63
+ #: app/Views/partials/row-link.php:68 app/Views/partials/row.php:130
64
  msgid "Quick Edit"
65
  msgstr "Lynrediger"
66
 
67
+ #: app/Activation/Dependencies.php:114
68
  msgid "Page Title"
69
  msgstr "Sidetitel"
70
 
71
  # @ default
72
+ #: app/Activation/Dependencies.php:115 app/Views/partials/row.php:134
73
  msgid "View"
74
  msgstr "Vis"
75
 
76
  # @ nestedpages
77
+ #: app/Activation/Dependencies.php:116 app/Views/forms/new-child.php:7
78
+ #: app/Views/partials/row.php:94
79
  msgid "Add Child"
80
  msgstr "Tilføj underside"
81
 
82
+ #: app/Activation/Dependencies.php:117
83
  msgid "Add Child Page"
84
  msgstr "Tilføj undersider"
85
 
86
+ #: app/Activation/Dependencies.php:118
87
  msgid "Add Child Pages"
88
  msgstr "Tilføj undersider"
89
 
90
+ #: app/Activation/Dependencies.php:119 app/Views/forms/link-form.php:105
91
+ #: app/Views/forms/new-child.php:93
92
  msgid "Add"
93
  msgstr "Tilføj"
94
 
95
+ #: app/Activation/Dependencies.php:120
96
  msgid "Add Page"
97
  msgstr "Tilføj Side"
98
 
99
+ #: app/Activation/Dependencies.php:121
100
  msgid "Add Pages"
101
  msgstr "Tilføj Sider"
102
 
103
+ #: app/Activation/Dependencies.php:122 app/Views/listing.php:10
104
  #: app/Views/listing.php:11
105
  msgid "Add Multiple"
106
  msgstr "Tilføj flere"
107
 
108
+ #: app/Activation/Dependencies.php:123
109
  msgid ""
110
  "Are you sure you would like to empty the trash? This action is not "
111
  "reversable."
113
  "Er du sikker på, at du vil tømme papirkurven? Dette kan ikke fortrydes."
114
 
115
  # @ nestedpages
116
+ #: app/Activation/Dependencies.php:124 app/Views/partials/row-link.php:40
117
+ #: app/Views/partials/row.php:45
118
  msgid "Hidden"
119
  msgstr "Skjult"
120
 
124
  msgstr "Indstillinger"
125
 
126
  # @ nestedpages
127
+ #: app/Config/Settings.php:53 app/Views/settings/settings.php:2
128
  msgid "Nested Pages Settings"
129
  msgstr "Nested Pages Indstillinger"
130
 
131
  # @ nestedpages
132
+ #: app/Config/Settings.php:54
133
  msgid "Nested Pages"
134
  msgstr "Nested Pages"
135
 
136
  # @ default
137
+ #: app/Entities/AdminMenu/AdminSubmenu.php:75
138
  #: app/Views/partials/tool-list.php:33
139
  msgid "Default"
140
  msgstr "Standard"
141
 
142
  # @ nestedpages
143
+ #: app/Entities/Confirmation/LinkDeletedConfirmation.php:12
144
  msgid "Link successfully deleted."
145
  msgstr "Link slettet."
146
 
147
  # @ nestedpages
148
+ #: app/Entities/Confirmation/TrashConfirmation.php:16
149
  msgid "pages moved to the Trash"
150
  msgstr "sider flyttet til papirkurven"
151
 
152
+ #: app/Entities/Confirmation/TrashConfirmation.php:18
153
  msgid "moved to the Trash"
154
  msgstr "flyttet til Papirkurven"
155
 
156
  # @ default
157
+ #: app/Entities/Confirmation/TrashConfirmation.php:23
158
  msgid "Undo"
159
  msgstr "Fortryd"
160
 
161
  # @ nestedpages
162
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:14
163
  msgid "pages"
164
  msgstr "sider"
165
 
166
  # @ nestedpages
167
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:14
168
  msgid "page"
169
  msgstr "side"
170
 
171
  # @ nestedpages
172
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:15
173
  msgid "restored from trash"
174
  msgstr "gendannet fra papirkurven"
175
 
176
+ #: app/Entities/PostType/PostTypeRepository.php:189
 
 
 
 
 
177
  msgid "Nested View"
178
  msgstr "Hierarkisk visning"
179
 
180
+ #: app/Entities/PostType/PostTypeRepository.php:189
 
181
  msgid "Sort View"
182
  msgstr "Sorterings visning"
183
 
184
  # @ nestedpages
185
+ #: app/Entities/PostType/RegisterPostTypes.php:22
186
  msgid "Redirects"
187
  msgstr "Viderestillinger"
188
 
189
  # @ nestedpages
190
+ #: app/Entities/PostType/RegisterPostTypes.php:23
191
  msgid "Redirect"
192
  msgstr "Viderestilling"
193
 
194
  # @ nestedpages
195
+ #: app/Form/Listeners/BaseHandler.php:80
196
  msgid "Incorrect Form Field"
197
  msgstr "Ukorrekt formular felt"
198
 
199
  # @ nestedpages
200
+ #: app/Form/Listeners/BaseHandler.php:109
201
  msgid "There was an error updating the page."
202
  msgstr "Der skete en fejl under opdateringen af siden."
203
 
204
+ #: app/Form/Listeners/ClonePost.php:36
205
  msgid "Post Not Found"
206
  msgstr "Indlæg ikke fundet"
207
 
208
+ #: app/Form/Listeners/EmptyTrash.php:19
209
  msgid "Trash successfully emptied."
210
  msgstr "Papirkurven blev tømt."
211
 
212
+ #: app/Form/Listeners/NewMenuItem.php:27
213
+ msgid "Custom Links must have a label"
214
+ msgstr "Brugerdefineret links skal have en label"
215
+
216
  # @ nestedpages
217
+ #: app/Form/Listeners/NewMenuItem.php:28
218
+ msgid "Please provide a valid URL"
219
+ msgstr "Indtast venligst en gyldig URL"
220
+
221
+ # @ nestedpages
222
+ #: app/Form/Listeners/NewMenuItem.php:47
223
+ #: app/Form/Listeners/QuickEditLink.php:30
224
  msgid "Link successfully updated"
225
  msgstr "Link opdateret."
226
 
227
  # @ default
228
+ #: app/Form/Listeners/QuickEdit.php:32
229
  msgid "Post successfully updated"
230
  msgstr "Indlægget er opdateret"
231
 
232
  # @ nestedpages
233
+ #: app/Form/Listeners/Sort.php:29
234
  msgid "Page order successfully updated."
235
  msgstr "Side rækkefølge opdateret."
236
 
237
  # @ nestedpages
238
+ #: app/Form/Listeners/Sort.php:31
239
  msgid "There was an error updating the page order."
240
  msgstr "Der skete en fejl under opdateringen af side rækkefølgen."
241
 
242
  # @ default
243
+ #: app/Form/Listeners/SyncMenu.php:27
244
  msgid "Menu sync enabled."
245
  msgstr "Menu synkronisering aktiveret."
246
 
247
  # @ default
248
+ #: app/Form/Listeners/SyncMenu.php:30
249
  msgid "Menu sync disabled."
250
  msgstr "Menu synkronisering deaktiveret."
251
 
252
  # @ nestedpages
253
+ #: app/Form/Validation/Validation.php:134
254
  msgid "Please provide a valid date."
255
  msgstr "Vælg venligst en gyldig dato."
256
 
257
  # @ nestedpages
258
+ #: app/Form/Validation/Validation.php:145
259
  msgid "Please provide a menu title."
260
  msgstr "Angiv venligst en menu titel."
261
 
262
  # @ nestedpages
263
+ #: app/Form/Validation/Validation.php:148
264
  msgid "Please provide a valid URL."
265
  msgstr "Indtast venligst en gyldig URL."
266
 
267
  # @ nestedpages
268
+ #: app/Form/Validation/Validation.php:158
269
  msgid "Please provide a "
270
  msgstr "Angiv venligst"
271
 
272
+ #: app/Form/Validation/Validation.php:171
273
  msgid "A valid parent page was not provided."
274
  msgstr "En gyldig forældre side blev ikke angivet."
275
 
276
+ #: app/Form/Validation/Validation.php:178
277
  msgid "Please provide at least one page title."
278
  msgstr "Angiv venligst én sidetitel."
279
 
280
+ #: app/Form/Validation/Validation.php:186
281
  msgid "Page titles cannot be blank."
282
  msgstr "Sidetitler kan ikke være blanke."
283
 
284
  #: app/Views/forms/clone-form.php:9 app/Views/forms/clone-form.php:65
285
+ #: app/Views/partials/row.php:99
286
  msgid "Clone"
287
  msgstr "Klon"
288
 
291
  msgstr "Antal kopier"
292
 
293
  # @ default
294
+ #: app/Views/forms/clone-form.php:26 app/Views/forms/new-child.php:35
295
+ #: app/Views/forms/quickedit-link.php:27 app/Views/forms/quickedit-post.php:76
 
296
  msgid "Status"
297
  msgstr "Status"
298
 
299
  # @ default
300
+ #: app/Views/forms/clone-form.php:29 app/Views/forms/new-child.php:38
301
+ #: app/Views/forms/quickedit-link.php:30 app/Views/forms/quickedit-post.php:79
302
+ #: app/Views/partials/tool-list.php:10
303
  msgid "Published"
304
  msgstr "Udgivet"
305
 
306
  # @ default
307
+ #: app/Views/forms/clone-form.php:31 app/Views/forms/quickedit-link.php:33
308
+ #: app/Views/forms/quickedit-post.php:82
309
  msgid "Pending Review"
310
  msgstr "Afventer godkendelse"
311
 
312
  # @ default
313
+ #: app/Views/forms/clone-form.php:32 app/Views/forms/new-child.php:40
314
+ #: app/Views/forms/quickedit-link.php:34 app/Views/forms/quickedit-post.php:83
315
+ #: app/Views/partials/tool-list.php:14
316
  msgid "Draft"
317
  msgstr "Kladde"
318
 
324
 
325
  # @ default
326
  #: app/Views/forms/clone-form.php:62 app/Views/forms/empty-trash-modal.php:11
327
+ #: app/Views/forms/link-form.php:101 app/Views/forms/new-child.php:90
328
+ #: app/Views/forms/quickedit-link.php:84 app/Views/forms/quickedit-post.php:207
329
  msgid "Cancel"
330
  msgstr "Annullere"
331
 
333
  msgid "Empty Trash"
334
  msgstr "Tøm papirkurv"
335
 
336
+ #: app/Views/forms/link-form.php:18
337
+ msgid "Custom Link"
338
+ msgstr "Brugerdefineret links"
339
+
340
+ #: app/Views/forms/link-form.php:27 app/Views/forms/link-form.php:44
341
+ msgid "Search"
342
+ msgstr "Søg"
343
+
344
+ #: app/Views/forms/link-form.php:27 app/Views/forms/link-form.php:44
345
+ msgid "No Results"
346
+ msgstr "Ingen resultater"
347
+
348
+ #: app/Views/forms/link-form.php:58
349
+ msgid "Select an item"
350
+ msgstr "Vælg et element"
351
+
352
+ #: app/Views/forms/link-form.php:63
353
+ msgid "Original"
354
+ msgstr "Original"
355
 
356
  # @ nestedpages
357
  # @ default
358
+ #: app/Views/forms/link-form.php:68 app/Views/forms/quickedit-link.php:22
359
  msgid "URL"
360
  msgstr "URL"
361
 
362
  # @ default
363
+ #: app/Views/forms/link-form.php:72 app/Views/forms/quickedit-link.php:17
364
+ #: app/Views/forms/quickedit-post.php:171
365
+ msgid "Navigation Label"
366
+ msgstr "Navigation label"
367
 
368
+ # @ default
369
+ #: app/Views/forms/link-form.php:76 app/Views/forms/quickedit-link.php:44
370
+ #: app/Views/forms/quickedit-post.php:175
371
+ msgid "Title Attribute"
372
+ msgstr "Titel attribut"
373
 
374
+ # @ default
375
+ #: app/Views/forms/link-form.php:80
376
+ msgid "CSS Classes (optional)"
377
+ msgstr "CSS Klasser (Valgfrit)"
 
378
 
379
  # @ default
380
+ #: app/Views/forms/link-form.php:86 app/Views/forms/quickedit-link.php:66
381
  #: app/Views/forms/quickedit-post.php:193
382
  msgid "Open link in a new window/tab"
383
  msgstr "Åben link i nyt vindue/faneblad"
384
 
 
 
 
 
 
 
 
 
 
 
385
  #: app/Views/forms/new-child.php:28
386
  msgid "+"
387
  msgstr "+"
406
  msgstr "Link"
407
 
408
  # @ default
409
+ #: app/Views/forms/quickedit-link.php:31 app/Views/forms/quickedit-post.php:80
410
+ msgid "Scheduled"
411
+ msgstr "Planlagt"
412
 
413
  # @ default
414
  #: app/Views/forms/quickedit-link.php:48 app/Views/forms/quickedit-post.php:179
415
  msgid "CSS Classes"
416
  msgstr "CSS Klasser"
417
 
418
+ # @ nestedpages
419
+ #: app/Views/forms/quickedit-link.php:54 app/Views/forms/quickedit-post.php:187
420
+ msgid "Hide in Nav Menu"
421
+ msgstr "Skjul i Menuer"
422
+
423
+ # @ nestedpages
424
+ #: app/Views/forms/quickedit-link.php:60 app/Views/forms/quickedit-post.php:126
425
+ msgid "Hide in Nested Pages"
426
+ msgstr "Skjul i denne oversigt"
427
+
428
  # @ default
429
+ #: app/Views/forms/quickedit-link.php:87 app/Views/forms/quickedit-post.php:210
430
  msgid "Update"
431
  msgstr "Opdater"
432
 
488
  msgid "Sync Menu"
489
  msgstr "Synkronisere til Menuer"
490
 
491
+ #: app/Views/partials/row.php:23
492
+ msgid "Front Page"
493
+ msgstr "Forside"
494
+
495
  # @ nestedpages
496
+ #: app/Views/partials/row.php:24
497
+ msgid "Posts Page"
498
+ msgstr "Indlægs side"
499
+
500
+ # @ nestedpages
501
+ #: app/Views/partials/row.php:53
502
  msgid "currently editing"
503
  msgstr "redigere siden"
504
 
505
  # @ default
506
+ #: app/Views/partials/row.php:57
507
  msgid "Edit"
508
  msgstr "Rediger"
509
 
541
  msgid "Decending"
542
  msgstr "Faldende"
543
 
544
+ # @ nestedpages
545
+ #: app/Views/partials/tool-list.php:110
546
+ msgid "All "
547
+ msgstr "Alle "
548
+
549
  #: app/Views/settings/settings-general.php:4
550
  msgid "Currently Enabled"
551
  msgstr "Aktiveret"
560
  msgstr "Plugin version"
561
 
562
  # @ nestedpages
563
+ #: app/Views/settings/settings-general.php:13
564
  msgid "Menu Name"
565
  msgstr "Menunavn"
566
 
567
  # @ nestedpages
568
+ #: app/Views/settings/settings-general.php:16
569
  msgid ""
570
  "Important: Once the menu name has changed, theme files should be updated to "
571
  "reference the new name."
573
  "Vigtig: Når menunavnet ændret, skal dette ajourføres i temaet, så temaet "
574
  "bruger det nye navn."
575
 
576
+ #: app/Views/settings/settings-general.php:21
577
  msgid "Display Options"
578
  msgstr "Visning"
579
 
580
+ #: app/Views/settings/settings-general.php:25
581
  msgid "Enable Date Picker in Quick Edit"
582
  msgstr "Aktiver \"dato-vælger\" under \"Lynrediger\""
583
 
584
+ #: app/Views/settings/settings-general.php:30
585
  msgid "Menu Sync"
586
  msgstr "Menu synkronisering"
587
 
588
+ #: app/Views/settings/settings-general.php:36
589
  msgid "Hide Menu Sync Checkbox"
590
  msgstr "Skjul menu synkronisering afkrydsningsfeltet"
591
 
592
+ #: app/Views/settings/settings-general.php:43
593
+ msgid "Disable Menu Sync Completely"
594
+ msgstr "Deaktiver Menu synkronisering fuldstændig"
595
+
596
+ #: app/Views/settings/settings-general.php:49
597
  msgid "Allow Page Sorting"
598
  msgstr "Tillad Side sortering"
599
 
600
+ #: app/Views/settings/settings-general.php:59
601
  msgid "Admins always have sorting ability."
602
  msgstr "Admins har altid tilladelse til Side sortering"
603
 
664
  msgid "Post Types"
665
  msgstr "Indlægstyper"
666
 
667
+ # @ nestedpages
668
+ #~ msgid "Label"
669
+ #~ msgstr "Label"
670
+
671
+ # @ default
672
+ #~ msgid "Close"
673
+ #~ msgstr "Luk"
674
+
675
+ # @ nestedpages
676
+ #~ msgid "Save Link"
677
+ #~ msgstr "Gem link"
678
+
679
  # @ nestedpages
680
  #~ msgid "page moved to the Trash"
681
  #~ msgstr "side flyttet til papirkurven"
692
  #~ msgid "Adding child page under:"
693
  #~ msgstr "Tilføjer side under:"
694
 
 
 
 
 
695
  # @ nestedpages
696
  #~ msgid "Add New"
697
  #~ msgstr "Tilføj ny"
languages/nestedpages-es_ES.mo ADDED
Binary file
languages/nestedpages-es_ES.po ADDED
@@ -0,0 +1,594 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Nested Pages\n"
4
+ "POT-Creation-Date: 2015-08-30 10:36-0500\n"
5
+ "PO-Revision-Date: 2015-10-06 10:27+0100\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: \n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Generator: Poedit 1.5.7\n"
12
+ "X-Poedit-Basepath: ..\n"
13
+ "X-Poedit-SourceCharset: UTF-8\n"
14
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
15
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
16
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+
19
+ #: app/Activation/Dependencies.php:106 app/Views/listing.php:29
20
+ msgid "Expand All"
21
+ msgstr "Expandir todo"
22
+
23
+ #: app/Activation/Dependencies.php:107
24
+ msgid "Collapse All"
25
+ msgstr "Colapsar todo"
26
+
27
+ #: app/Activation/Dependencies.php:108 app/Views/partials/tool-list.php:18
28
+ msgid "Show Hidden"
29
+ msgstr "Mostrar ocultos"
30
+
31
+ #: app/Activation/Dependencies.php:109
32
+ msgid "Hide Hidden"
33
+ msgstr "Ocultar ocultos"
34
+
35
+ #: app/Activation/Dependencies.php:110 app/Views/listing.php:16
36
+ #: app/Views/listing.php:17
37
+ msgid "Add Link"
38
+ msgstr "Añadir enlace"
39
+
40
+ #: app/Activation/Dependencies.php:111
41
+ msgid "Add Child Link"
42
+ msgstr "Añadir enlace hijo"
43
+
44
+ #: app/Activation/Dependencies.php:112
45
+ #: app/Entities/Post/PostUpdateRepository.php:69
46
+ #: app/Views/forms/new-child.php:19 app/Views/forms/new-child.php:21
47
+ #: app/Views/forms/quickedit-post.php:20 app/Views/partials/tool-list.php:64
48
+ msgid "Title"
49
+ msgstr "Título"
50
+
51
+ #: app/Activation/Dependencies.php:113 app/Views/forms/quickedit-post.php:11
52
+ #: app/Views/partials/row-link.php:68 app/Views/partials/row.php:130
53
+ msgid "Quick Edit"
54
+ msgstr "Edición rápida"
55
+
56
+ #: app/Activation/Dependencies.php:114
57
+ msgid "Page Title"
58
+ msgstr "Título de la página"
59
+
60
+ #: app/Activation/Dependencies.php:115 app/Views/partials/row.php:134
61
+ msgid "View"
62
+ msgstr "Ver"
63
+
64
+ #: app/Activation/Dependencies.php:116 app/Views/forms/new-child.php:7
65
+ #: app/Views/partials/row.php:94
66
+ msgid "Add Child"
67
+ msgstr "Añadir hijo"
68
+
69
+ #: app/Activation/Dependencies.php:117
70
+ msgid "Add Child Page"
71
+ msgstr "Añadir página hijo"
72
+
73
+ #: app/Activation/Dependencies.php:118
74
+ msgid "Add Child Pages"
75
+ msgstr "Añadir páginas hijo"
76
+
77
+ #: app/Activation/Dependencies.php:119 app/Views/forms/link-form.php:105
78
+ #: app/Views/forms/new-child.php:93
79
+ msgid "Add"
80
+ msgstr "Añadir"
81
+
82
+ #: app/Activation/Dependencies.php:120
83
+ msgid "Add Page"
84
+ msgstr "Añadir página"
85
+
86
+ #: app/Activation/Dependencies.php:121
87
+ msgid "Add Pages"
88
+ msgstr "Añadir páginas"
89
+
90
+ #: app/Activation/Dependencies.php:122 app/Views/listing.php:10
91
+ #: app/Views/listing.php:11
92
+ msgid "Add Multiple"
93
+ msgstr "Añadir múltiple"
94
+
95
+ #: app/Activation/Dependencies.php:123
96
+ msgid ""
97
+ "Are you sure you would like to empty the trash? This action is not "
98
+ "reversable."
99
+ msgstr "¿Estás seguro que quieres vaciar la papelera? No se puede deshacer."
100
+
101
+ #: app/Activation/Dependencies.php:124 app/Views/partials/row-link.php:40
102
+ #: app/Views/partials/row.php:45
103
+ msgid "Hidden"
104
+ msgstr "Oculto"
105
+
106
+ #: app/Bootstrap.php:60
107
+ msgid "Settings"
108
+ msgstr "Parámetros"
109
+
110
+ #: app/Config/Settings.php:53 app/Views/settings/settings.php:2
111
+ msgid "Nested Pages Settings"
112
+ msgstr "Parámetros de páginas anidadas"
113
+
114
+ #: app/Config/Settings.php:54
115
+ msgid "Nested Pages"
116
+ msgstr "Páginas anidadas"
117
+
118
+ #: app/Entities/AdminMenu/AdminSubmenu.php:75
119
+ #: app/Views/partials/tool-list.php:33
120
+ msgid "Default"
121
+ msgstr "Por defecto"
122
+
123
+ #: app/Entities/Confirmation/LinkDeletedConfirmation.php:12
124
+ msgid "Link successfully deleted."
125
+ msgstr "Enlace eliminado correctamente."
126
+
127
+ #: app/Entities/Confirmation/TrashConfirmation.php:16
128
+ msgid "pages moved to the Trash"
129
+ msgstr "páginas movidas a la Papelera"
130
+
131
+ #: app/Entities/Confirmation/TrashConfirmation.php:18
132
+ msgid "moved to the Trash"
133
+ msgstr "movido a la Papelera"
134
+
135
+ #: app/Entities/Confirmation/TrashConfirmation.php:23
136
+ msgid "Undo"
137
+ msgstr "Deshacer"
138
+
139
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:14
140
+ msgid "pages"
141
+ msgstr "páginas"
142
+
143
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:14
144
+ msgid "page"
145
+ msgstr "página"
146
+
147
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:15
148
+ msgid "restored from trash"
149
+ msgstr "restaurado de la papelera"
150
+
151
+ #: app/Entities/PostType/PostTypeRepository.php:189
152
+ msgid "Nested View"
153
+ msgstr "Vista anidada"
154
+
155
+ #: app/Entities/PostType/PostTypeRepository.php:189
156
+ msgid "Sort View"
157
+ msgstr "Ordenar vista"
158
+
159
+ #: app/Entities/PostType/RegisterPostTypes.php:22
160
+ msgid "Redirects"
161
+ msgstr "Redirige"
162
+
163
+ #: app/Entities/PostType/RegisterPostTypes.php:23
164
+ msgid "Redirect"
165
+ msgstr "Redirigir"
166
+
167
+ #: app/Form/Listeners/BaseHandler.php:80
168
+ msgid "Incorrect Form Field"
169
+ msgstr "Campo del formulario incorrecto"
170
+
171
+ #: app/Form/Listeners/BaseHandler.php:109
172
+ msgid "There was an error updating the page."
173
+ msgstr "Ha habido un error actualizando la página."
174
+
175
+ #: app/Form/Listeners/ClonePost.php:36
176
+ msgid "Post Not Found"
177
+ msgstr "Entrada no encontrada"
178
+
179
+ #: app/Form/Listeners/EmptyTrash.php:19
180
+ msgid "Trash successfully emptied."
181
+ msgstr "Papelera vaciada correctamente."
182
+
183
+ #: app/Form/Listeners/NewMenuItem.php:27
184
+ msgid "Custom Links must have a label"
185
+ msgstr "Los enlaces personalizados deben tener una etiqueta"
186
+
187
+ #: app/Form/Listeners/NewMenuItem.php:28
188
+ msgid "Please provide a valid URL"
189
+ msgstr "Por favor, escribe una URL válida"
190
+
191
+ #: app/Form/Listeners/NewMenuItem.php:47
192
+ #: app/Form/Listeners/QuickEditLink.php:30
193
+ msgid "Link successfully updated"
194
+ msgstr "Enlace actualizado correctamente"
195
+
196
+ #: app/Form/Listeners/QuickEdit.php:32
197
+ msgid "Post successfully updated"
198
+ msgstr "Entrada actualizada correctamente"
199
+
200
+ #: app/Form/Listeners/Sort.php:29
201
+ msgid "Page order successfully updated."
202
+ msgstr "Orden de página actualizado correctamente."
203
+
204
+ #: app/Form/Listeners/Sort.php:31
205
+ msgid "There was an error updating the page order."
206
+ msgstr "Hubo un error actualizando el orden de la página"
207
+
208
+ #: app/Form/Listeners/SyncMenu.php:27
209
+ msgid "Menu sync enabled."
210
+ msgstr "Sincronización de menú habilitada."
211
+
212
+ #: app/Form/Listeners/SyncMenu.php:30
213
+ msgid "Menu sync disabled."
214
+ msgstr "Sincronización de menú deshabilitada."
215
+
216
+ #: app/Form/Validation/Validation.php:134
217
+ msgid "Please provide a valid date."
218
+ msgstr "Por favor, escribe una fecha válida."
219
+
220
+ #: app/Form/Validation/Validation.php:145
221
+ msgid "Please provide a menu title."
222
+ msgstr "Por favor, escribe un título para el menú."
223
+
224
+ #: app/Form/Validation/Validation.php:148
225
+ msgid "Please provide a valid URL."
226
+ msgstr "Por favor, escribe una URL válida."
227
+
228
+ #: app/Form/Validation/Validation.php:158
229
+ msgid "Please provide a "
230
+ msgstr "Por favor, escribe"
231
+
232
+ #: app/Form/Validation/Validation.php:171
233
+ msgid "A valid parent page was not provided."
234
+ msgstr "No se proporcionó una página padre válida."
235
+
236
+ #: app/Form/Validation/Validation.php:178
237
+ msgid "Please provide at least one page title."
238
+ msgstr "Por favor, escribe al menos un título de página."
239
+
240
+ #: app/Form/Validation/Validation.php:186
241
+ msgid "Page titles cannot be blank."
242
+ msgstr "Los títulos de página no pueden estar vacíos."
243
+
244
+ #: app/Views/forms/clone-form.php:9 app/Views/forms/clone-form.php:65
245
+ #: app/Views/partials/row.php:99
246
+ msgid "Clone"
247
+ msgstr "Clonar"
248
+
249
+ #: app/Views/forms/clone-form.php:14
250
+ msgid "Number of Copies"
251
+ msgstr "Número de copias"
252
+
253
+ #: app/Views/forms/clone-form.php:26 app/Views/forms/new-child.php:35
254
+ #: app/Views/forms/quickedit-link.php:27 app/Views/forms/quickedit-post.php:76
255
+ msgid "Status"
256
+ msgstr "Estado"
257
+
258
+ #: app/Views/forms/clone-form.php:29 app/Views/forms/new-child.php:38
259
+ #: app/Views/forms/quickedit-link.php:30 app/Views/forms/quickedit-post.php:79
260
+ #: app/Views/partials/tool-list.php:10
261
+ msgid "Published"
262
+ msgstr "Publicado"
263
+
264
+ #: app/Views/forms/clone-form.php:31 app/Views/forms/quickedit-link.php:33
265
+ #: app/Views/forms/quickedit-post.php:82
266
+ msgid "Pending Review"
267
+ msgstr "Pendiente de revisión"
268
+
269
+ #: app/Views/forms/clone-form.php:32 app/Views/forms/new-child.php:40
270
+ #: app/Views/forms/quickedit-link.php:34 app/Views/forms/quickedit-post.php:83
271
+ #: app/Views/partials/tool-list.php:14
272
+ msgid "Draft"
273
+ msgstr "Borrador"
274
+
275
+ #: app/Views/forms/clone-form.php:50 app/Views/forms/new-child.php:61
276
+ #: app/Views/forms/quickedit-post.php:67
277
+ msgid "Author"
278
+ msgstr "Autor"
279
+
280
+ #: app/Views/forms/clone-form.php:62 app/Views/forms/empty-trash-modal.php:11
281
+ #: app/Views/forms/link-form.php:101 app/Views/forms/new-child.php:90
282
+ #: app/Views/forms/quickedit-link.php:84
283
+ #: app/Views/forms/quickedit-post.php:207
284
+ msgid "Cancel"
285
+ msgstr "Cancelar"
286
+
287
+ #: app/Views/forms/empty-trash-modal.php:12
288
+ msgid "Empty Trash"
289
+ msgstr "Vaciar papelera"
290
+
291
+ #: app/Views/forms/link-form.php:18
292
+ msgid "Custom Link"
293
+ msgstr "Enlace personalizado"
294
+
295
+ #: app/Views/forms/link-form.php:27 app/Views/forms/link-form.php:44
296
+ msgid "Search"
297
+ msgstr "Buscar"
298
+
299
+ #: app/Views/forms/link-form.php:27 app/Views/forms/link-form.php:44
300
+ msgid "No Results"
301
+ msgstr "Sin resultados"
302
+
303
+ #: app/Views/forms/link-form.php:58
304
+ msgid "Select an item"
305
+ msgstr "Selecciona un elemento"
306
+
307
+ #: app/Views/forms/link-form.php:63
308
+ msgid "Original"
309
+ msgstr "Original"
310
+
311
+ #: app/Views/forms/link-form.php:68 app/Views/forms/quickedit-link.php:22
312
+ msgid "URL"
313
+ msgstr "URL"
314
+
315
+ #: app/Views/forms/link-form.php:72 app/Views/forms/quickedit-link.php:17
316
+ #: app/Views/forms/quickedit-post.php:171
317
+ msgid "Navigation Label"
318
+ msgstr "Etiqueta de navegación"
319
+
320
+ #: app/Views/forms/link-form.php:76 app/Views/forms/quickedit-link.php:44
321
+ #: app/Views/forms/quickedit-post.php:175
322
+ msgid "Title Attribute"
323
+ msgstr "Atributo del título"
324
+
325
+ #: app/Views/forms/link-form.php:80
326
+ msgid "CSS Classes (optional)"
327
+ msgstr "Clases CSS (opcional)"
328
+
329
+ #: app/Views/forms/link-form.php:86 app/Views/forms/quickedit-link.php:66
330
+ #: app/Views/forms/quickedit-post.php:193
331
+ msgid "Open link in a new window/tab"
332
+ msgstr "Abrir enlace en una nueva ventana/pestaña"
333
+
334
+ #: app/Views/forms/new-child.php:28
335
+ msgid "+"
336
+ msgstr "+"
337
+
338
+ #: app/Views/forms/new-child.php:71 app/Views/forms/quickedit-post.php:93
339
+ msgid "Template"
340
+ msgstr "Plantilla"
341
+
342
+ #: app/Views/forms/new-child.php:73 app/Views/forms/quickedit-post.php:95
343
+ msgid "Default Template"
344
+ msgstr "Plantilla por defecto"
345
+
346
+ #: app/Views/forms/new-child.php:96
347
+ msgid "Add & Edit"
348
+ msgstr "Añadir y editar"
349
+
350
+ #: app/Views/forms/quickedit-link.php:8
351
+ msgid "Link"
352
+ msgstr "Enlace"
353
+
354
+ #: app/Views/forms/quickedit-link.php:31 app/Views/forms/quickedit-post.php:80
355
+ msgid "Scheduled"
356
+ msgstr "Programado"
357
+
358
+ #: app/Views/forms/quickedit-link.php:48
359
+ #: app/Views/forms/quickedit-post.php:179
360
+ msgid "CSS Classes"
361
+ msgstr "Clases CSS"
362
+
363
+ #: app/Views/forms/quickedit-link.php:54
364
+ #: app/Views/forms/quickedit-post.php:187
365
+ msgid "Hide in Nav Menu"
366
+ msgstr "Ocultar en el menú de navegación"
367
+
368
+ #: app/Views/forms/quickedit-link.php:60
369
+ #: app/Views/forms/quickedit-post.php:126
370
+ msgid "Hide in Nested Pages"
371
+ msgstr "Ocultar en páginas anidadas"
372
+
373
+ #: app/Views/forms/quickedit-link.php:87
374
+ #: app/Views/forms/quickedit-post.php:210
375
+ msgid "Update"
376
+ msgstr "Actualizar"
377
+
378
+ #: app/Views/forms/quickedit-post.php:24
379
+ msgid "Slug"
380
+ msgstr "Slug"
381
+
382
+ #: app/Views/forms/quickedit-post.php:30 app/Views/forms/quickedit-post.php:45
383
+ #: app/Views/partials/tool-list.php:63
384
+ msgid "Date"
385
+ msgstr "Fecha"
386
+
387
+ #: app/Views/forms/quickedit-post.php:33
388
+ msgid "@"
389
+ msgstr "@"
390
+
391
+ #: app/Views/forms/quickedit-post.php:36
392
+ msgid "am"
393
+ msgstr "a.m."
394
+
395
+ #: app/Views/forms/quickedit-post.php:37
396
+ msgid "pm"
397
+ msgstr "p.m."
398
+
399
+ #: app/Views/forms/quickedit-post.php:103
400
+ msgid "Password"
401
+ msgstr "Contraseña"
402
+
403
+ #: app/Views/forms/quickedit-post.php:106
404
+ msgid "&ndash;OR&ndash;"
405
+ msgstr "&ndash;O&ndash;"
406
+
407
+ #: app/Views/forms/quickedit-post.php:109
408
+ msgid "Private"
409
+ msgstr "Privado"
410
+
411
+ #: app/Views/forms/quickedit-post.php:118
412
+ msgid "Allow Comments"
413
+ msgstr "Permitir comentarios"
414
+
415
+ #: app/Views/forms/quickedit-post.php:135
416
+ msgid "Menu Options"
417
+ msgstr "Opciones de menú"
418
+
419
+ #: app/Views/forms/quickedit-post.php:139
420
+ msgid "Taxonomies"
421
+ msgstr "Taxonomías"
422
+
423
+ #: app/Views/listing.php:35
424
+ msgid "Sync Menu"
425
+ msgstr "Menú de sincronización"
426
+
427
+ #: app/Views/partials/row.php:23
428
+ msgid "Front Page"
429
+ msgstr "Página principal"
430
+
431
+ #: app/Views/partials/row.php:24
432
+ msgid "Posts Page"
433
+ msgstr "Página de entradas"
434
+
435
+ #: app/Views/partials/row.php:53
436
+ msgid "currently editing"
437
+ msgstr "editando en este momento"
438
+
439
+ #: app/Views/partials/row.php:57
440
+ msgid "Edit"
441
+ msgstr "Editar"
442
+
443
+ #: app/Views/partials/tool-list.php:6
444
+ msgid "All"
445
+ msgstr "Todo"
446
+
447
+ #: app/Views/partials/tool-list.php:24
448
+ msgid "Trash"
449
+ msgstr "Papelera"
450
+
451
+ #: app/Views/partials/tool-list.php:25
452
+ msgid "Empty"
453
+ msgstr "Vaciar"
454
+
455
+ #: app/Views/partials/tool-list.php:47
456
+ msgid "All Authors"
457
+ msgstr "Todos los autores"
458
+
459
+ #: app/Views/partials/tool-list.php:62
460
+ msgid "Menu Order"
461
+ msgstr "Orden del menú"
462
+
463
+ #: app/Views/partials/tool-list.php:66
464
+ msgid "Order By"
465
+ msgstr "Ordenado por"
466
+
467
+ #: app/Views/partials/tool-list.php:80
468
+ msgid "Ascending"
469
+ msgstr "Ascendente"
470
+
471
+ #: app/Views/partials/tool-list.php:81
472
+ msgid "Decending"
473
+ msgstr "Descendente"
474
+
475
+ #: app/Views/partials/tool-list.php:110
476
+ msgid "All "
477
+ msgstr "Todo"
478
+
479
+ #: app/Views/settings/settings-general.php:4
480
+ msgid "Currently Enabled"
481
+ msgstr "Actualmente habilitado"
482
+
483
+ #: app/Views/settings/settings-general.php:4
484
+ msgid "Currently Disabled"
485
+ msgstr "Actualmente deshabilitado"
486
+
487
+ #: app/Views/settings/settings-general.php:8
488
+ msgid "Nested Pages Version"
489
+ msgstr "Versión de Nested Pages"
490
+
491
+ #: app/Views/settings/settings-general.php:13
492
+ msgid "Menu Name"
493
+ msgstr "Nombre del menú"
494
+
495
+ #: app/Views/settings/settings-general.php:16
496
+ msgid ""
497
+ "Important: Once the menu name has changed, theme files should be updated to "
498
+ "reference the new name."
499
+ msgstr ""
500
+ "Importante: Una vez que el nombre de menú ha cambiado, los ficheros del tema "
501
+ "deberían ser actualizados para referenciar al nuevo nombre."
502
+
503
+ #: app/Views/settings/settings-general.php:21
504
+ msgid "Display Options"
505
+ msgstr "Opciones de visualización"
506
+
507
+ #: app/Views/settings/settings-general.php:25
508
+ msgid "Enable Date Picker in Quick Edit"
509
+ msgstr "Permitir el selector de fecha en Edición rápida"
510
+
511
+ #: app/Views/settings/settings-general.php:30
512
+ msgid "Menu Sync"
513
+ msgstr "Menú de sincronización"
514
+
515
+ #: app/Views/settings/settings-general.php:36
516
+ msgid "Hide Menu Sync Checkbox"
517
+ msgstr "Ocultar el checkbox del menú de sincronización"
518
+
519
+ #: app/Views/settings/settings-general.php:43
520
+ msgid "Disable Menu Sync Completely"
521
+ msgstr "Deshabilitar el menú de sincronización completamente"
522
+
523
+ #: app/Views/settings/settings-general.php:49
524
+ msgid "Allow Page Sorting"
525
+ msgstr "Permitir la ordenación de páginas"
526
+
527
+ #: app/Views/settings/settings-general.php:59
528
+ msgid "Admins always have sorting ability."
529
+ msgstr "Los administradores siempre tienen la opción de ordenación."
530
+
531
+ #: app/Views/settings/settings-posttypes.php:7
532
+ msgid "Enable Nested Pages for:"
533
+ msgstr "Habilitar Nested Pages para:"
534
+
535
+ #: app/Views/settings/settings-posttypes.php:14
536
+ msgid "Post Type"
537
+ msgstr "Tipo de entrada"
538
+
539
+ #: app/Views/settings/settings-posttypes.php:15
540
+ msgid "Hierarchical"
541
+ msgstr "Jerárquico"
542
+
543
+ #: app/Views/settings/settings-posttypes.php:16
544
+ msgid "Enabled"
545
+ msgstr "Habilitado"
546
+
547
+ #: app/Views/settings/settings-posttypes.php:17
548
+ msgid "Replace Default Menu"
549
+ msgstr "Reemplazar menú por defecto"
550
+
551
+ #: app/Views/settings/settings-posttypes.php:18
552
+ msgid "Hide Default Link"
553
+ msgstr "Ocultar el enlace por defecto"
554
+
555
+ #: app/Views/settings/settings-posttypes.php:19
556
+ msgid "Disable Nesting"
557
+ msgstr "Desactivar anidado"
558
+
559
+ #: app/Views/settings/settings-posttypes.php:51
560
+ msgid "Note: Nesting features not enabled for non-hierarchical post types."
561
+ msgstr ""
562
+ "Nota: las funcionalidades de anidado no están habiltiadas para tipo de "
563
+ "entrada no jerárquicas."
564
+
565
+ #: app/Views/settings/settings-posttypes.php:54
566
+ msgid ""
567
+ "If default menu is not replaced, an additional submenu item will be added "
568
+ "for \"Nested/Sort View\""
569
+ msgstr ""
570
+ "Si el menú por defecto no se reemplaza, el elemento adicional del submenú se "
571
+ "añadirá para \"Nested/Sort View\""
572
+
573
+ #: app/Views/settings/settings-posttypes.php:57
574
+ msgid ""
575
+ "<strong>Important:</strong> Changing page structures on live sites may "
576
+ "effect SEO and existing inbound links. Limit URL structure changes on live "
577
+ "sites by disabling nesting. Sorting within the current nesting structure "
578
+ "will still be available. If nesting changes are made to a live site, it may "
579
+ "help to add a 301 redirect from the old location to the new one."
580
+ msgstr ""
581
+ "<strong>Importante:</strong> Cambiar las estructuras de página en producción "
582
+ "puede afectar a los enlaces de SEO. Limita los cambios de estructura "
583
+ "desactivando el anidado. La ordenación con la actual estructura de anidado "
584
+ "continuará estando disponible. Si los cambios de anidado se hacen en "
585
+ "producción, una redirección 301 ayudará a redirigir a los visitantes desde "
586
+ "el sitio antiguo al nuevo."
587
+
588
+ #: app/Views/settings/settings.php:6
589
+ msgid "General"
590
+ msgstr "General"
591
+
592
+ #: app/Views/settings/settings.php:10
593
+ msgid "Post Types"
594
+ msgstr "Tipos de entrada"
nestedpages.php CHANGED
@@ -3,7 +3,7 @@
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 maintaining quick edit functionality.
6
- Version: 1.5.3
7
  Author: Kyle Phillips
8
  Author URI: https://github.com/kylephillips
9
  Text Domain: nestedpages
@@ -12,7 +12,7 @@ License: GPLv2 or later.
12
  Copyright: Kyle Phillips
13
  */
14
 
15
- /* Copyright 2015 Kyle Phillips (email : support@nestedpages.com)
16
 
17
  This program is free software; you can redistribute it and/or modify
18
  it under the terms of the GNU General Public License, version 2, as
@@ -47,9 +47,11 @@ function nestedpages_check_versions( $wp = '3.9', $php = '5.3.2' ) {
47
  }
48
 
49
  if( !class_exists('Bootstrap') ) :
50
- define('NESTEDPAGES_DIR', __FILE__);
 
 
51
  nestedpages_check_versions();
52
- require_once('vendor/autoload.php');
53
- require_once('app/NestedPages.php');
54
  NestedPages::init();
55
  endif;
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 maintaining quick edit functionality.
6
+ Version: 1.5.4
7
  Author: Kyle Phillips
8
  Author URI: https://github.com/kylephillips
9
  Text Domain: nestedpages
12
  Copyright: Kyle Phillips
13
  */
14
 
15
+ /* Copyright 2016 Kyle Phillips (email : support@nestedpages.com)
16
 
17
  This program is free software; you can redistribute it and/or modify
18
  it under the terms of the GNU General Public License, version 2, as
47
  }
48
 
49
  if( !class_exists('Bootstrap') ) :
50
+ define('NESTEDPAGES_DIR', __DIR__);
51
+ define('NESTEDPAGES_URI', __FILE__);
52
+
53
  nestedpages_check_versions();
54
+ require_once(NESTEDPAGES_DIR . '/vendor/autoload.php');
55
+ require_once(NESTEDPAGES_DIR . '/app/NestedPages.php');
56
  NestedPages::init();
57
  endif;
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Nested Pages ===
2
  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.3
7
- Stable tag: 1.5.2
8
 
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -38,6 +38,7 @@ For more information visit [nestedpages.com](http://nestedpages.com).
38
  * Italian (Francesco Canovi)
39
  * Portuguese (Luis Martins)
40
  * Russian (Алексей Катаев)
 
41
  * Turkish (Yuksel Beyti)
42
 
43
  == Installation ==
@@ -89,6 +90,12 @@ If you have WordPress SEO by Yoast installed, your page score indicators are sho
89
 
90
  == Changelog ==
91
 
 
 
 
 
 
 
92
  = 1.5.3 =
93
  * Confirmation modal added when deleting a link item.
94
  * Bug fix where custom nav titles were not being saved.
@@ -337,4 +344,4 @@ After installing Nested Pages, a new menu will be available with the name `Neste
337
 
338
  **Editing the generated menu:** Any manual changes made to the menu outside of the Nested Pages interface will be overwritten after the synchronization runs.
339
 
340
- **Hiding Pages in the Menu:** To hide a page from the nestedpages menu, click “Quick Edit” on it’s row, select “Hide in Nav Menu”, and click “update”. If menu sync is disabled, enable it now to sync the setting. Hidden pages are marked “(Hidden)”. If a page with child pages is hidden from the menu, all of it’s child pages will also be hidden.
1
+ === Nested Pages ===
2
  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.4
7
+ Stable tag: 1.5.4
8
 
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
38
  * Italian (Francesco Canovi)
39
  * Portuguese (Luis Martins)
40
  * Russian (Алексей Катаев)
41
+ * Spanish (Raúl Martínez)
42
  * Turkish (Yuksel Beyti)
43
 
44
  == Installation ==
90
 
91
  == Changelog ==
92
 
93
+
94
+ = 1.5.4 =
95
+ * Spanish translation added (Thanks to Raúl Martínez)
96
+ * Various bug fixes related to WordPress 4.4 update
97
+ * Duplicate menu items bug fix
98
+
99
  = 1.5.3 =
100
  * Confirmation modal added when deleting a link item.
101
  * Bug fix where custom nav titles were not being saved.
344
 
345
  **Editing the generated menu:** Any manual changes made to the menu outside of the Nested Pages interface will be overwritten after the synchronization runs.
346
 
347
+ **Hiding Pages in the Menu:** To hide a page from the Nested Pages menu, click “Quick Edit” on it’s row, select “Hide in Nav Menu”, and click “update”. If menu sync is disabled, enable it now to sync the setting. Hidden pages are marked “(Hidden)”. If a page with child pages is hidden from the menu, all of it’s child pages will also be hidden.