Nested Pages - Version 3.0.10

Version Description

  • Fixes issue with translation file naming that was preventing plugin translations from loading.
  • Adds settings action to reset user preferences (toggled/visible pages). For clearing user meta that may has become unnormalized during site/other plugin updates, resulting in PHP errors in the listing view.
Download this release

Release Info

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

Code changes from version 3.0.9 to 3.0.10

Files changed (49) hide show
  1. app/Config/SettingsRepository.php +8 -7
  2. app/Entities/Listing/ListingQuery.php +1 -1
  3. app/Entities/Post/PostRepository.php +53 -0
  4. app/Form/Events.php +2 -1
  5. app/Form/Listeners/ClonePost.php +1 -1
  6. app/Form/Listeners/ResetUserPreferences.php +18 -0
  7. app/NestedPages.php +1 -1
  8. app/Views/settings/settings-general.php +16 -0
  9. assets/js/lib/nestedpages-factory.js +2 -1
  10. assets/js/lib/nestedpages.userprefs-reset.js +61 -0
  11. assets/js/nestedpages.js +2 -1
  12. assets/js/nestedpages.min.js +1 -1
  13. assets/js/nestedpages.settings.min.js +1 -1
  14. languages/nestedpages.mo +0 -0
  15. languages/nestedpages.pot +0 -744
  16. languages/{nestedpages-cs_CZ.mo → wp-nested-pages-cs_CZ.mo} +0 -0
  17. languages/{nestedpages-cs_CZ.po → wp-nested-pages-cs_CZ.po} +0 -0
  18. languages/{nestedpages-da_DK.mo → wp-nested-pages-da_DK.mo} +0 -0
  19. languages/{nestedpages-da_DK.po → wp-nested-pages-da_DK.po} +0 -0
  20. languages/{nestedpages-de_CH.mo → wp-nested-pages-de_CH.mo} +0 -0
  21. languages/{nestedpages-de_CH.po → wp-nested-pages-de_CH.po} +0 -0
  22. languages/{nestedpages-de_DE.mo → wp-nested-pages-de_DE.mo} +0 -0
  23. languages/{nestedpages-de_DE.po → wp-nested-pages-de_DE.po} +0 -0
  24. languages/{nestedpages-es_ES.mo → wp-nested-pages-es_ES.mo} +0 -0
  25. languages/{nestedpages-es_ES.po → wp-nested-pages-es_ES.po} +0 -0
  26. languages/{nestedpages-fi.mo → wp-nested-pages-fi.mo} +0 -0
  27. languages/{nestedpages-fi.po → wp-nested-pages-fi.po} +0 -0
  28. languages/{nestedpages-fr_FR.mo → wp-nested-pages-fr_FR.mo} +0 -0
  29. languages/{nestedpages-fr_FR.po → wp-nested-pages-fr_FR.po} +0 -0
  30. languages/{nestedpages-it_IT.mo → wp-nested-pages-it_IT.mo} +0 -0
  31. languages/{nestedpages-it_IT.po → wp-nested-pages-it_IT.po} +0 -0
  32. languages/{nestedpages-nl_NL.mo → wp-nested-pages-nl_NL.mo} +0 -0
  33. languages/{nestedpages-nl_NL.po → wp-nested-pages-nl_NL.po} +0 -0
  34. languages/{nestedpages-pt_BR.mo → wp-nested-pages-pt_BR.mo} +0 -0
  35. languages/{nestedpages-pt_BR.po → wp-nested-pages-pt_BR.po} +0 -0
  36. languages/{nestedpages-pt_PT.mo → wp-nested-pages-pt_PT.mo} +0 -0
  37. languages/{nestedpages-pt_PT.po → wp-nested-pages-pt_PT.po} +0 -0
  38. languages/{nestedpages-ru_RU.mo → wp-nested-pages-ru_RU.mo} +0 -0
  39. languages/{nestedpages-ru_RU.po → wp-nested-pages-ru_RU.po} +0 -0
  40. languages/{nestedpages-sv_SE.mo → wp-nested-pages-sv_SE.mo} +0 -0
  41. languages/{nestedpages-sv_SE.po → wp-nested-pages-sv_SE.po} +0 -0
  42. languages/{nestedpages-tr_TR.mo → wp-nested-pages-tr_TR.mo} +0 -0
  43. languages/{nestedpages-tr_TR.po → wp-nested-pages-tr_TR.po} +0 -0
  44. languages/wp-nested-pages.pot +1024 -0
  45. nestedpages.php +1 -1
  46. readme.txt +8 -1
  47. vendor/autoload.php +1 -1
  48. vendor/composer/ClassLoader.php +44 -9
  49. vendor/composer/autoload_real.php +6 -6
app/Config/SettingsRepository.php CHANGED
@@ -22,8 +22,8 @@ class SettingsRepository
22
  public function hideMenuSync()
23
  {
24
  $option = get_option('nestedpages_ui', false);
25
- if ( $option && isset($option['hide_menu_sync']) && $option['hide_menu_sync'] == 'true' ) return true;
26
- return false;
27
  }
28
 
29
  /**
@@ -32,7 +32,8 @@ class SettingsRepository
32
  public function menuSyncEnabled()
33
  {
34
  $option = get_option('nestedpages_menusync');
35
- return ( $option == 'sync' ) ? true : false;
 
36
  }
37
 
38
  /**
@@ -41,8 +42,8 @@ class SettingsRepository
41
  public function autoMenuDisabled()
42
  {
43
  $option = get_option('nestedpages_ui', false);
44
- if ( $option && isset($option['manual_menu_sync']) && $option['manual_menu_sync'] == 'true' ) return true;
45
- return false;
46
  }
47
 
48
  /**
@@ -62,8 +63,8 @@ class SettingsRepository
62
  public function menusDisabled()
63
  {
64
  $option = get_option('nestedpages_disable_menu');
65
- if ( $option && $option == 'true' ) return true;
66
- return false;
67
  }
68
 
69
  /**
22
  public function hideMenuSync()
23
  {
24
  $option = get_option('nestedpages_ui', false);
25
+ $visible = ( $option && isset($option['hide_menu_sync']) && $option['hide_menu_sync'] == 'true' ) ? true : false;
26
+ return apply_filters('nestedpages_menu_sync_visible', $visible);
27
  }
28
 
29
  /**
32
  public function menuSyncEnabled()
33
  {
34
  $option = get_option('nestedpages_menusync');
35
+ $enabled = ( $option == 'sync' ) ? true : false;
36
+ return apply_filters('nestedpages_menu_sync_enabled', $enabled);
37
  }
38
 
39
  /**
42
  public function autoMenuDisabled()
43
  {
44
  $option = get_option('nestedpages_ui', false);
45
+ $enabled = ( $option && isset($option['manual_menu_sync']) && $option['manual_menu_sync'] == 'true' ) ? true : false;
46
+ return apply_filters('nestedpages_menu_autosync_enabled', $enabled);
47
  }
48
 
49
  /**
63
  public function menusDisabled()
64
  {
65
  $option = get_option('nestedpages_disable_menu');
66
+ $disabled = ( $option && $option == 'true' ) ? true : false;
67
+ return apply_filters('nestedpages_menus_disabled', $disabled);
68
  }
69
 
70
  /**
app/Entities/Listing/ListingQuery.php CHANGED
@@ -120,7 +120,7 @@ class ListingQuery
120
  */
121
  private function searchParams($query_args)
122
  {
123
- $query_args['post_title_like'] = sanitize_text_field($_GET['search']);
124
  unset($query_args['post_parent']);
125
  return $query_args;
126
  }
120
  */
121
  private function searchParams($query_args)
122
  {
123
+ $query_args['s'] = sanitize_text_field($_GET['search']);
124
  unset($query_args['post_parent']);
125
  return $query_args;
126
  }
app/Entities/Post/PostRepository.php CHANGED
@@ -169,4 +169,57 @@ class PostRepository
169
  $query = $wpdb->prepare("SELECT p.post_title, tr.term_taxonomy_id AS tax_id, t.slug AS term_name, tt.taxonomy AS tax_name, tt.term_id AS term_id FROM {$wpdb->prefix}posts AS p LEFT JOIN {$wpdb->prefix}term_relationships AS tr ON tr.object_id = p.ID LEFT JOIN {$wpdb->prefix}terms AS t ON t.term_id = tr.term_taxonomy_id LEFT JOIN {$wpdb->prefix}term_taxonomy AS tt ON tt.term_taxonomy_id = tr.term_taxonomy_id WHERE p.ID = %s", $post_id);
170
  return $wpdb->get_results($query);
171
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  }
169
  $query = $wpdb->prepare("SELECT p.post_title, tr.term_taxonomy_id AS tax_id, t.slug AS term_name, tt.taxonomy AS tax_name, tt.term_id AS term_id FROM {$wpdb->prefix}posts AS p LEFT JOIN {$wpdb->prefix}term_relationships AS tr ON tr.object_id = p.ID LEFT JOIN {$wpdb->prefix}terms AS t ON t.term_id = tr.term_taxonomy_id LEFT JOIN {$wpdb->prefix}term_taxonomy AS tt ON tt.term_taxonomy_id = tr.term_taxonomy_id WHERE p.ID = %s", $post_id);
170
  return $wpdb->get_results($query);
171
  }
172
+
173
+ /**
174
+ * Get a nested array of posts based on a parent
175
+ * @param $parent_id (int)
176
+ * @param $post_type (string)
177
+ * @param $include_parent (bool), whether to include parent in tree
178
+ */
179
+ public function postTree($parent_id = 0, $post_type, $include_parent = true)
180
+ {
181
+ $posts = [];
182
+ if ( $parent_id !== 0 && $include_parent ){
183
+ $args = [
184
+ 'posts_per_page' => 1,
185
+ 'post_type' => $post_type,
186
+ 'p' => $parent_id
187
+ ];
188
+ $q = new \WP_Query(apply_filters('nestedpages_post_tree_parent', $args));
189
+ if ( $q->have_posts() ) $posts = $q->posts;
190
+ wp_reset_postdata();
191
+ }
192
+ $children = $this->getChildren($parent_id, $post_type, $posts);
193
+ $posts = [];
194
+ foreach ( $children as $child ){
195
+ $posts[$child->ID] = $child->post_parent;
196
+ }
197
+ return $posts;
198
+ }
199
+
200
+ /**
201
+ * Get all children of a post/page
202
+ * Recursive function
203
+ */
204
+ public function getChildren($parent_id, $post_type, $posts = [])
205
+ {
206
+ $new_posts = [];
207
+ $args = [
208
+ 'posts_per_page' => -1,
209
+ 'post_type' => $post_type,
210
+ 'post_parent' => $parent_id,
211
+ 'orderby' => 'menu_order',
212
+ 'order' => 'ASC'
213
+ ];
214
+ $q = new \WP_Query(apply_filters('nestedpages_post_tree_children', $args));
215
+ if ( $q->have_posts() ) $new_posts = $q->posts;
216
+ wp_reset_postdata();
217
+ if ( !empty($new_posts) ){
218
+ $posts = array_merge($posts, $new_posts);
219
+ foreach ( $new_posts as $post ){
220
+ return $this->getChildren($post->ID, $post_type, $posts);
221
+ }
222
+ }
223
+ return $posts;
224
+ }
225
  }
app/Form/Events.php CHANGED
@@ -49,7 +49,8 @@ class Events
49
  'admin_post_npBulkEdit',
50
  'wp_ajax_nppostSearch',
51
  'wp_ajax_npWpmlTranslations',
52
- 'wp_ajax_npresetSettings'
 
53
  ];
54
  $this->setHandlers();
55
  }
49
  'admin_post_npBulkEdit',
50
  'wp_ajax_nppostSearch',
51
  'wp_ajax_npWpmlTranslations',
52
+ 'wp_ajax_npresetSettings',
53
+ 'wp_ajax_npresetUserPreferences'
54
  ];
55
  $this->setHandlers();
56
  }
app/Form/Listeners/ClonePost.php CHANGED
@@ -32,7 +32,7 @@ class ClonePost extends BaseHandler
32
  private function setPostID()
33
  {
34
  if ( !isset($_POST['parent_id']) ){
35
- return $this->sendResponse(['status' => 'error', 'message' => __('Post Not Found', 'nestedapges')]);
36
  }
37
  $this->data['post_id'] = intval(sanitize_text_field($_POST['parent_id']));
38
  $this->data['status'] = sanitize_text_field($_POST['status']);
32
  private function setPostID()
33
  {
34
  if ( !isset($_POST['parent_id']) ){
35
+ return $this->sendResponse(['status' => 'error', 'message' => __('Post Not Found', 'wp-nested-pages')]);
36
  }
37
  $this->data['post_id'] = intval(sanitize_text_field($_POST['parent_id']));
38
  $this->data['status'] = sanitize_text_field($_POST['status']);
app/Form/Listeners/ResetUserPreferences.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace NestedPages\Form\Listeners;
3
+
4
+ class ResetUserPreferences extends BaseHandler
5
+ {
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->reset();
10
+ }
11
+
12
+ private function reset()
13
+ {
14
+ global $wpdb;
15
+ $wpdb->delete($wpdb->usermeta, ['meta_key' => 'np_visible_posts']);
16
+ return wp_send_json(['status' => 'success']);
17
+ }
18
+ }
app/NestedPages.php CHANGED
@@ -12,7 +12,7 @@ class NestedPages
12
  $np_env = 'live';
13
 
14
  global $np_version;
15
- $np_version = '3.0.9';
16
 
17
  if ( is_admin() ) $app = new NestedPages\Bootstrap;
18
  if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
12
  $np_env = 'live';
13
 
14
  global $np_version;
15
+ $np_version = '3.0.10';
16
 
17
  if ( is_admin() ) $app = new NestedPages\Bootstrap;
18
  if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
app/Views/settings/settings-general.php CHANGED
@@ -88,4 +88,20 @@ settings_fields( 'nestedpages-general' );
88
  </div>
89
  </td>
90
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  </table>
88
  </div>
89
  </td>
90
  </tr>
91
+ <tr valign="top">
92
+ <th scope="row"><?php _e('Reset User Preferences', 'wp-nested-pages'); ?></th>
93
+ <td>
94
+ <div class="nestedpages-reset-user-prefs">
95
+ <p>
96
+ <?php _e('Toggle states are saved for each user. This action will clear these preferences for all users. If PHP errors appear within the nested view after an update, this may help clear them.', 'wp-nested-pages'); ?>
97
+ </p>
98
+ <p>
99
+ <button class="np-btn np-btn-trash" data-nestedpages-reset-user-prefs><?php _e('Reset User Preferences', 'wp-nested-pages'); ?></button>
100
+ </p>
101
+ </div>
102
+ <div class="nestedpages-reset-user-prefs-complete" style="display:none;">
103
+ <p><?php _e('User preferences have been successfully reset.', 'wp-nested-pages'); ?></p>
104
+ </div>
105
+ </td>
106
+ </tr>
107
  </table>
assets/js/lib/nestedpages-factory.js CHANGED
@@ -161,7 +161,8 @@ NestedPages.formActions = {
161
  manualMenuSync : 'npmanualMenuSync',
162
  postSearch: 'nppostSearch',
163
  wpmlTranslations : 'npWpmlTranslations',
164
- resetSettings : 'npresetSettings'
 
165
  }
166
 
167
 
161
  manualMenuSync : 'npmanualMenuSync',
162
  postSearch: 'nppostSearch',
163
  wpmlTranslations : 'npWpmlTranslations',
164
+ resetSettings : 'npresetSettings',
165
+ resetUserPrefs : 'npresetUserPreferences'
166
  }
167
 
168
 
assets/js/lib/nestedpages.userprefs-reset.js ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var NestedPages = NestedPages || {};
2
+
3
+ /**
4
+ * Reset User Preferences
5
+ * @package Nested Pages
6
+ * @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
7
+ */
8
+ NestedPages.UserPreferencesReset = function()
9
+ {
10
+ var plugin = this;
11
+ var $ = jQuery;
12
+
13
+ plugin.selectors = {
14
+ resetButton : 'data-nestedpages-reset-user-prefs',
15
+ resetForm : '.nestedpages-reset-user-prefs',
16
+ formComplete : '.nestedpages-reset-user-prefs-complete'
17
+ }
18
+
19
+ plugin.bindEvents = function()
20
+ {
21
+ $(document).on('click', '[' + plugin.selectors.resetButton + ']', function(e){
22
+ e.preventDefault();
23
+ plugin.resetPreferences();
24
+ });
25
+ }
26
+
27
+ plugin.resetPreferences = function()
28
+ {
29
+ plugin.loading(true);
30
+ $.ajax({
31
+ url: NestedPages.jsData.ajaxurl,
32
+ type: 'post',
33
+ datatype: 'json',
34
+ data: {
35
+ action : NestedPages.formActions.resetUserPrefs,
36
+ nonce : NestedPages.jsData.nonce
37
+ },
38
+ success: function(data){
39
+ plugin.loading(false);
40
+ $(plugin.selectors.resetForm).hide();
41
+ $(plugin.selectors.formComplete).show();
42
+ if ( data.status !== 'success' ){
43
+ console.log('There was an error clearing user preferences.');
44
+ }
45
+ }
46
+ });
47
+ }
48
+
49
+ plugin.loading = function(loading)
50
+ {
51
+ if ( loading ){
52
+ $('[' + plugin.selectors.resetButton + ']').attr('disabled', true);
53
+ return;
54
+ }
55
+ $('[' + plugin.selectors.resetButton + ']').removeAttr('disabled');
56
+ }
57
+
58
+ return plugin.bindEvents();
59
+ }
60
+
61
+ new NestedPages.UserPreferencesReset;
assets/js/nestedpages.js CHANGED
@@ -2527,7 +2527,8 @@ NestedPages.formActions = {
2527
  manualMenuSync : 'npmanualMenuSync',
2528
  postSearch: 'nppostSearch',
2529
  wpmlTranslations : 'npWpmlTranslations',
2530
- resetSettings : 'npresetSettings'
 
2531
  }
2532
 
2533
 
2527
  manualMenuSync : 'npmanualMenuSync',
2528
  postSearch: 'nppostSearch',
2529
  wpmlTranslations : 'npWpmlTranslations',
2530
+ resetSettings : 'npresetSettings',
2531
+ resetUserPrefs : 'npresetUserPreferences'
2532
  }
2533
 
2534
 
assets/js/nestedpages.min.js CHANGED
@@ -1 +1 @@
1
- (NestedPages=NestedPages||{}).Formatter=function(){var s=this,o=jQuery;s.updateSubMenuToggle=function(){for(var e=o(NestedPages.selectors.childToggle),t=0;t<e.length;t++){var a=e[t],s=o(a).parent(".row").parent("li");if(0<o(s).children("ol").length){if(o(s).children("ol").find("li.page-row").length<1){o(s).children("ol").hide();continue}var n='<div class="child-toggle-spacer"></div>';n+='<a href="#"',0<o(s).children("ol:visible").length&&(n+=' class="open"'),n+='><span class="np-icon-arrow"></span></a>',o(a).html(n),0<o(s).children("ol").children(".np-hide").length&&0===o(s).children("ol").children(".np-hide.shown").length?o(a).find("a").hide():0<o(s).children("ol").children(".np-hide").length&&0<o(s).children("ol").children(".np-hide.shown").length&&o(a).find("a").show()}else o(a).empty().html('<div class="child-toggle-spacer"></div>')}},s.setBorders=function(){o(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder),o.each(o(NestedPages.selectors.lists),function(){o(this).find(".page-row:visible:first").addClass(NestedPages.cssClasses.noborder)})},s.setNestedMargins=function(){o.each(o(NestedPages.selectors.lists),function(e,t){var a=o(this).parents(NestedPages.selectors.lists).length,s=0;if(NestedPages.jsData.sortable||(s=10),0<a){s=20*a+s;o(this).find(".row-inner").css("padding-left",s+"px")}else NestedPages.jsData.sortable&&!o(this).hasClass("no-sort")?o(this).find(".row-inner").css("padding-left","0px"):o(this).find(".row-inner").css("padding-left","10px")})},s.updatePlaceholderWidth=function(e){if(NestedPages.jsData.nestable){var t=40*o(e.placeholder).parents("ol").length-40,a=o(NestedPages.selectors.sortable).width()-t;o(e.placeholder).width(a).css("margin-left",t+"px")}s.updateListVisibility(e)},s.updateListVisibility=function(e){var t=o(e.placeholder).parent("ol");o(t).is(":visible")||(o(t).addClass("nplist"),o(t).show())},s.removeQuickEdit=function(){o(NestedPages.selectors.quickEditOverlay).removeClass("active").remove(),o(".sortable .quick-edit").remove(),o(".row").show()},s.showQuickEdit=function(){o("body").append('<div class="np-inline-overlay"></div>'),setTimeout(function(){o(".np-inline-overlay").addClass("active")},50)},s.flashRow=function(e){o(e).addClass("np-updated"),s.setBorders(),setTimeout(function(){o(e).addClass("np-updated-show")},1500)},s.showAjaxError=function(e){o(NestedPages.selectors.ajaxError).find("p").text(e),o(NestedPages.selectors.ajaxError).show()},s.hideAjaxError=function(e){o(NestedPages.selectors.ajaxError).hide()},s.sizeLinkThumbnails=function(){var e=o(NestedPages.selectors.thumbnailContainer).not(NestedPages.selectors.thumbnailContainerLink).first().find("img"),t=o(e).width(),a=o(e).height();o.each(o(NestedPages.selectors.thumbnailContainerLink),function(){o(this).width(t),o(this).height(a)})}},(NestedPages=NestedPages||{}).Dropdowns=function(){var t=this,a=jQuery;return t.dropdown="",t.activeBtn="",t.activeContent="",t.toggleBtn="[data-dropdown-toggle]",t.dropdownContainer="[data-dropdown]",t.dropdownContent="[data-dropdown-content]",t.selectors={caret_up:"icon-arrow_drop_up",caret_down:"icon-arrow_drop_down"},t.bindEvents=function(){a(document).on("click",t.toggleBtn,function(e){e.preventDefault(),t.activeBtn=a(this),t.dropdown=a(this).parents(t.dropdownContainer),t.toggleDropdown()}),a(document).on("click",function(e){t.closeDropdowns(e.target)}),a(document).on("dropdown-opened",function(e,t){0<a(t).parents(NestedPages.selectors.row).length&&a(t).parents(NestedPages.selectors.row).addClass("active")}),a(document).on("dropdown-closed",function(){a(NestedPages.selectors.row).removeClass("active")})},t.toggleDropdown=function(){a("."+t.selectors.caret_up).attr("class",t.selectors.caret_down);var e=a(t.dropdown).find(t.dropdownContent);if(t.activeContent=e,a(e).hasClass("active"))return a(e).removeClass("active"),a(t.activeBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),void a(document).trigger("dropdown-closed",e);t.setPositioning(),a(t.toggleBtn).removeClass("active"),a(t.dropdownContent).removeClass("active"),a(e).addClass("active"),a(t.activeBtn).find("."+t.selectors.caret_down).attr("class",t.selectors.caret_up),a(t.activeBtn).addClass("active"),a(document).trigger("dropdown-opened",e)},t.setPositioning=function(){var e=a(t.activeBtn).outerHeight();a(t.activeContent).css("top",e+"px")},t.closeDropdowns=function(e){0===a(e).parents(t.dropdownContainer).length&&(a(t.dropdownContent).removeClass("active"),a(t.toggleBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),a(document).trigger("dropdown-closed",void 0))},t.bindEvents()},(NestedPages=NestedPages||{}).Modals=function(){var a=this,s=jQuery;return a.activeBtn="",a.activeModal="",a.modalOpen=!1,a.selectors={toggleBtn:"[data-nestedpages-modal-toggle]",backdrop:"[data-nestedpages-modal-backdrop]",closeBtn:"[data-nestedpages-modal-close]",title:"data-nestedpages-modal-title",content:"data-nestedpages-modal-content"},a.bindEvents=function(){s(document).on("click",a.selectors.toggleBtn,function(e){e.preventDefault(),a.activeBtn=s(this),a.openModal()}),s(document).on("click",a.selectors.closeBtn,function(e){e.preventDefault(),a.closeModals()}),s(document).on("open-modal-manual",function(e,t){a.activeModal=s('[data-nestedpages-modal="'+t+'"]'),a.openModal()}),s(document).on("close-modal-manual",function(e){a.closeModals()}),s(document).on("click",a.selectors.backdrop,function(e){a.closeModals()}),s(document).ready(function(){a.checkHash()})},a.openModal=function(){if(a.modalOpen)a.closeModals();else{if(0<s(a.activeBtn).length){var e=s(a.activeBtn).attr("data-nestedpages-modal-toggle");a.activeModal=s('*[data-nestedpages-modal="'+e+'"]')}s(a.activeModal).addClass("active"),a.modalOpen=!0,a.populateModal(),s(document).trigger("open-modal",[a.activeBtn,a.activeModal])}},a.closeModals=function(){a.modalOpen=!1,s("[data-nestedpages-modal]").removeClass("active"),a.activeModal="",a.activeBtn=""},a.populateModal=function(){var e=s(a.activeBtn).attr(a.selectors.title);void 0!==e&&""!==e&&s(a.activeModal).find("[data-nestedpages-modal-title]").text(e);var t=s(a.activeBtn).attr(a.selectors.content);void 0!==t&&""!==t&&s(a.activeModal).find("[data-nestedpages-modal-content]").html(t)},a.checkHash=function(){if(window.location.hash&&"#modal"===window.location.hash.substring(0,6)){var e=window.location.hash.substring(7);a.activeModal=s('*[data-nestedpages-modal="'+e+'"]'),a.openModal()}},a.bindEvents()},(NestedPages=NestedPages||{}).CheckAll=function(){var s=this,n=jQuery;return s.activeCheckbox="",s.selectors={checkbox:"[data-np-check-all]"},s.bindEvents=function(){n(document).on("change",s.selectors.checkbox,function(){s.activeCheckbox=n(this),s.toggleCheckboxes()}),n(document).on("change","input[type=checkbox]",function(){s.checkAllStatus(n(this))})},s.init=function(){s.bindEvents()},s.toggleCheckboxes=function(){var t=!!n(s.activeCheckbox).is(":checked"),e=n(s.activeCheckbox).attr("data-np-check-all"),a=n('*[name="'+e+'"]');n.each(a,function(){var e=n(this).parents(NestedPages.selectors.rows);n(this).prop("checked",t),n(e).hasClass("np-hide")&&!n(e).is(":visible")&&n(e).find(NestedPages.selectors.bulkActionsCheckbox).prop("checked",!1)}),s.toggleCheckAll()},s.toggleCheckAll=function(){var e=n(s.activeCheckbox).attr("data-np-check-all"),t=n('*[name="'+e+'"]').length;t=t-n(".np-hide").find(NestedPages.selectors.bulkActionsCheckbox).length+n(".np-hide:visible").find(NestedPages.selectors.bulkActionsCheckbox).length;var a=n('*[name="'+e+'"]:checked').length;if(t==a)return n(s.activeCheckbox).prop("checked",!0),void n(s.activeCheckbox).removeClass("check-all-partial");0<a?n(s.activeCheckbox).addClass("check-all-partial"):(n(s.activeCheckbox).attr("checked",!1),n(s.activeCheckbox).removeClass("check-all-partial"))},s.checkAllStatus=function(e){var t=n(e).attr("name"),a=n('*[data-np-check-all="'+t+'"]');0!==a.length&&(s.activeCheckbox=n(a)[0],s.toggleCheckAll())},s.init()},(NestedPages=NestedPages||{}).BulkActions=function(){var o=this,i=jQuery;return o.selectedNumber=0,o.selectedLinks=[],o.selectedPosts=[],o.init=function(){o.bindEvents()},o.bindEvents=function(){i(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){o.toggleBulkForm()}),i(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){"edit"===i("select[name=np_bulk_action]").val()&&(e.preventDefault(),o.toggleBulkEdit(!0))}),i(document).on("click",NestedPages.selectors.bulkEditRemoveItem,function(e){e.preventDefault();var t=i(this).siblings("input[type=hidden]").val();o.uncheckBulkItem(t)}),i(document).on("click",NestedPages.selectors.bulkEditCancel,function(e){e.preventDefault(),o.uncheckAllBulkItems()})},o.toggleBulkForm=function(){var a=!1,s="",n="";if(o.selectedPosts=[],o.selectedLinks=[],i.each(i(NestedPages.selectors.bulkActionsCheckbox),function(){if(i(this).is(":checked")){var e=i(this).parents(NestedPages.selectors.rows);if(a=!0,i(this).parent("div").hasClass("np-check-all")||i(e).hasClass("post-type-np-redirect")||(s+=i(this).val()+","),i(e).hasClass("post-type-np-redirect")&&(n+=i(this).val()+",",o.selectedLinks.push(i(this).val())),"np-redirect"!==i(this).attr("data-np-post-type")&&!i(this).parent("div").hasClass("np-check-all")){var t=[];t.title=i(this).attr("data-np-bulk-checkbox"),t.id=i(this).val(),o.selectedPosts.push(t)}}}),o.setBulkEditPosts(),o.toggleEditOption(),o.toggleLinkCountAlert(),a)return i(NestedPages.selectors.bulkActionsForm).show(),i(NestedPages.selectors.bulkActionsIds).val(s),i(NestedPages.selectors.bulkActionRedirectIds).val(n),void o.setSelectedNumber();i(NestedPages.selectors.bulkActionsIds).val(""),i(NestedPages.selectors.bulkActionsForm).hide()},o.setBulkEditPosts=function(){for(var e="",t=0;t<o.selectedPosts.length;t++)e+='<li><a href="#" class="np-remove" data-np-remove-bulk-item>&times;</a>',e+=o.selectedPosts[t].title,e+='<input type="hidden" name="post_ids[]" value="'+o.selectedPosts[t].id+'"></li>';i(NestedPages.selectors.bulkEditTitles).html(e)},o.uncheckBulkItem=function(e){i.each(i(NestedPages.selectors.bulkActionsCheckbox),function(){i(this).val()==e&&i(this).prop("checked",!1).change()}),0===i(NestedPages.selectors.bulkEditRemoveItem).length&&o.toggleBulkEdit(!1)},o.uncheckAllBulkItems=function(){i.each(i(NestedPages.selectors.bulkActionsCheckbox),function(){i(this).prop("checked",!1).change()}),o.toggleBulkEdit(!1)},o.setSelectedNumber=function(){var e=i(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").length,t=i(NestedPages.selectors.bulkActionsForm).find("select option").first();i(t).text(nestedpages.bulk_actions+" ("+e+")")},o.toggleEditOption=function(){var e=i(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").not(".np-redirect-bulk").length,t=i(NestedPages.selectors.bulkActionsForm).find("select option[value=edit]");if(0===e)return i(t).prop("disabled",!0),i(NestedPages.selectors.bulkActionsForm).find("select option").first().prop("selected",!0),void o.toggleBulkEdit(!1);i(t).prop("disabled",!1)},o.toggleBulkEdit=function(e){if(o.toggleLinkCountAlert(),e)return o.disableParentOptions(),i(NestedPages.selectors.bulkEditForm).show(),i(NestedPages.selectors.bulkActionsForm).hide(),void o.setWPSuggest();i(NestedPages.selectors.bulkEditForm).hide(),i(NestedPages.selectors.bulkActionsForm).show(),i(NestedPages.selectors.bulkEditLinkCount).parent("div").hide(),i(NestedPages.selectors.bulkActionsForm).find("select option").first().text(nestedpages.bulk_actions),o.resetBulkEditFields()},o.toggleLinkCountAlert=function(){0!==o.selectedLinks.length?i(NestedPages.selectors.bulkEditLinkCount).parent("div").show():i(NestedPages.selectors.bulkEditLinkCount).parent("div").hide()},o.disableParentOptions=function(){for(var e=i(NestedPages.selectors.bulkEditForm).find("select[name=post_parent]"),t=0;t<o.selectedPosts.length;t++)i(e).find("option[value="+o.selectedPosts[t].id+"]").attr("disabled",!0)},o.setWPSuggest=function(){var e=i(NestedPages.selectors.bulkEditForm).find("[data-autotag]");i.each(e,function(e,t){var a=i(this).attr("data-taxonomy");i(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},o.resetBulkEditFields=function(){var e=i(NestedPages.selectors.bulkEditForm).find("select");i.each(e,function(){i(this).find("option").first().prop("selected",!0),i(this).find("option").removeAttr("disabled")});var t=i(NestedPages.selectors.bulkEditForm).find(".cat-checklist");i.each(t,function(){i(this).find("input[type=checkbox]").prop("checked",!1)})},o.init()},(NestedPages=NestedPages||{}).HiddenItemCount=function(){var e=this,a=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){a(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.toggleAll,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.pageToggle,function(){e.toggleHiddenCount()})},e.toggleHiddenCount=function(){var t=0;a.each(a(NestedPages.selectors.bulkActionsCheckbox),function(){if(a(this).is(":checked")){if(a(this).parent("div").hasClass("np-check-all"))return;var e=a(this).closest(".page-row");a(e).is(":visible")||t++}}),t<1?a(NestedPages.selectors.hiddenItemCountParent).hide():(a(NestedPages.selectors.hiddenItemCount).text(t),a(NestedPages.selectors.hiddenItemCountParent).show())},e.init()},(NestedPages=NestedPages||{}).MenuToggle=function(){var a=this,n=jQuery;return a.formatter=new NestedPages.Formatter,a.bindEvents=function(){n(document).on("click",NestedPages.selectors.childToggleLink,function(e){e.preventDefault(),a.toggleSingleMenu(n(this))}),n(document).on("click",NestedPages.selectors.toggleAll,function(e){e.preventDefault(),a.toggleAllMenus()})},a.toggleSingleMenu=function(e){var t=n(e).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings("ol");n(e).toggleClass("open"),n(t).toggle(),a.formatter.setBorders(),a.formatter.setNestedMargins(),a.syncUserToggles()},a.toggleAllMenus=function(){var e=NestedPages.selectors.toggleAll;if("closed"===n(e).attr("data-toggle"))return n(NestedPages.selectors.lists).show(),n(e).attr("data-toggle","opened").text(NestedPages.jsData.collapseText),n(NestedPages.selectors.childToggle+" a").addClass("open"),a.formatter.setBorders(),void a.syncUserToggles();n(NestedPages.selectors.lists).not(n(NestedPages.selectors.lists)[0]).hide(),n(e).attr("data-toggle","closed").text(NestedPages.jsData.expandText),n(NestedPages.selectors.childToggle+" a").removeClass("open"),a.formatter.setBorders(),a.syncUserToggles()},a.visibleRowIDs=function(){var s=[],e=n(NestedPages.selectors.rows+":visible");return n.each(e,function(e,t){var a=n(this).attr("id");s.push(a.replace("menuItem_",""))}),s},a.syncUserToggles=function(){n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncToggles,nonce:NestedPages.jsData.nonce,ids:a.visibleRowIDs(),posttype:NestedPages.jsData.posttype},success:function(e){"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},a.bindEvents()},(NestedPages=NestedPages||{}).PageToggle=function(){var a=this,s=jQuery;return a.activeButton="",a.formatter=new NestedPages.Formatter,a.init=function(){a.bindEvents()},a.bindEvents=function(){s(document).on("click",NestedPages.selectors.toggleHidden,function(e){e.preventDefault(),a.activeButton=s(this),a.toggleHidden()}),s(document).on("click",NestedPages.selectors.toggleStatus,function(e){e.preventDefault(),a.toggleStatus(s(this))})},a.toggleHidden=function(){var e=s(a.activeButton),t=s(e).attr("href");if("#show"==t)return s(e).attr("href","#hide").text(NestedPages.jsData.showHiddenText),s(NestedPages.selectors.hiddenRows).removeClass("shown").hide(),a.formatter.updateSubMenuToggle(),void a.formatter.setBorders();"#hide"==t&&(s(e).attr("href","#show").text(NestedPages.jsData.hideHiddenText),s(NestedPages.selectors.hiddenRows).addClass("shown").show(),a.formatter.updateSubMenuToggle(),a.formatter.setBorders())},a.toggleStatus=function(e){var t=s(e).attr("href");t=t.substring(1),s(NestedPages.selectors.syncCheckbox).attr("disabled",!1),s(NestedPages.selectors.toggleStatus).removeClass("active"),s(e).addClass("active"),"draft"==t&&(s(NestedPages.selectors.syncCheckbox).attr("disabled",!0),s("."+t).addClass("nested-visible")),"all"!=t?(s(NestedPages.selectors.rows).hide(),s("."+t).show()):s(NestedPages.selectors.rows).show()},a.init()},(NestedPages=NestedPages||{}).Nesting=function(){var n=this,o=jQuery;n.formatter=new NestedPages.Formatter,n.initializeSortable=function(){if(!NestedPages.jsData.nestable)return n.initializeSortableFlat();o(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({items:NestedPages.selectors.rows,toleranceElement:"> .row",handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",tabSize:56,isAllowed:function(e,t,a){return!(o(t).hasClass("post-type-np-redirect")&&!o(a).hasClass("post-type-np-redirect"))},start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})},n.initializeSortableFlat=function(){var e=o(NestedPages.selectors.lists).not(NestedPages.selectors.notSortable);o.each(e,function(){o(this).sortable({items:">"+NestedPages.selectors.rows,handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",forcePlaceholderSize:!0,start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})})},n.disableNesting=function(){o(NestedPages.selectors.sortable).sortable("destroy")},n.syncNesting=function(e,t){var a;if("1"!==nestedpages.manual_order_sync||e){o(NestedPages.selectors.errorDiv).hide(),o(NestedPages.selectors.loadingIndicator).show(),a=NestedPages.jsData.nestable?o(NestedPages.selectors.sortable).nestedSortable("toHierarchy",{startDepthCount:0}):n.setNestingArray(),n.disableNesting();var s=NestedPages.jsData.syncmenu;"1"===nestedpages.manual_menu_sync&&(s="nosync"),o.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncNesting,nonce:NestedPages.jsData.nonce,list:a,post_type:NestedPages.jsData.posttype,syncmenu:s},success:function(e,t){if(n.initializeSortable(),"error"===e.status)o(NestedPages.selectors.errorDiv).text(e.message).show(),o(NestedPages.selectors.loadingIndicator).hide();else{if(t&&"function"==typeof t)return void t();o(NestedPages.selectors.loadingIndicator).hide()}}})}},n.setNestingArray=function(e){return ret=[],o(NestedPages.selectors.lists).first().children("li.page-row").each(function(){var e=n.recursiveNesting(this);ret.push(e)}),ret},n.recursiveNesting=function(e){var t,a=o(e).attr("id");if(a)return a=a.replace("menuItem_",""),t={id:a},0<o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).length&&(t.children=[],o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).each(function(){var e=n.recursiveNesting(this);t.children.push(e)})),t}},(NestedPages=NestedPages||{}).SyncMenuSetting=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.init=function(){t.bindEvents()},t.bindEvents=function(){e(document).ready(function(){"1"!==nestedpages.manual_menu_sync&&"1"===nestedpages.syncmenu&&t.syncSetting()}),e(document).on("change",NestedPages.selectors.syncCheckbox,function(){t.syncSetting()})},t.syncSetting=function(){"page"===NestedPages.jsData.posttype&&0!==e(NestedPages.selectors.syncCheckbox).length&&(NestedPages.jsData.syncmenu=e(NestedPages.selectors.syncCheckbox).is(":checked")?"sync":"nosync",e.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&&t.formatter.showAjaxError(e.message)},error:function(e){console.log(e)}}))},t.bindEvents()},(NestedPages=NestedPages||{}).NewPost=function(){var r=this,d=jQuery;return r.formatter=new NestedPages.Formatter,r.parent_id=0,r.posts="",r.form="",r.bindEvents=function(){d(document).on("open-modal",function(e,t,a){var s=d(t).attr("data-nestedpages-modal-toggle");void 0!==s&&"np-bulk-modal"==s&&r.openModal()}),d(document).on("submit",NestedPages.selectors.newPageForm,function(e){e.preventDefault()}),d(document).on("click",NestedPages.selectors.newPageSubmitButton,function(e){e.preventDefault(),r.submitForm(d(this))}),d(document).on("click",NestedPages.selectors.newPageTitle,function(e){e.preventDefault(),r.addTitleField(d(this))}),d(document).on("click",NestedPages.selectors.newPageRemoveTitle,function(e){e.preventDefault(),r.removeTitleField(d(this))}),d(document).on("click",NestedPages.selectors.addChildButton,function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click",NestedPages.selectors.cancelNewChildButton,function(e){e.preventDefault(),r.cancelNewPage()}),d(document).on("click","["+NestedPages.selectors.newBeforeButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click","["+NestedPages.selectors.newAfterButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))})},r.openModal=function(){var e=d(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm);d(e).addClass("in-modal"),d(NestedPages.selectors.newPageModal).find(".modal-body").html(e),d(NestedPages.selectors.newPageModal).find("h3").text(nestedpages.add_multiple),d(NestedPages.selectors.newPageModal).find(".page_parent_id").val(r.parent_id),d(e).find(".np_title").first().focus(),d(e).find(NestedPages.selectors.newPageTitle).first().prop("tabindex","2")},r.openQuickEdit=function(e){var t=d(e).attr(NestedPages.selectors.newBeforeButton);t=void 0!==t&&""!==t&&t;var a=d(e).attr(NestedPages.selectors.newAfterButton);a=void 0!==a&&""!==a&&a;var s=d(e).closest(NestedPages.selectors.row).parent("li"),n=d(NestedPages.selectors.newPageFormContainer).clone();if(0<d(s).children("ol").length){var o=d(s).children("ol");d(n).insertBefore(o)}else d(n).appendTo(s);d(n).siblings(NestedPages.selectors.row).hide(),r.formatter.showQuickEdit(),d(n).find(".parent_name").html("<em>Parent:</em> "+d(e).attr("data-parentname")),t||a||d(n).find(".page_parent_id").val(d(e).attr("data-id")),t&&(d(n).find(".page_before_id").val(t),d(n).find("[data-new-post-relation-title]").text(nestedpages.insert_before+": "+d(e).attr("data-parentname"))),a&&(d(n).find(".page_after_id").val(a),d(n).find("[data-new-post-relation-title]").text(nestedpages.insert_after+": "+d(e).attr("data-parentname"))),d(n).show(),d(n).find(".np_title").focus(),d(n).find(NestedPages.selectors.newPageTitle).prop("tabindex","2")},r.cancelNewPage=function(){r.formatter.removeQuickEdit(),d(NestedPages.selectors.newChildError).hide(),d(NestedPages.selectors.newPageModal).find(".modal-body").empty(),d(NestedPages.selectors.sortable).find(".new-child").remove(),d(NestedPages.selectors.row).show()},r.addTitleField=function(e){var t=d(e).parents("form"),a=d(e).siblings(".new-page-titles").children("li").length+1,s='<li><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg><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="'+a+'" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';d(e).siblings(".new-page-titles").append(s);d(t).find(".np_title").last().focus(),d(t).find(NestedPages.selectors.newPageTitle).prop("tabindex",a++),d(".new-page-titles").sortable({items:"li",handle:".handle"}),r.toggleAddEditButton(t)},r.removeTitleField=function(e){var t=d(e).parents("form");d(e).parents(".new-child-row").parent("li").remove(),r.toggleAddEditButton(t)},r.submitForm=function(e){r.toggleLoading(!0),r.form=d(e).parents("form");var a=!!d(e).hasClass("add-edit"),t=NestedPages.formActions.newPage;""!==d(r.form).find(".page_before_id").val()&&(t=NestedPages.formActions.newBeforeAfter),""!==d(r.form).find(".page_after_id").val()&&(t=NestedPages.formActions.newBeforeAfter),d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:d(r.form).serialize()+"&action="+t+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){if("error"===e.status)return r.toggleLoading(!1),void d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show();if(!0===a){var t=e.new_pages[0].edit_link;return t=t.replace(/&amp;/g,"&"),void window.location.replace(t)}r.toggleLoading(!1),r.posts=e.new_pages,r.addPosts()},error:function(e){console.log(e),r.toggleLoading(!1),d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},r.addPosts=function(){var e=d(r.form).find(".page_before_id").val();e=""!==e&&e;var t=d(r.form).find(".page_after_id").val();t=""!==t&&t;var a=d(r.form).parent(".new-child").parent(".page-row");if(0!==d(a).children("ol").length||e||t||d(a).append('<ol class="nplist"></ol>'),d(r.form).hasClass("in-modal"))var s=d(".nplist.sortable li.page-row:first");else s=d(a).children("ol");for(i=0;i<r.posts.length;i++)r.appendRows(s,r.posts[i],e,t);e||t||d(s).show(),r.formatter.updateSubMenuToggle(),r.formatter.setNestedMargins(),r.cancelNewPage(),d(document).trigger("close-modal-manual")},r.appendRows=function(e,t,a,s){var n='<li id="menuItem_'+t.id+'" class="page-row';if("publish"===t.status&&(n+=" published"),n+='">',NestedPages.jsData.hierarchical?(n+='<div class="row">',n+='<div class="child-toggle"></div>'):(n+='<div class="row non-hierarchical">',n+='<div class="non-hierarchical-spacer"></div>'),n+='<div class="row-inner">',n+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',n+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',n+='<a href="'+t.edit_link+'" class="page-link page-title">',n+='<span class="title">'+t.title+"</span>","Publish"!==t.status?n+='<span class="status">('+t.status+")</span>":n+='<span class="status"></span>',n+='<span class="nav-status">',"hide"===t.np_nav_status&&(n+=" "+nestedpages.hidden),n+="</span>",n+='<span class="edit-indicator">Edit</span>',n+="</a>",NestedPages.jsData.hierarchical||(n+='<div class="np-post-columns">',n+='<ul class="np-post-info">',n+='<li><span class="np-author-display">'+t.author_formatted+"</span></li>",n+="<li>"+t.date_formatted+"</li>",n+="</ul>",n+="</div>"),d(".nplist").first().hasClass("has-yoast")&&(n+='<span class="np-seo-indicator na"></span>'),n+='<div class="action-buttons">',n+='<div class="nestedpages-dropdown" data-dropdown><a href="#" class="np-btn has-icon toggle" data-dropdown-toggle><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></a><ul class="nestedpages-dropdown-content" data-dropdown-content>',n+='<li><a href="#" class="open-redirect-modal" data-parentid="'+t.id+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>'+nestedpages.add_link+"</a></li>",n+='<li><a href="#" class="add-new-child" data-id="'+t.id+'" data-parentname="'+t.title+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'+nestedpages.add_child_short+"</a></li>",n+="</ul></div>",n+='<a href="#" class="np-btn np-quick-edit" data-id="'+t.id+'" data-template="'+t.page_template+'" data-title="'+t.title+'" data-slug="'+t.slug+'" data-commentstatus="closed" data-status="'+t.status.toLowerCase()+'" data-np-status="show"\tdata-navstatus="show" data-author="'+t.author+'" data-template="'+t.template+'" data-month="'+t.month+'" data-day="'+t.day+'" data-year="'+t.year+'" data-hour="'+t.hour+'" data-minute="'+t.minute+'" data-datepicker="'+t.datepicker+'" data-time="'+t.time+'" data-formattedtime="'+t.formattedtime+'" data-ampm="'+t.ampm+'">'+nestedpages.quick_edit+"</a>",n+='<a href="'+t.view_link+'" class="np-btn" target="_blank">'+nestedpages.view+"</a>",n+='<a href="'+t.delete_link+'" class="np-btn np-btn-trash"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-remove"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" class="icon"/><path d="M0 0h24v24H0z" fill="none"/></svg></a>',n+="</div>\x3c!-- .action-buttons --\x3e",n+="</div>\x3c!-- .row-inner --\x3e</div>\x3c!-- .row --\x3e",n+="</li>",a){var o=r.findRowById(a);d(n).insertBefore(o)}else if(s){o=r.findRowById(s);d(n).insertAfter(o)}else d(e).append(n)},r.findRowById=function(e){return d(NestedPages.selectors.rows+"#menuItem_"+e)},r.toggleAddEditButton=function(e){var t=d(e).find(".np_title").length;t<1?d(NestedPages.selectors.newPageSubmitButton).hide():(d(NestedPages.selectors.newPageSubmitButton).show(),1<t?d(NestedPages.selectors.newPageSubmitButton+".add-edit").hide():d(NestedPages.selectors.newPageSubmitButton+".add-edit").show())},r.toggleLoading=function(e){if(e)return d(NestedPages.selectors.quickEditErrorDiv).hide(),d(NestedPages.selectors.newPageSubmitButton).attr("disabled","disabled"),void d(NestedPages.selectors.quickEditLoadingIndicator).show();d(NestedPages.selectors.newPageSubmitButton).attr("disabled",!1),d(NestedPages.selectors.quickEditLoadingIndicator).hide()},r.bindEvents()},(NestedPages=NestedPages||{}).QuickEditPost=function(){var d=this,r=jQuery;return d.formatter=new NestedPages.Formatter,d.button="",d.initialData="",d.parent_li="",d.form="",d.flatTerms="",d.termNames="",d.saveButton="",d.newData="",d.row="",d.init=function(){d.bindEvents()},d.bindEvents=function(){r(document).on("click",NestedPages.selectors.quickEditOpen,function(e){e.preventDefault(),d.button=r(this),d.openForm()}),r(document).on("click",NestedPages.selectors.quickEditCancel,function(e){e.preventDefault(),d.formatter.removeQuickEdit()}),r(document).on("click",NestedPages.selectors.quickEditToggleTaxonomies,function(e){e.preventDefault(),r(this).parents("form").find(".np-taxonomies").toggle()}),r(document).on("click",NestedPages.selectors.quickEditToggleMenuOptions,function(e){e.preventDefault(),r(this).parents("form").find(".np-menuoptions").toggle()}),r(document).on("change",".keep_private",function(){this.checked?r(".post_password").val("").prop("readonly",!0):r(".post_password").prop("readonly",!1)}),r(document).on("click",NestedPages.selectors.quickEditSaveButton,function(e){e.preventDefault(),d.saveButton=r(this),d.save()}),r(document).on("keydown",function(e){27===e.keyCode&&d.formatter.removeQuickEdit()})},d.openForm=function(){d.setInitialData(),d.createForm(),d.populateForm(),d.populateFlatTaxonomies()},d.setInitialData=function(){d.initialData={id:r(d.button).attr("data-id"),title:r(d.button).attr("data-title"),slug:r(d.button).attr("data-slug"),author:r(d.button).attr("data-author"),cs:r(d.button).attr("data-commentstatus"),status:r(d.button).attr("data-status"),template:r(d.button).attr("data-template"),month:r(d.button).attr("data-month"),day:r(d.button).attr("data-day"),year:r(d.button).attr("data-year"),hour:r(d.button).attr("data-hour"),minute:r(d.button).attr("data-minute"),navstatus:r(d.button).attr("data-navstatus"),npstatus:r(d.button).attr("data-np-status"),navtitle:r(d.button).attr("data-navtitle"),navtitleattr:r(d.button).attr("data-navtitleattr"),navcss:r(d.button).attr("data-navcss"),linktarget:r(d.button).attr("data-linktarget"),password:r(d.button).attr("data-password"),datepicker:r(d.button).attr("data-datepicker"),time:r(d.button).attr("data-formattedtime"),timeTwentyFour:r(d.button).attr("data-time"),ampm:r(d.button).attr("data-ampm"),timeFormat:r(d.button).attr("data-timeformat"),sticky:r(d.button).attr("data-sticky")},d.initialData.h_taxonomies=[],d.initialData.f_taxonomies=[],d.parent_li=r(d.button).closest(NestedPages.selectors.row).parent("li");var e=r(d.parent_li).attr("class").split(/\s+/);for(i=0;i<e.length;i++)"in-"===e[i].substring(0,3)&&d.initialData.h_taxonomies.push(e[i]),"inf-"===e[i].substring(0,4)&&d.initialData.f_taxonomies.push(e[i])},d.createForm=function(){if(d.form=r(NestedPages.selectors.quickEditPostForm).clone(),0<r(d.parent_li).children("ol").length){var e=r(d.parent_li).children("ol");r(d.form).insertBefore(e)}else r(d.form).appendTo(d.parent_li);r(d.form).siblings(NestedPages.selectors.row).hide(),r(d.form).show()},d.populateForm=function(){if(r(d.form).find(".page_id").html("<em>ID:</em> "+d.initialData.id),r(d.form).find(".np_id").val(d.initialData.id),r(d.form).find(".np_title").val(d.initialData.title),r(d.form).find(".np_slug").val(d.initialData.slug),r(d.form).find(".np_author select").val(d.initialData.author),r(d.form).find(".np_status").val(d.initialData.status),r(d.form).find(".np_nav_title").val(d.initialData.navtitle),r(d.form).find(".np_title_attribute").val(d.initialData.navtitleattr),r(d.form).find(".np_nav_css_classes").val(d.initialData.navcss),r(d.form).find(".post_password").val(d.initialData.password),r(d.form).find(".np_datepicker").val(d.initialData.datepicker),"open"===d.initialData.cs&&r(d.form).find(".np_cs").attr("checked","checked"),""!==d.initialData.template?r(d.form).find(".np_template").val(d.initialData.template):r(d.form).find(".np_template").val("default"),"private"===d.initialData.status&&(r(d.form).find(".post_password").attr("readonly",!0),r(d.form).find(".keep_private").attr("checked",!0)),"hide"===d.initialData.npstatus?r(d.form).find(".nested_pages_status").attr("checked","checked"):r(d.form).find(".nested_pages_status").removeAttr("checked"),"hide"===d.initialData.navstatus?r(d.form).find(".np_nav_status").attr("checked","checked"):r(d.form).find(".np_nav_status").attr("checked",!1),"_blank"===d.initialData.linktarget?r(d.form).find(".link_target").attr("checked","checked"):r(d.form).find(".link_target").attr("checked",!1),"private"===d.initialData.status&&r(d.form).find(".np_status").val("publish"),"sticky"===d.initialData.sticky?r(d.form).find(".np-sticky").attr("checked","checked"):r(d.form).find(".np-sticky").removeAttr("checked"),"H:i"===d.initialData.timeFormat?r(d.form).find(".np_time").val(d.initialData.timeTwentyFour):(r(d.form).find(".np_time").val(d.initialData.time),r(d.form).find(".np_ampm").val(d.initialData.ampm),r(d.form).find('select[name="mm"]').val(d.initialData.month),r(d.form).find('input[name="jj"]').val(d.initialData.day),r(d.form).find('input[name="aa"]').val(d.initialData.year),r(d.form).find('input[name="hh"]').val(d.initialData.hour),r(d.form).find('input[name="mn"]').val(d.initialData.minute)),d.initialData.hasOwnProperty("h_taxonomies")){var e=d.initialData.h_taxonomies;for(i=0;i<e.length;i++){var t="#"+e[i];r(d.form).find(t).attr("checked","checked")}}r(d.form).find(".np_datepicker").datepicker({beforeShow:function(e,t){r("#ui-datepicker-div").addClass("nestedpages-datepicker")}}),d.formatter.showQuickEdit(),r(d.form).show()},d.populateFlatTaxonomies=function(){d.initialData.hasOwnProperty("f_taxonomies")&&(d.createTaxonomyObject(),d.getTermNames(),d.setWPSuggest())},d.createTaxonomyObject=function(){var e={};for(i=0;i<d.initialData.f_taxonomies.length;i++){var t=d.initialData.f_taxonomies[i],a=t.split("-"),s=a.indexOf("nps"),n=a.splice(s+1);n=n.join("-");var o=t.split("-").splice(0,s);o.shift("inf");var r=o.join("-");r in e||(e[r]=[]),e[r].push(n)}d.flatTerms=e},d.getTermNames=function(){r.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.getTaxonomies,nonce:NestedPages.jsData.nonce,terms:d.flatTerms},success:function(e){d.termNames=e.terms,d.populateFlatTaxonomyFields()}})},d.populateFlatTaxonomyFields=function(){d.termNames&&r.each(d.termNames,function(e,t){var a=r("#"+e+"-quickedit");r(a).val(t.join(","))})},d.setWPSuggest=function(){var e=r(d.form).find("[data-autotag]");r.each(e,function(e,t){var a=r(this).attr("data-taxonomy");r(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},d.save=function(){d.toggleLoading(!0),r.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:r(d.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditPost+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(d.toggleLoading(!1),r(d.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(d.toggleLoading(!1),d.newData=e.post_data,d.updatePostRow())},error:function(e){console.log(e)}})},d.updatePostRow=function(){d.row=r(d.button).parents(".row-inner"),r(d.row).find(".title").text(d.newData.post_title),r(d.row).find(".np-view-button").attr("href",d.newData.permalink);var e=r(d.row).find(".status");if("publish"!==d.newData._status&&"future"!==d.newData._status?r(e).text("("+d.newData._status+")"):"private"===d.newData.keep_private?r(e).text("("+d.newData.keep_private+")"):r(e).text(""),""!==d.newData.post_password&&void 0!==d.newData.post_password){var t=r(e).text();t+=' <span class="locked">',t+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>',t+="</span>",r(e).html(t)}var a=r(d.row).find(".nav-status");"hide"==d.newData.nav_status?r(a).text("(Hidden)"):r(a).text("");var s=r(d.row).parent("li");"hide"==d.newData.np_status?(r(s).addClass("np-hide"),r(d.row).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(r(s).removeClass("np-hide"),r(d.row).find(".status-np-hidden").remove());var n=r(d.row).find(".sticky");"sticky"==d.newData.sticky?r(n).show():r(n).hide(),NestedPages.jsData.hierarchical||r(d.row).find(".np-author-display").text(d.newData.author_name);var o=r(d.row).find(NestedPages.selectors.quickEditOpen);r(o).attr("data-id",d.newData.post_id),r(o).attr("data-template",d.newData.page_template),r(o).attr("data-title",d.newData.post_title),r(o).attr("data-slug",d.newData.post_name),r(o).attr("data-commentstatus",d.newData.comment_status),r(o).attr("data-status",d.newData._status),r(o).attr("data-sticky",d.newData.sticky),"private"===d.newData.keep_private&&r(o).attr("data-status","private"),r(o).attr("data-author",d.newData.post_author),r(o).attr("data-np-status",d.newData.np_status),r(o).attr("data-password",d.newData.post_password),r(o).attr("data-navstatus",d.newData.nav_status),r(o).attr("data-navtitle",d.newData.np_nav_title),r(o).attr("data-linktarget",d.newData.link_target),r(o).attr("data-navtitleattr",d.newData.np_title_attribute),r(o).attr("data-navcss",d.newData.np_nav_css_classes),r(o).attr("data-month",d.newData.mm),r(o).attr("data-day",d.newData.jj),r(o).attr("data-year",d.newData.aa),r(o).attr("data-hour",d.newData.hh),r(o).attr("data-minute",d.newData.mn),r(o).attr("data-datepicker",d.newData.np_date),r(o).attr("data-time",d.newData.np_time),r(o).attr("data-formattedtime",d.newData.np_time),r(o).attr("data-ampm",d.newData.np_ampm),d.removeTaxonomyClasses(),d.addCategoryClasses(),d.addHierarchicalClasses(),d.addFlatClasses(),d.addStatusClass(),d.formatter.removeQuickEdit(),d.formatter.flashRow(d.row)},d.addStatusClass=function(){var e=["published","draft","pending","future"];for(i=0;i<e.length;i++)r(d.row).removeClass(e[i]);r(d.row).addClass(d.newData._status)},d.removeTaxonomyClasses=function(){taxonomies=[];var e=r(d.row).attr("class").split(/\s+/);for(i=0;i<e.length;i++)"in-"===e[i].substring(0,3)&&r(d.row).removeClass(e[i]),"inf-"===e[i].substring(0,4)&&r(d.row).removeClass(e[i])},d.addCategoryClasses=function(){if(d.newData.hasOwnProperty("post_category")){var e=d.newData.post_category;for(i=0;i<e.length;i++){var t="in-category-"+e[i];r(d.row).addClass(t)}}},d.addHierarchicalClasses=function(){if(d.newData.hasOwnProperty("tax_input")){var e=d.newData.tax_input;r.each(e,function(e,t){for(i=0;i<t.length;i++){var a="in-"+e+"-"+t[i];r(d.row).addClass(a)}})}},d.addFlatClasses=function(){if(d.newData.hasOwnProperty("flat_tax")){var e=d.newData.flat_tax;r.each(e,function(e,t){for(i=0;i<t.length;i++){var a="inf-"+e+"-nps-"+t[i];r(d.row).addClass(a)}})}},d.toggleLoading=function(e){if(e)return r(NestedPages.selectors.quickEditErrorDiv).hide(),r(d.saveButton).attr("disabled","disabled"),void r(NestedPages.selectors.quickEditLoadingIndicator).show();r(d.saveButton).attr("disabled",!1),r(NestedPages.selectors.quickEditLoadingIndicator).hide()},d.init()},(NestedPages=NestedPages||{}).QuickEditLink=function(){var o=this,i=jQuery;return o.formatter=new NestedPages.Formatter,o.button="",o.postData="",o.newPostData="",o.form="",o.bindEvents=function(){i(document).on("click",NestedPages.selectors.quickEditButtonLink,function(e){e.preventDefault(),o.formatter.removeQuickEdit(),o.button=i(this),o.openQuickEdit()}),i(document).on("click",NestedPages.selectors.quickEditLinkSaveButton,function(e){e.preventDefault(),o.submitForm()}),i(document).on("keydown",function(e){27===e.keyCode&&o.formatter.removeQuickEdit()})},o.openQuickEdit=function(){o.setData(),o.createForm(),o.populateForm()},o.setData=function(){o.postData={id:i(o.button).attr("data-id"),url:i(o.button).attr("data-url"),title:i(o.button).attr("data-title"),status:i(o.button).attr("data-status"),navstatus:i(o.button).attr("data-navstatus"),npstatus:i(o.button).attr("data-np-status"),linktarget:i(o.button).attr("data-linktarget"),parentid:i(o.button).attr("data-parentid"),navtitleattr:i(o.button).attr("data-navtitleattr"),navcss:i(o.button).attr("data-navcss"),navtype:i(o.button).attr("data-nav-type"),navobject:i(o.button).attr("data-nav-object"),navobjectid:i(o.button).attr("data-nav-object-id"),navoriginallink:i(o.button).attr("data-nav-original-link"),navoriginaltitle:i(o.button).attr("data-nav-original-title")}},o.createForm=function(){var e=i(o.button).closest(NestedPages.selectors.row).parent("li");if(o.form=i(NestedPages.selectors.quickEditLinkForm).clone(),0<i(e).children("ol").length){var t=i(e).children("ol");i(o.form).insertBefore(t)}else i(o.form).appendTo(e);i(o.form).siblings(NestedPages.selectors.row).hide()},o.populateForm=function(){if(i(o.form).find(".np_id").val(o.postData.id),i(o.form).find(".np_title").val(o.postData.title),i(o.form).find(".np_author select").val(o.postData.author),i(o.form).find(".np_status").val(o.postData.status),i(o.form).find(".np_content").val(o.postData.url),i(o.form).find(".np_parent_id").val(o.postData.parentid),i(o.form).find(".np_title_attribute").val(o.postData.navtitleattr),i(o.form).find(".np_nav_css_classes").val(o.postData.navcss),"hide"===o.postData.npstatus?i(o.form).find(".np_status").prop("checked","checked"):i(o.form).find(".np_status").removeAttr("checked"),"hide"===o.postData.navstatus?i(o.form).find(".np_nav_status").prop("checked","checked"):i(o.form).find(".np_nav_status").removeAttr("checked"),"_blank"===o.postData.linktarget?i(o.form).find(".link_target").prop("checked","checked"):i(o.form).find(".link_target").removeAttr("checked"),"custom"!==o.postData.navobject&&""!==o.postData.navobject){var e='<div class="form-control original-link">Original: <a href="'+o.postData.navoriginallink+'" target="_blank">'+o.postData.navoriginaltitle+"</a></div>";i(o.form).find("[data-url-field]").remove(),i(e).insertAfter(i(o.form).find("h3")),i(o.form).find("[data-np-menu-object-input]").val(o.postData.navobject),i(o.form).find("[data-np-menu-objectid-input]").val(o.postData.navobjectid),i(o.form).find("[data-np-menu-type-input]").val(o.postData.navtype),i(o.form).find("h3").text("Link: "+o.postData.navoriginaltitle)}else i(o.form).find("h3").text("Link"),i(o.form).find("[data-np-menu-object-input]").val("custom"),i(o.form).find("[data-np-menu-type-input]").val("custom");o.formatter.showQuickEdit(),i(o.form).show()},o.submitForm=function(){o.toggleLoading(!0),i.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:i(o.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditLink+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(o.toggleLoading(!1),i(o.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(o.toggleLoading(!1),o.newPostData=e.post_data,o.updateRow())},error:function(e){o.toggleLoading(!1),i(o.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},o.updateRow=function(){var e=i(o.form).siblings(".row");i(e).find(".title").html(o.newPostData.post_title+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>');var t=i(e).find(".status");"publish"!==o.newPostData._status&&"future"!==o.newPostData._status?i(t).text("("+o.newPostData._status+")"):i(t).text("");var a=i(e).find(".nav-status");"hide"==o.newPostData.nav_status?i(a).text("("+NestedPages.jsData.hiddenText+")"):i(a).text("");var s=i(e).parent("li");"hide"==o.newPostData.np_status?(i(s).addClass("np-hide"),i(e).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(i(s).removeClass("np-hide"),i(e).find(".status-np-hidden").remove());var n=i(e).find(NestedPages.selectors.quickEditButtonLink);i(n).attr("data-id",o.newPostData.post_id),i(n).attr("data-title",o.newPostData.post_title),i(n).attr("data-url",o.newPostData.post_content),i(n).attr("data-status",o.newPostData._status),i(n).attr("data-navstatus",o.newPostData.nav_status),i(n).attr("data-np-status",o.newPostData.np_status),i(n).attr("data-linkTarget",o.newPostData.linkTarget),i(n).attr("data-navtitleattr",o.newPostData.titleAttribute),i(n).attr("data-navcss",o.newPostData.cssClasses),o.formatter.removeQuickEdit(),o.formatter.flashRow(e)},o.toggleLoading=function(e){if(i(".row").removeClass("np-updated").removeClass("np-updated-show"),e)return i(NestedPages.selectors.quickEditErrorDiv).hide(),i(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled","disabled"),void i(NestedPages.selectors.quickEditLoadingIndicator).show();i(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled",!1),i(NestedPages.selectors.quickEditLoadingIndicator).hide()},o.bindEvents()},(NestedPages=NestedPages||{}).Clone=function(){var t=this,a=jQuery;return t.parent_id="",t.parent_title="",t.parentLi=null,t.formatter=new NestedPages.Formatter,t.bindEvents=function(){a(document).on("click",NestedPages.selectors.cloneButton,function(e){e.preventDefault(),t.parent_id=a(this).attr("data-id"),t.parent_title=a(this).attr("data-parentname"),t.parentLi=a(this).parent(".row").parent(".page-row").parent(".npList"),t.openModal()}),a(document).on("click",NestedPages.selectors.confirmClone,function(e){e.preventDefault(),t.clone()})},t.openModal=function(){a("#"+NestedPages.selectors.cloneModal).find("[data-clone-parent]").text(t.parent_title),a(document).trigger("open-modal-manual",NestedPages.selectors.cloneModal)},t.clone=function(){t.toggleLoading(!0),a.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.clonePost,parent_id:t.parent_id,quantity:a(NestedPages.selectors.cloneQuantity).val(),status:a(NestedPages.selectors.cloneStatus).val(),author:a(NestedPages.selectors.cloneAuthor).find("select").val(),nonce:NestedPages.jsData.nonce,posttype:NestedPages.jsData.posttype},success:function(e){t.toggleLoading(!1),a(document).trigger("close-modal-manual"),location.reload()}})},t.toggleLoading=function(e){if(e)return a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").show(),void a(NestedPages.selectors.confirmClone).attr("disabled","disabled");a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").hide(),a(NestedPages.selectors.confirmClone).attr("disabled",!1)},t.bindEvents()},(NestedPages=NestedPages||{}).Tabs=function(){var t=this,a=jQuery;return t.activeContent="",t.activeButton="",t.init=function(){t.bindEvents()},t.bindEvents=function(){a(document).on("click",NestedPages.selectors.tabButton,function(e){e.preventDefault(),t.activeButton=a(this),t.toggleTabs()})},t.toggleTabs=function(){t.activeContent=a(t.activeButton).attr("href"),a(NestedPages.selectors.tabContent).hide(),a(t.activeContent).show(),a(t.activeButton).parents(NestedPages.selectors.tabButtonParent).find(NestedPages.selectors.tabButton).removeClass("active"),a(t.activeButton).addClass("active")},t.init()},jQuery(document).ready(function(){new NestedPages.Factory}),(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",syncForm:".np-sync-menu-cont",ajaxError:"[data-nestedpages-error]",toggleEditButtons:".np-toggle-edit",bulkActionsHeader:".nestedpages-list-header",bulkActionsForm:"[data-np-bulk-form]",bulkActionsCheckbox:"[data-np-bulk-checkbox]",bulkActionsIds:"[data-np-bulk-ids]",bulkActionRedirectIds:"[data-np-bulk-redirect-ids]",hiddenItemCount:"[data-np-hidden-count]",hiddenItemCountParent:"[data-np-hidden-count-parent]",bulkEditForm:"[data-np-bulk-edit-form]",bulkEditTitles:"[data-np-bulk-titles]",bulkEditRemoveItem:"[data-np-remove-bulk-item]",bulkEditCancel:"[data-np-cancel-bulk-edit]",bulkEditLinkCount:"[data-bulk-edit-link-count]",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",linkDeleteButton:"[data-np-confirm-delete]",linkDeleteConfirmationButton:"[data-delete-confirmation]",linkDeleteConfirmationModal:"np-delete-confirmation-modal",linkDeleteConfirmationModalText:"[data-np-link-delete-text]",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",newBeforeButton:"data-insert-before",newAfterButton:"data-insert-after",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]",thumbnailContainer:".np-thumbnail",thumbnailContainerLink:".np-thumbnail.link",manualMenuSync:"[data-np-manual-menu-sync]",manualOrderSync:"[data-np-manual-order-sync]"},NestedPages.cssClasses={noborder:"no-border"},NestedPages.jsData={ajaxurl:ajaxurl,nonce:nestedpages.np_nonce,allPostTypes:nestedpages.post_types,syncmenu:"nosync",posttype:"",nestable:!0,sortable:!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",newBeforeAfter:"npnewBeforeAfter",quickEditLink:"npquickEditLink",getTaxonomies:"npgetTaxonomies",quickEditPost:"npquickEdit",clonePost:"npclonePost",search:"npmenuSearch",newMenuItem:"npnewMenuItem",manualMenuSync:"npmanualMenuSync",postSearch:"nppostSearch",wpmlTranslations:"npWpmlTranslations",resetSettings:"npresetSettings"},NestedPages.Factory=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.dropdowns=new NestedPages.Dropdowns,t.modals=new NestedPages.Modals,t.checkAll=new NestedPages.CheckAll,t.bulkActions=new NestedPages.BulkActions,t.menuToggle=new NestedPages.MenuToggle,t.pageToggle=new NestedPages.PageToggle,t.nesting=new NestedPages.Nesting,t.syncMenuSetting=new NestedPages.SyncMenuSetting,t.newPage=new NestedPages.NewPost,t.quickEditLink=new NestedPages.QuickEditLink,t.quickEditPost=new NestedPages.QuickEditPost,t.clone=new NestedPages.Clone,t.tabs=new NestedPages.Tabs,t.menuLinks=new NestedPages.MenuLinks,t.hiddenItemCount=new NestedPages.HiddenItemCount,t.confirmDelete=new NestedPages.ConfirmDelete,t.manualSync=new NestedPages.ManualSync,t.postSearch=new NestedPages.PostSearch,t.postMove=new NestedPages.MovePost,t.wpml=new NestedPages.Wpml,t.init=function(){nestedpages.settings_page||(t.bindEvents(),t.setPostType(),t.setMenuSync(),t.setNestable(),t.setSortable(),t.formatter.updateSubMenuToggle(),t.formatter.setBorders(),t.formatter.setNestedMargins(),t.nesting.initializeSortable())},t.bindEvents=function(){e(document).on("click",NestedPages.selectors.quickEditOverlay,function(e){t.formatter.removeQuickEdit(),t.newPage.cancelNewPage()}),e(document).ready(function(){t.formatter.hideAjaxError(),t.formatter.sizeLinkThumbnails()})},t.setNestable=function(){var a=!1;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&(!0===t.hierarchical&&(a=!0),!0===t.disable_nesting&&(a=!1))}),NestedPages.jsData.nestable=a},t.setSortable=function(){var a=!0;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&void 0!==t.disable_sorting&&""!==t.disable_sorting&&"true"===t.disable_sorting&&(a=!1)}),NestedPages.jsData.sortable=a},t.setPostType=function(){NestedPages.jsData.posttype=nestedpages.current_post_type,void 0!==NestedPages.jsData.posttype&&""!==NestedPages.jsData.posttype||(NestedPages.jsData.posttype=e(NestedPages.selectors.sortable).attr("id").substring(3)),NestedPages.jsData.hierarchical=NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical},t.setMenuSync=function(){NestedPages.jsData.syncmenu="1"===nestedpages.syncmenu?"sync":"nosync"},t.init()},(NestedPages=NestedPages||{}).MenuLinks=function(){var a=this,s=jQuery;return a.typeButton="",a.post="",a.formatter=new NestedPages.Formatter,a.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]"},a.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]"},a.search=new NestedPages.MenuSearch,a.init=function(){a.bindEvents()},a.bindEvents=function(){s(document).on("click",NestedPages.selectors.openLinkModal,function(e){e.preventDefault(),a.postParent=s(this).attr("data-parentid"),s(a.selectors.form).find(".parent_id").val(s(this).attr("data-parentid")),a.openModal()}),s(document).on("click",a.selectors.accordionItem,function(e){e.preventDefault(),a.accordion(s(this))}),s(document).on("click",a.selectors.typeSelect,function(e){e.preventDefault(),a.typeButton=s(this),a.setLinkType()}),s(document).on("keyup",a.fields.navigationLabel,function(){a.updateTitle()}),s(document).on("click",a.selectors.saveButton,function(e){e.preventDefault(),a.submitForm()}),s(document).on("keydown",function(e){27===e.keyCode&&s(document).trigger("close-modal-manual")})},a.openModal=function(){s(NestedPages.selectors.linkErrorDiv).hide(),s(NestedPages.selectors.linkModal).find("input").val(""),s(NestedPages.selectors.linkModal).find(".parent_id").val(a.postParent),a.clearForm(),s(a.selectors.accordion).find("ul").hide(),s(a.selectors.typeSelect).removeClass("active"),s(document).trigger("open-modal-manual",NestedPages.selectors.linkModal)},a.accordion=function(e){a.clearForm();var t=s(e).siblings("ul");if(s(t).is(":visible"))return s(e).removeClass("active"),void s(t).slideUp("fast");s(a.selectors.accordionItem).removeClass("active"),s(e).addClass("active"),s(e).parents(a.selectors.accordion).find("ul").slideUp("fast"),s(t).slideDown("fast")},a.setLinkType=function(){s(a.typeButton).hasClass("active")?a.clearForm():(s(a.typeButton).hasClass("np-custom-link")&&(s(a.selectors.accordionItem).removeClass("active"),s(a.selectors.accordion).find("ul").slideUp("fast")),s(a.selectors.formPlaceholder).hide(),a.populateForm())},a.populateForm=function(){s(a.selectors.saveButton).show(),s(a.selectors.typeSelect).removeClass("active"),s(a.typeButton).addClass("active"),s(a.fields.menuTitle).text(s(a.typeButton).text()).val(s(a.typeButton).text()),s(a.selectors.form).find("h3").find("em").text(s(a.typeButton).attr("data-np-object-name")),""!==s(a.typeButton).attr("data-np-permalink")?(s(a.selectors.form).find(a.selectors.urlInputCont).hide(),s(a.selectors.form).find(a.selectors.originalLink).html('<a href="'+s(a.typeButton).attr("data-np-permalink")+'">'+s(a.typeButton).text()+"</a>"),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").show()):(s(a.selectors.form).find(a.selectors.urlInputCont).show(),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").hide()),s(a.fields.object).val(s(a.typeButton).attr("data-np-menu-object")),s(a.fields.objectid).val(s(a.typeButton).attr("data-np-menu-objectid")),s(a.fields.itemType).val(s(a.typeButton).attr("data-np-menu-type")),s(a.selectors.formDetails).show()},a.clearForm=function(){s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.saveButton).hide(),s(a.selectors.formDetails).hide(),s(a.selectors.formPlaceholder).show(),s(a.selectors.form).find("input").not(".parent_id").val(""),s(a.selectors.form).find(a.fields.linkTarget).val("_blank"),s(a.selectors.form).find('input[type="checkbox"]').attr("checked",!1),s(a.selectors.typeSelect).removeClass("active"),a.search.toggleLoading(!1),s(a.selectors.searchResults).remove(),s(a.selectors.defaultResults).show()},a.updateTitle=function(){var e=s(a.fields.navigationLabel).val(),t=s(a.selectors.form).find("h3").find("span");""!==e?(s(a.fields.menuTitle).val(e),s(t).text(e)):(s(a.fields.menuTitle).val(s(a.typeButton).text()),s(t).text(s(a.typeButton).text()))},a.submitForm=function(){a.toggleLoading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:s(a.selectors.form).serialize()+"&action="+NestedPages.formActions.newMenuItem+"&nonce="+NestedPages.jsData.nonce+"&post_type="+NestedPages.jsData.posttype+"&syncmenu="+NestedPages.jsData.syncmenu,success:function(e){a.toggleLoading(!1),"error"!==e.status?(a.post=e.post_data,a.createRow()):s(a.selectors.form).find(a.selectors.errorDiv).text(e.message).show()},error:function(e){console.log(e)}})},a.createRow=function(){var e='<li id="menuItem_'+a.post.id+'" class="page-row published';e+='">',e+='<div class="row"><div class="child-toggle"><div class="child-toggle-spacer"></div></div><div class="row-inner">',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',e+='<a href="'+a.post.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+a.post.menuTitle+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg></span>',e+='</a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ',e+='data-id="'+a.post.id+'"',e+='data-parentid="'+a.post.parent_id+'"',e+='data-title="'+a.post.menuTitle+'" ',e+='data-url="'+a.post.url+'" ',e+='data-status="publish" ',e+='data-np-status="show" ',e+='data-navstatus="show" ',e+='data-navcss="'+a.post.cssClasses+'" ',e+='data-navtitleattr="'+a.post.titleAttribute+'" ',e+='data-nav-type="'+a.post.menuType+'" ',e+='data-nav-object="'+a.post.objectType+'" ',e+='data-nav-object-id="'+a.post.objectId+'" ',e+='data-nav-original-link="'+a.post.original_link+'" ',e+='data-nav-original-title="'+a.post.original_title+'" ',e+='data-linktarget="'+a.post.link_target+'">',e+=NestedPages.jsData.quickEditText,e+="</a>",e+='<a href="'+a.post.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',e+="</div></div></div></li>","0"===a.post.parent_id?s(".nplist:first li:first").after(e):a.appendChildRow(e),s(document).trigger("close-modal-manual"),a.row=s("#menuItem_"+a.post.id).find(".row"),a.formatter.flashRow(a.row)},a.appendChildRow=function(e){var t=s("#menuItem_"+a.post.parent_id);0===s(t).children("ol").length?(e='<ol class="sortable nplist" style="display:block;">'+e+"</ol>",s(t).append(e)):s(t).find("ol:first").prepend(e),a.formatter.updateSubMenuToggle()},a.toggleLoading=function(e){if(e)return s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).show(),void s(a.selectors.saveButton).attr("disabled","disabled");s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).hide(),s(a.selectors.saveButton).attr("disabled",!1)},a.init()},(NestedPages=NestedPages||{}).MenuSearch=function(){var s=this,n=jQuery;return s.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]"},s.activeForm="",s.results="",s.defaultResults="",s.searchType="",s.searchObject="",s.init=function(){s.bindEvents()},s.bindEvents=function(){n(document).on("keyup",s.selectors.searchForms,function(){s.activeForm=n(this),n(s.selectors.searchResults).remove(),s.performSearch()})},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){s.searchType=n(s.activeForm).attr(s.selectors.searchType),s.searchObject=n(s.activeForm).attr(s.selectors.searchObject),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.search,nonce:NestedPages.jsData.nonce,term:n(s.activeForm).val(),searchType:s.searchType,searchObject:s.searchObject},success:function(e){console.log(e),e.results?(s.results=e.results,s.toggleLoading(!1),"post_type"===s.searchType?s.appendPosts():s.appendTaxonomies()):(s.toggleLoading(!1),n(s.activeForm).siblings(s.selectors.noResults).show())}})},s.appendPosts=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.ID+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.singular_name+'" data-np-menu-selection>'+t.post_title+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.appendTaxonomies=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.term_id+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.taxonomy+'" data-np-menu-selection>'+t.name+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).siblings(s.selectors.loadingIndicator);n(s.selectors.noResults).hide(),e?n(t).show():n(t).hide()},s.init()},jQuery(document).ready(function(){new NestedPagesTrash});var NestedPages,NestedPagesTrash=function(){var t=this,a=jQuery;return t.trashButton=".np-empty-trash",t.confirmButton=".np-trash-confirm",t.warningModal="#np-trash-modal",t.errorAlert="#np-error",t.loadingIndicator="#nested-loading",t.trashLinks=".np-trash-links",t.postType=a("#np-trash-posttype").val(),t.nonce=nestedpages.np_nonce,t.formAction="npEmptyTrash",t.bindEvents=function(){a(document).on("click",t.confirmButton,function(e){e.preventDefault(),t.confirmEmpty()})},t.confirmEmpty=function(){t.loading(!0),a(document).trigger("close-modal-manual"),a(t.errorAlert).hide(),t.emptyTrash()},t.emptyTrash=function(){a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:t.formAction,nonce:t.nonce,posttype:t.postType},success:function(e){t.loading(!1),"error"===e.status?a(t.errorAlert).text(e.message).show():(a(t.trashLinks).hide(),a(".notice-dismiss").click())}})},t.loading=function(e){e?a(t.loadingIndicator).show():a(t.loadingIndicator).hide()},t.bindEvents()};(NestedPages=NestedPages||{}).ConfirmDelete=function(){var t=this,a=jQuery;return t.deleteLink="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.linkDeleteButton,function(e){e.preventDefault(),t.confirmSingle(a(this))}),a(document).on("click",NestedPages.selectors.linkDeleteConfirmationButton,function(e){e.preventDefault(),a(this).hasClass("bulk")?t.deleteMultiple():t.deleteSingle()}),a(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){t.confirmMultiple(e)})},t.confirmSingle=function(e){t.deleteLink=a(e).attr("href"),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation_singular),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.delete).removeClass("bulk"),a(document).trigger("open-modal-manual",NestedPages.selectors.linkDeleteConfirmationModal)},t.confirmMultiple=function(e){"trash"===a('select[name="np_bulk_action"]').val()&&(""!==a(NestedPages.selectors.bulkActionRedirectIds).val()&&(e.preventDefault(),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.trash_delete_links).addClass("bulk"),a(document).trigger("open-modal-manual",[NestedPages.selectors.linkDeleteConfirmationModal])))},t.deleteMultiple=function(){a(NestedPages.selectors.bulkActionsForm)[0].submit()},t.deleteSingle=function(){window.location.replace(t.deleteLink)},t.bindEvents()},(NestedPages=NestedPages||{}).ManualSync=function(){var t=this,a=jQuery;return t.activeBtn="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.manualMenuSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncMenu()}),a(document).on("click",NestedPages.selectors.manualOrderSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncOrder()})},t.syncMenu=function(){t.loading(!0),a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.manualMenuSync,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:"sync"},success:function(e){"error"===e.status?(a(NestedPages.selectors.errorDiv).text(e.message).show(),a(NestedPages.selectors.loadingIndicator).hide()):t.loading(!1)}})},t.syncOrder=function(){t.loading(!0),(new NestedPages.Nesting).syncNesting(!0,t.loading(!1))},t.loading=function(e){if(e)return a(t.activeBtn).addClass("disabled"),void a(NestedPages.selectors.loadingIndicator).show();a(t.activeBtn).removeClass("disabled"),a(NestedPages.selectors.loadingIndicator).hide()},t.bindEvents()},(NestedPages=NestedPages||{}).PostSearch=function(){var s=this,n=jQuery;return s.selectors={input:"data-nestedpages-post-search",form:"data-nestedpages-post-search-form",loadingIndicator:"data-nestedpages-loading",noResults:"data-nestedpages-no-results",results:"data-nestedpages-search-results"},s.changed=!1,s.activeInput="",s.results="",s.defaultResults="",s.postType="",s.activeForm="",s.bindEvents=function(){n("["+s.selectors.input+"]").on("input",function(){if(s.activeInput=n(this),s.setOptions(),s.changed||s.setDefaultResults(),""===n(this).val())return n(s.activeForm).find("["+s.selectors.noResults+"]").hide(),void s.showDefaultResults();s.query()})},s.setDefaultResults=function(){s.defaultResults=n(s.activeForm).find("["+s.selectors.results+"]").html(),s.changed=!0},s.showDefaultResults=function(){n(s.activeForm).find("["+s.selectors.results+"]").html(s.defaultResults)},s.setOptions=function(){s.postType=n(s.activeInput).attr(s.selectors.input),s.activeForm=n(s.activeInput).parents("["+s.selectors.form+"]")},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){n(s.activeForm).find("["+s.selectors.results+"]").empty(),s.toggleLoading(!0),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.postSearch,nonce:NestedPages.jsData.nonce,term:n(s.activeInput).val(),postType:s.postType},success:function(e){e.results?(s.results=e.results,s.loadResults(),s.toggleLoading(!1)):(s.toggleLoading(!1),n(s.activeForm).find("["+s.selectors.noResults+"]").show())}})},s.loadResults=function(){var a="<ul>";n.each(s.results,function(e,t){a+='<li><a href="#" data-assignment-page-id="'+t.ID+'" data-assignment-page-title="'+t.post_title+'">'+t.post_title+"</a></li>"}),a+="</ul>",n(s.activeForm).find("["+s.selectors.results+"]").html(a),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).find("["+s.selectors.loadingIndicator+"]"),a=n(s.activeForm).find("["+s.selectors.noResults+"]");n(a).hide(),e?n(t).show():n(t).hide()},s.bindEvents()},(NestedPages=NestedPages||{}).MovePost=function(){var a=this,s=jQuery;return a.formatter=new NestedPages.Formatter,a.nesting=new NestedPages.Nesting,a.activeRow,a.selectors={moveToTop:"data-push-to-top",moveToBottom:"data-push-to-bottom"},a.bindEvents=function(){s(document).ready(function(){a.disableTopOnFirst(),a.disableBottomOnLast()}),s(document).on("click","["+a.selectors.moveToTop+"]",function(e){e.preventDefault(),s(this).hasClass("disabled")||(a.activeRow=s(this).closest(NestedPages.selectors.rows),a.moveToTop())}),s(document).on("click","["+a.selectors.moveToBottom+"]",function(e){e.preventDefault(),s(this).hasClass("disabled")||(a.activeRow=s(this).closest(NestedPages.selectors.rows),a.moveToBottom())})},a.moveToTop=function(){var e=s(a.activeRow).parent(NestedPages.selectors.lists),t=s(e).find(NestedPages.selectors.rows).first();s(a.activeRow).insertBefore(t),a.formatter.setBorders(),s(document).click(),a.nesting.syncNesting(),a.disableTopOnFirst(),a.disableBottomOnLast()},a.moveToBottom=function(){var e=s(a.activeRow).parent(NestedPages.selectors.lists),t=s(e).children(NestedPages.selectors.rows).last();s(a.activeRow).insertAfter(t),a.formatter.setBorders(),s(document).click(),a.nesting.syncNesting(),a.disableTopOnFirst(),a.disableBottomOnLast()},a.disableTopOnFirst=function(){var e=s(NestedPages.selectors.lists);s.each(e,function(){s(this).find("["+a.selectors.moveToTop+"]").removeClass("disabled");var e=s(this).find(NestedPages.selectors.rows).first();s(e).find("["+a.selectors.moveToTop+"]").addClass("disabled")})},a.disableBottomOnLast=function(){var e=s(NestedPages.selectors.lists);s.each(e,function(){s(this).find("["+a.selectors.moveToBottom+"]").removeClass("disabled");var e=s(this).find(NestedPages.selectors.rows).last();s(e).find("["+a.selectors.moveToBottom+"]").addClass("disabled")})},a.bindEvents()},(NestedPages=NestedPages||{}).Wpml=function(){var a=this,o=jQuery;return a.button=null,a.postData=null,a.modal=null,a.parent_li=null,a.formatter=new NestedPages.Formatter,a.selectors={translationsBtn:"data-nestedpages-translations",modal:"data-np-wpml-translations-modal",title:"data-wmpl-translation-title",table:"data-np-wpml-translations-modal-table"},a.bindEvents=function(){nestedpages.wpml&&o(document).on("click","["+a.selectors.translationsBtn+"]",function(e){e.preventDefault(),a.createTranslationsModal(o(this))})},a.createTranslationsModal=function(e){if(a.parent_li=o(e).parents(".action-buttons").closest(NestedPages.selectors.row).parent("li"),a.button=o(a.parent_li).find(NestedPages.selectors.quickEditOpen),a.postData={id:o(a.button).attr("data-id"),title:o(a.button).attr("data-title"),slug:o(a.button).attr("data-slug")},a.modal=o("["+a.selectors.modal+"]").clone(),0<o(a.parent_li).children("ol").length){var t=o(a.parent_li).children("ol");o(a.modal).insertBefore(t)}else o(a.modal).appendTo(a.parent_li);o(a.modal).find("["+a.selectors.title+"]").text(a.postData.title),a.formatter.showQuickEdit(),o(a.modal).show(),a.getTranslationData()},a.getTranslationData=function(){o.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.wpmlTranslations,post_id:a.postData.id,nonce:NestedPages.jsData.nonce},success:function(e){console.log(e),console.log(a.postData.id),"success"===e.status?a.populateModal(e.translations):(o(a.modal).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show(),a.toggleLoading(!1))}})},a.populateModal=function(s){var n="<tbody>";o.each(s,function(e,t){var a=s[e];n+="<tr>",n+='<td><img src="'+a.country_flag_url+'" alt="'+a.translated_name+'" /> '+a.translated_name+"</td>",n+="<td>",a.has_translation&&a.edit_link?n+='<a href="'+a.edit_link+'">'+a.translation.post_title+" ("+nestedpages.edit+")</a>":n+='<a href="'+a.add_link+'" class="np-btn">+ '+nestedpages.add_translation+"</a>",n+="</td>",n+="</tr>"}),n+="</tbody>",o(a.modal).find("["+a.selectors.table+"]").html(n),a.toggleLoading(!1)},a.toggleLoading=function(e){e?o(a.modal).addClass("loading"):o(a.modal).removeClass("loading")},a.bindEvents()};
1
+ (NestedPages=NestedPages||{}).Formatter=function(){var s=this,o=jQuery;s.updateSubMenuToggle=function(){for(var e=o(NestedPages.selectors.childToggle),t=0;t<e.length;t++){var a=e[t],s=o(a).parent(".row").parent("li");if(0<o(s).children("ol").length){if(o(s).children("ol").find("li.page-row").length<1){o(s).children("ol").hide();continue}var n='<div class="child-toggle-spacer"></div>';n+='<a href="#"',0<o(s).children("ol:visible").length&&(n+=' class="open"'),n+='><span class="np-icon-arrow"></span></a>',o(a).html(n),0<o(s).children("ol").children(".np-hide").length&&0===o(s).children("ol").children(".np-hide.shown").length?o(a).find("a").hide():0<o(s).children("ol").children(".np-hide").length&&0<o(s).children("ol").children(".np-hide.shown").length&&o(a).find("a").show()}else o(a).empty().html('<div class="child-toggle-spacer"></div>')}},s.setBorders=function(){o(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder),o.each(o(NestedPages.selectors.lists),function(){o(this).find(".page-row:visible:first").addClass(NestedPages.cssClasses.noborder)})},s.setNestedMargins=function(){o.each(o(NestedPages.selectors.lists),function(e,t){var a=o(this).parents(NestedPages.selectors.lists).length,s=0;if(NestedPages.jsData.sortable||(s=10),0<a){s=20*a+s;o(this).find(".row-inner").css("padding-left",s+"px")}else NestedPages.jsData.sortable&&!o(this).hasClass("no-sort")?o(this).find(".row-inner").css("padding-left","0px"):o(this).find(".row-inner").css("padding-left","10px")})},s.updatePlaceholderWidth=function(e){if(NestedPages.jsData.nestable){var t=40*o(e.placeholder).parents("ol").length-40,a=o(NestedPages.selectors.sortable).width()-t;o(e.placeholder).width(a).css("margin-left",t+"px")}s.updateListVisibility(e)},s.updateListVisibility=function(e){var t=o(e.placeholder).parent("ol");o(t).is(":visible")||(o(t).addClass("nplist"),o(t).show())},s.removeQuickEdit=function(){o(NestedPages.selectors.quickEditOverlay).removeClass("active").remove(),o(".sortable .quick-edit").remove(),o(".row").show()},s.showQuickEdit=function(){o("body").append('<div class="np-inline-overlay"></div>'),setTimeout(function(){o(".np-inline-overlay").addClass("active")},50)},s.flashRow=function(e){o(e).addClass("np-updated"),s.setBorders(),setTimeout(function(){o(e).addClass("np-updated-show")},1500)},s.showAjaxError=function(e){o(NestedPages.selectors.ajaxError).find("p").text(e),o(NestedPages.selectors.ajaxError).show()},s.hideAjaxError=function(e){o(NestedPages.selectors.ajaxError).hide()},s.sizeLinkThumbnails=function(){var e=o(NestedPages.selectors.thumbnailContainer).not(NestedPages.selectors.thumbnailContainerLink).first().find("img"),t=o(e).width(),a=o(e).height();o.each(o(NestedPages.selectors.thumbnailContainerLink),function(){o(this).width(t),o(this).height(a)})}},(NestedPages=NestedPages||{}).Dropdowns=function(){var t=this,a=jQuery;return t.dropdown="",t.activeBtn="",t.activeContent="",t.toggleBtn="[data-dropdown-toggle]",t.dropdownContainer="[data-dropdown]",t.dropdownContent="[data-dropdown-content]",t.selectors={caret_up:"icon-arrow_drop_up",caret_down:"icon-arrow_drop_down"},t.bindEvents=function(){a(document).on("click",t.toggleBtn,function(e){e.preventDefault(),t.activeBtn=a(this),t.dropdown=a(this).parents(t.dropdownContainer),t.toggleDropdown()}),a(document).on("click",function(e){t.closeDropdowns(e.target)}),a(document).on("dropdown-opened",function(e,t){0<a(t).parents(NestedPages.selectors.row).length&&a(t).parents(NestedPages.selectors.row).addClass("active")}),a(document).on("dropdown-closed",function(){a(NestedPages.selectors.row).removeClass("active")})},t.toggleDropdown=function(){a("."+t.selectors.caret_up).attr("class",t.selectors.caret_down);var e=a(t.dropdown).find(t.dropdownContent);if(t.activeContent=e,a(e).hasClass("active"))return a(e).removeClass("active"),a(t.activeBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),void a(document).trigger("dropdown-closed",e);t.setPositioning(),a(t.toggleBtn).removeClass("active"),a(t.dropdownContent).removeClass("active"),a(e).addClass("active"),a(t.activeBtn).find("."+t.selectors.caret_down).attr("class",t.selectors.caret_up),a(t.activeBtn).addClass("active"),a(document).trigger("dropdown-opened",e)},t.setPositioning=function(){var e=a(t.activeBtn).outerHeight();a(t.activeContent).css("top",e+"px")},t.closeDropdowns=function(e){0===a(e).parents(t.dropdownContainer).length&&(a(t.dropdownContent).removeClass("active"),a(t.toggleBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),a(document).trigger("dropdown-closed",void 0))},t.bindEvents()},(NestedPages=NestedPages||{}).Modals=function(){var a=this,s=jQuery;return a.activeBtn="",a.activeModal="",a.modalOpen=!1,a.selectors={toggleBtn:"[data-nestedpages-modal-toggle]",backdrop:"[data-nestedpages-modal-backdrop]",closeBtn:"[data-nestedpages-modal-close]",title:"data-nestedpages-modal-title",content:"data-nestedpages-modal-content"},a.bindEvents=function(){s(document).on("click",a.selectors.toggleBtn,function(e){e.preventDefault(),a.activeBtn=s(this),a.openModal()}),s(document).on("click",a.selectors.closeBtn,function(e){e.preventDefault(),a.closeModals()}),s(document).on("open-modal-manual",function(e,t){a.activeModal=s('[data-nestedpages-modal="'+t+'"]'),a.openModal()}),s(document).on("close-modal-manual",function(e){a.closeModals()}),s(document).on("click",a.selectors.backdrop,function(e){a.closeModals()}),s(document).ready(function(){a.checkHash()})},a.openModal=function(){if(a.modalOpen)a.closeModals();else{if(0<s(a.activeBtn).length){var e=s(a.activeBtn).attr("data-nestedpages-modal-toggle");a.activeModal=s('*[data-nestedpages-modal="'+e+'"]')}s(a.activeModal).addClass("active"),a.modalOpen=!0,a.populateModal(),s(document).trigger("open-modal",[a.activeBtn,a.activeModal])}},a.closeModals=function(){a.modalOpen=!1,s("[data-nestedpages-modal]").removeClass("active"),a.activeModal="",a.activeBtn=""},a.populateModal=function(){var e=s(a.activeBtn).attr(a.selectors.title);void 0!==e&&""!==e&&s(a.activeModal).find("[data-nestedpages-modal-title]").text(e);var t=s(a.activeBtn).attr(a.selectors.content);void 0!==t&&""!==t&&s(a.activeModal).find("[data-nestedpages-modal-content]").html(t)},a.checkHash=function(){if(window.location.hash&&"#modal"===window.location.hash.substring(0,6)){var e=window.location.hash.substring(7);a.activeModal=s('*[data-nestedpages-modal="'+e+'"]'),a.openModal()}},a.bindEvents()},(NestedPages=NestedPages||{}).CheckAll=function(){var s=this,n=jQuery;return s.activeCheckbox="",s.selectors={checkbox:"[data-np-check-all]"},s.bindEvents=function(){n(document).on("change",s.selectors.checkbox,function(){s.activeCheckbox=n(this),s.toggleCheckboxes()}),n(document).on("change","input[type=checkbox]",function(){s.checkAllStatus(n(this))})},s.init=function(){s.bindEvents()},s.toggleCheckboxes=function(){var t=!!n(s.activeCheckbox).is(":checked"),e=n(s.activeCheckbox).attr("data-np-check-all"),a=n('*[name="'+e+'"]');n.each(a,function(){var e=n(this).parents(NestedPages.selectors.rows);n(this).prop("checked",t),n(e).hasClass("np-hide")&&!n(e).is(":visible")&&n(e).find(NestedPages.selectors.bulkActionsCheckbox).prop("checked",!1)}),s.toggleCheckAll()},s.toggleCheckAll=function(){var e=n(s.activeCheckbox).attr("data-np-check-all"),t=n('*[name="'+e+'"]').length;t=t-n(".np-hide").find(NestedPages.selectors.bulkActionsCheckbox).length+n(".np-hide:visible").find(NestedPages.selectors.bulkActionsCheckbox).length;var a=n('*[name="'+e+'"]:checked').length;if(t==a)return n(s.activeCheckbox).prop("checked",!0),void n(s.activeCheckbox).removeClass("check-all-partial");0<a?n(s.activeCheckbox).addClass("check-all-partial"):(n(s.activeCheckbox).attr("checked",!1),n(s.activeCheckbox).removeClass("check-all-partial"))},s.checkAllStatus=function(e){var t=n(e).attr("name"),a=n('*[data-np-check-all="'+t+'"]');0!==a.length&&(s.activeCheckbox=n(a)[0],s.toggleCheckAll())},s.init()},(NestedPages=NestedPages||{}).BulkActions=function(){var o=this,i=jQuery;return o.selectedNumber=0,o.selectedLinks=[],o.selectedPosts=[],o.init=function(){o.bindEvents()},o.bindEvents=function(){i(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){o.toggleBulkForm()}),i(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){"edit"===i("select[name=np_bulk_action]").val()&&(e.preventDefault(),o.toggleBulkEdit(!0))}),i(document).on("click",NestedPages.selectors.bulkEditRemoveItem,function(e){e.preventDefault();var t=i(this).siblings("input[type=hidden]").val();o.uncheckBulkItem(t)}),i(document).on("click",NestedPages.selectors.bulkEditCancel,function(e){e.preventDefault(),o.uncheckAllBulkItems()})},o.toggleBulkForm=function(){var a=!1,s="",n="";if(o.selectedPosts=[],o.selectedLinks=[],i.each(i(NestedPages.selectors.bulkActionsCheckbox),function(){if(i(this).is(":checked")){var e=i(this).parents(NestedPages.selectors.rows);if(a=!0,i(this).parent("div").hasClass("np-check-all")||i(e).hasClass("post-type-np-redirect")||(s+=i(this).val()+","),i(e).hasClass("post-type-np-redirect")&&(n+=i(this).val()+",",o.selectedLinks.push(i(this).val())),"np-redirect"!==i(this).attr("data-np-post-type")&&!i(this).parent("div").hasClass("np-check-all")){var t=[];t.title=i(this).attr("data-np-bulk-checkbox"),t.id=i(this).val(),o.selectedPosts.push(t)}}}),o.setBulkEditPosts(),o.toggleEditOption(),o.toggleLinkCountAlert(),a)return i(NestedPages.selectors.bulkActionsForm).show(),i(NestedPages.selectors.bulkActionsIds).val(s),i(NestedPages.selectors.bulkActionRedirectIds).val(n),void o.setSelectedNumber();i(NestedPages.selectors.bulkActionsIds).val(""),i(NestedPages.selectors.bulkActionsForm).hide()},o.setBulkEditPosts=function(){for(var e="",t=0;t<o.selectedPosts.length;t++)e+='<li><a href="#" class="np-remove" data-np-remove-bulk-item>&times;</a>',e+=o.selectedPosts[t].title,e+='<input type="hidden" name="post_ids[]" value="'+o.selectedPosts[t].id+'"></li>';i(NestedPages.selectors.bulkEditTitles).html(e)},o.uncheckBulkItem=function(e){i.each(i(NestedPages.selectors.bulkActionsCheckbox),function(){i(this).val()==e&&i(this).prop("checked",!1).change()}),0===i(NestedPages.selectors.bulkEditRemoveItem).length&&o.toggleBulkEdit(!1)},o.uncheckAllBulkItems=function(){i.each(i(NestedPages.selectors.bulkActionsCheckbox),function(){i(this).prop("checked",!1).change()}),o.toggleBulkEdit(!1)},o.setSelectedNumber=function(){var e=i(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").length,t=i(NestedPages.selectors.bulkActionsForm).find("select option").first();i(t).text(nestedpages.bulk_actions+" ("+e+")")},o.toggleEditOption=function(){var e=i(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").not(".np-redirect-bulk").length,t=i(NestedPages.selectors.bulkActionsForm).find("select option[value=edit]");if(0===e)return i(t).prop("disabled",!0),i(NestedPages.selectors.bulkActionsForm).find("select option").first().prop("selected",!0),void o.toggleBulkEdit(!1);i(t).prop("disabled",!1)},o.toggleBulkEdit=function(e){if(o.toggleLinkCountAlert(),e)return o.disableParentOptions(),i(NestedPages.selectors.bulkEditForm).show(),i(NestedPages.selectors.bulkActionsForm).hide(),void o.setWPSuggest();i(NestedPages.selectors.bulkEditForm).hide(),i(NestedPages.selectors.bulkActionsForm).show(),i(NestedPages.selectors.bulkEditLinkCount).parent("div").hide(),i(NestedPages.selectors.bulkActionsForm).find("select option").first().text(nestedpages.bulk_actions),o.resetBulkEditFields()},o.toggleLinkCountAlert=function(){0!==o.selectedLinks.length?i(NestedPages.selectors.bulkEditLinkCount).parent("div").show():i(NestedPages.selectors.bulkEditLinkCount).parent("div").hide()},o.disableParentOptions=function(){for(var e=i(NestedPages.selectors.bulkEditForm).find("select[name=post_parent]"),t=0;t<o.selectedPosts.length;t++)i(e).find("option[value="+o.selectedPosts[t].id+"]").attr("disabled",!0)},o.setWPSuggest=function(){var e=i(NestedPages.selectors.bulkEditForm).find("[data-autotag]");i.each(e,function(e,t){var a=i(this).attr("data-taxonomy");i(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},o.resetBulkEditFields=function(){var e=i(NestedPages.selectors.bulkEditForm).find("select");i.each(e,function(){i(this).find("option").first().prop("selected",!0),i(this).find("option").removeAttr("disabled")});var t=i(NestedPages.selectors.bulkEditForm).find(".cat-checklist");i.each(t,function(){i(this).find("input[type=checkbox]").prop("checked",!1)})},o.init()},(NestedPages=NestedPages||{}).HiddenItemCount=function(){var e=this,a=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){a(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.toggleAll,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.pageToggle,function(){e.toggleHiddenCount()})},e.toggleHiddenCount=function(){var t=0;a.each(a(NestedPages.selectors.bulkActionsCheckbox),function(){if(a(this).is(":checked")){if(a(this).parent("div").hasClass("np-check-all"))return;var e=a(this).closest(".page-row");a(e).is(":visible")||t++}}),t<1?a(NestedPages.selectors.hiddenItemCountParent).hide():(a(NestedPages.selectors.hiddenItemCount).text(t),a(NestedPages.selectors.hiddenItemCountParent).show())},e.init()},(NestedPages=NestedPages||{}).MenuToggle=function(){var a=this,n=jQuery;return a.formatter=new NestedPages.Formatter,a.bindEvents=function(){n(document).on("click",NestedPages.selectors.childToggleLink,function(e){e.preventDefault(),a.toggleSingleMenu(n(this))}),n(document).on("click",NestedPages.selectors.toggleAll,function(e){e.preventDefault(),a.toggleAllMenus()})},a.toggleSingleMenu=function(e){var t=n(e).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings("ol");n(e).toggleClass("open"),n(t).toggle(),a.formatter.setBorders(),a.formatter.setNestedMargins(),a.syncUserToggles()},a.toggleAllMenus=function(){var e=NestedPages.selectors.toggleAll;if("closed"===n(e).attr("data-toggle"))return n(NestedPages.selectors.lists).show(),n(e).attr("data-toggle","opened").text(NestedPages.jsData.collapseText),n(NestedPages.selectors.childToggle+" a").addClass("open"),a.formatter.setBorders(),void a.syncUserToggles();n(NestedPages.selectors.lists).not(n(NestedPages.selectors.lists)[0]).hide(),n(e).attr("data-toggle","closed").text(NestedPages.jsData.expandText),n(NestedPages.selectors.childToggle+" a").removeClass("open"),a.formatter.setBorders(),a.syncUserToggles()},a.visibleRowIDs=function(){var s=[],e=n(NestedPages.selectors.rows+":visible");return n.each(e,function(e,t){var a=n(this).attr("id");s.push(a.replace("menuItem_",""))}),s},a.syncUserToggles=function(){n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncToggles,nonce:NestedPages.jsData.nonce,ids:a.visibleRowIDs(),posttype:NestedPages.jsData.posttype},success:function(e){"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},a.bindEvents()},(NestedPages=NestedPages||{}).PageToggle=function(){var a=this,s=jQuery;return a.activeButton="",a.formatter=new NestedPages.Formatter,a.init=function(){a.bindEvents()},a.bindEvents=function(){s(document).on("click",NestedPages.selectors.toggleHidden,function(e){e.preventDefault(),a.activeButton=s(this),a.toggleHidden()}),s(document).on("click",NestedPages.selectors.toggleStatus,function(e){e.preventDefault(),a.toggleStatus(s(this))})},a.toggleHidden=function(){var e=s(a.activeButton),t=s(e).attr("href");if("#show"==t)return s(e).attr("href","#hide").text(NestedPages.jsData.showHiddenText),s(NestedPages.selectors.hiddenRows).removeClass("shown").hide(),a.formatter.updateSubMenuToggle(),void a.formatter.setBorders();"#hide"==t&&(s(e).attr("href","#show").text(NestedPages.jsData.hideHiddenText),s(NestedPages.selectors.hiddenRows).addClass("shown").show(),a.formatter.updateSubMenuToggle(),a.formatter.setBorders())},a.toggleStatus=function(e){var t=s(e).attr("href");t=t.substring(1),s(NestedPages.selectors.syncCheckbox).attr("disabled",!1),s(NestedPages.selectors.toggleStatus).removeClass("active"),s(e).addClass("active"),"draft"==t&&(s(NestedPages.selectors.syncCheckbox).attr("disabled",!0),s("."+t).addClass("nested-visible")),"all"!=t?(s(NestedPages.selectors.rows).hide(),s("."+t).show()):s(NestedPages.selectors.rows).show()},a.init()},(NestedPages=NestedPages||{}).Nesting=function(){var n=this,o=jQuery;n.formatter=new NestedPages.Formatter,n.initializeSortable=function(){if(!NestedPages.jsData.nestable)return n.initializeSortableFlat();o(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({items:NestedPages.selectors.rows,toleranceElement:"> .row",handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",tabSize:56,isAllowed:function(e,t,a){return!(o(t).hasClass("post-type-np-redirect")&&!o(a).hasClass("post-type-np-redirect"))},start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})},n.initializeSortableFlat=function(){var e=o(NestedPages.selectors.lists).not(NestedPages.selectors.notSortable);o.each(e,function(){o(this).sortable({items:">"+NestedPages.selectors.rows,handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",forcePlaceholderSize:!0,start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})})},n.disableNesting=function(){o(NestedPages.selectors.sortable).sortable("destroy")},n.syncNesting=function(e,t){var a;if("1"!==nestedpages.manual_order_sync||e){o(NestedPages.selectors.errorDiv).hide(),o(NestedPages.selectors.loadingIndicator).show(),a=NestedPages.jsData.nestable?o(NestedPages.selectors.sortable).nestedSortable("toHierarchy",{startDepthCount:0}):n.setNestingArray(),n.disableNesting();var s=NestedPages.jsData.syncmenu;"1"===nestedpages.manual_menu_sync&&(s="nosync"),o.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncNesting,nonce:NestedPages.jsData.nonce,list:a,post_type:NestedPages.jsData.posttype,syncmenu:s},success:function(e,t){if(n.initializeSortable(),"error"===e.status)o(NestedPages.selectors.errorDiv).text(e.message).show(),o(NestedPages.selectors.loadingIndicator).hide();else{if(t&&"function"==typeof t)return void t();o(NestedPages.selectors.loadingIndicator).hide()}}})}},n.setNestingArray=function(e){return ret=[],o(NestedPages.selectors.lists).first().children("li.page-row").each(function(){var e=n.recursiveNesting(this);ret.push(e)}),ret},n.recursiveNesting=function(e){var t,a=o(e).attr("id");if(a)return a=a.replace("menuItem_",""),t={id:a},0<o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).length&&(t.children=[],o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).each(function(){var e=n.recursiveNesting(this);t.children.push(e)})),t}},(NestedPages=NestedPages||{}).SyncMenuSetting=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.init=function(){t.bindEvents()},t.bindEvents=function(){e(document).ready(function(){"1"!==nestedpages.manual_menu_sync&&"1"===nestedpages.syncmenu&&t.syncSetting()}),e(document).on("change",NestedPages.selectors.syncCheckbox,function(){t.syncSetting()})},t.syncSetting=function(){"page"===NestedPages.jsData.posttype&&0!==e(NestedPages.selectors.syncCheckbox).length&&(NestedPages.jsData.syncmenu=e(NestedPages.selectors.syncCheckbox).is(":checked")?"sync":"nosync",e.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&&t.formatter.showAjaxError(e.message)},error:function(e){console.log(e)}}))},t.bindEvents()},(NestedPages=NestedPages||{}).NewPost=function(){var r=this,d=jQuery;return r.formatter=new NestedPages.Formatter,r.parent_id=0,r.posts="",r.form="",r.bindEvents=function(){d(document).on("open-modal",function(e,t,a){var s=d(t).attr("data-nestedpages-modal-toggle");void 0!==s&&"np-bulk-modal"==s&&r.openModal()}),d(document).on("submit",NestedPages.selectors.newPageForm,function(e){e.preventDefault()}),d(document).on("click",NestedPages.selectors.newPageSubmitButton,function(e){e.preventDefault(),r.submitForm(d(this))}),d(document).on("click",NestedPages.selectors.newPageTitle,function(e){e.preventDefault(),r.addTitleField(d(this))}),d(document).on("click",NestedPages.selectors.newPageRemoveTitle,function(e){e.preventDefault(),r.removeTitleField(d(this))}),d(document).on("click",NestedPages.selectors.addChildButton,function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click",NestedPages.selectors.cancelNewChildButton,function(e){e.preventDefault(),r.cancelNewPage()}),d(document).on("click","["+NestedPages.selectors.newBeforeButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click","["+NestedPages.selectors.newAfterButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))})},r.openModal=function(){var e=d(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm);d(e).addClass("in-modal"),d(NestedPages.selectors.newPageModal).find(".modal-body").html(e),d(NestedPages.selectors.newPageModal).find("h3").text(nestedpages.add_multiple),d(NestedPages.selectors.newPageModal).find(".page_parent_id").val(r.parent_id),d(e).find(".np_title").first().focus(),d(e).find(NestedPages.selectors.newPageTitle).first().prop("tabindex","2")},r.openQuickEdit=function(e){var t=d(e).attr(NestedPages.selectors.newBeforeButton);t=void 0!==t&&""!==t&&t;var a=d(e).attr(NestedPages.selectors.newAfterButton);a=void 0!==a&&""!==a&&a;var s=d(e).closest(NestedPages.selectors.row).parent("li"),n=d(NestedPages.selectors.newPageFormContainer).clone();if(0<d(s).children("ol").length){var o=d(s).children("ol");d(n).insertBefore(o)}else d(n).appendTo(s);d(n).siblings(NestedPages.selectors.row).hide(),r.formatter.showQuickEdit(),d(n).find(".parent_name").html("<em>Parent:</em> "+d(e).attr("data-parentname")),t||a||d(n).find(".page_parent_id").val(d(e).attr("data-id")),t&&(d(n).find(".page_before_id").val(t),d(n).find("[data-new-post-relation-title]").text(nestedpages.insert_before+": "+d(e).attr("data-parentname"))),a&&(d(n).find(".page_after_id").val(a),d(n).find("[data-new-post-relation-title]").text(nestedpages.insert_after+": "+d(e).attr("data-parentname"))),d(n).show(),d(n).find(".np_title").focus(),d(n).find(NestedPages.selectors.newPageTitle).prop("tabindex","2")},r.cancelNewPage=function(){r.formatter.removeQuickEdit(),d(NestedPages.selectors.newChildError).hide(),d(NestedPages.selectors.newPageModal).find(".modal-body").empty(),d(NestedPages.selectors.sortable).find(".new-child").remove(),d(NestedPages.selectors.row).show()},r.addTitleField=function(e){var t=d(e).parents("form"),a=d(e).siblings(".new-page-titles").children("li").length+1,s='<li><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg><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="'+a+'" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';d(e).siblings(".new-page-titles").append(s);d(t).find(".np_title").last().focus(),d(t).find(NestedPages.selectors.newPageTitle).prop("tabindex",a++),d(".new-page-titles").sortable({items:"li",handle:".handle"}),r.toggleAddEditButton(t)},r.removeTitleField=function(e){var t=d(e).parents("form");d(e).parents(".new-child-row").parent("li").remove(),r.toggleAddEditButton(t)},r.submitForm=function(e){r.toggleLoading(!0),r.form=d(e).parents("form");var a=!!d(e).hasClass("add-edit"),t=NestedPages.formActions.newPage;""!==d(r.form).find(".page_before_id").val()&&(t=NestedPages.formActions.newBeforeAfter),""!==d(r.form).find(".page_after_id").val()&&(t=NestedPages.formActions.newBeforeAfter),d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:d(r.form).serialize()+"&action="+t+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){if("error"===e.status)return r.toggleLoading(!1),void d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show();if(!0===a){var t=e.new_pages[0].edit_link;return t=t.replace(/&amp;/g,"&"),void window.location.replace(t)}r.toggleLoading(!1),r.posts=e.new_pages,r.addPosts()},error:function(e){console.log(e),r.toggleLoading(!1),d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},r.addPosts=function(){var e=d(r.form).find(".page_before_id").val();e=""!==e&&e;var t=d(r.form).find(".page_after_id").val();t=""!==t&&t;var a=d(r.form).parent(".new-child").parent(".page-row");if(0!==d(a).children("ol").length||e||t||d(a).append('<ol class="nplist"></ol>'),d(r.form).hasClass("in-modal"))var s=d(".nplist.sortable li.page-row:first");else s=d(a).children("ol");for(i=0;i<r.posts.length;i++)r.appendRows(s,r.posts[i],e,t);e||t||d(s).show(),r.formatter.updateSubMenuToggle(),r.formatter.setNestedMargins(),r.cancelNewPage(),d(document).trigger("close-modal-manual")},r.appendRows=function(e,t,a,s){var n='<li id="menuItem_'+t.id+'" class="page-row';if("publish"===t.status&&(n+=" published"),n+='">',NestedPages.jsData.hierarchical?(n+='<div class="row">',n+='<div class="child-toggle"></div>'):(n+='<div class="row non-hierarchical">',n+='<div class="non-hierarchical-spacer"></div>'),n+='<div class="row-inner">',n+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',n+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',n+='<a href="'+t.edit_link+'" class="page-link page-title">',n+='<span class="title">'+t.title+"</span>","Publish"!==t.status?n+='<span class="status">('+t.status+")</span>":n+='<span class="status"></span>',n+='<span class="nav-status">',"hide"===t.np_nav_status&&(n+=" "+nestedpages.hidden),n+="</span>",n+='<span class="edit-indicator">Edit</span>',n+="</a>",NestedPages.jsData.hierarchical||(n+='<div class="np-post-columns">',n+='<ul class="np-post-info">',n+='<li><span class="np-author-display">'+t.author_formatted+"</span></li>",n+="<li>"+t.date_formatted+"</li>",n+="</ul>",n+="</div>"),d(".nplist").first().hasClass("has-yoast")&&(n+='<span class="np-seo-indicator na"></span>'),n+='<div class="action-buttons">',n+='<div class="nestedpages-dropdown" data-dropdown><a href="#" class="np-btn has-icon toggle" data-dropdown-toggle><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></a><ul class="nestedpages-dropdown-content" data-dropdown-content>',n+='<li><a href="#" class="open-redirect-modal" data-parentid="'+t.id+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>'+nestedpages.add_link+"</a></li>",n+='<li><a href="#" class="add-new-child" data-id="'+t.id+'" data-parentname="'+t.title+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'+nestedpages.add_child_short+"</a></li>",n+="</ul></div>",n+='<a href="#" class="np-btn np-quick-edit" data-id="'+t.id+'" data-template="'+t.page_template+'" data-title="'+t.title+'" data-slug="'+t.slug+'" data-commentstatus="closed" data-status="'+t.status.toLowerCase()+'" data-np-status="show"\tdata-navstatus="show" data-author="'+t.author+'" data-template="'+t.template+'" data-month="'+t.month+'" data-day="'+t.day+'" data-year="'+t.year+'" data-hour="'+t.hour+'" data-minute="'+t.minute+'" data-datepicker="'+t.datepicker+'" data-time="'+t.time+'" data-formattedtime="'+t.formattedtime+'" data-ampm="'+t.ampm+'">'+nestedpages.quick_edit+"</a>",n+='<a href="'+t.view_link+'" class="np-btn" target="_blank">'+nestedpages.view+"</a>",n+='<a href="'+t.delete_link+'" class="np-btn np-btn-trash"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-remove"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" class="icon"/><path d="M0 0h24v24H0z" fill="none"/></svg></a>',n+="</div>\x3c!-- .action-buttons --\x3e",n+="</div>\x3c!-- .row-inner --\x3e</div>\x3c!-- .row --\x3e",n+="</li>",a){var o=r.findRowById(a);d(n).insertBefore(o)}else if(s){o=r.findRowById(s);d(n).insertAfter(o)}else d(e).append(n)},r.findRowById=function(e){return d(NestedPages.selectors.rows+"#menuItem_"+e)},r.toggleAddEditButton=function(e){var t=d(e).find(".np_title").length;t<1?d(NestedPages.selectors.newPageSubmitButton).hide():(d(NestedPages.selectors.newPageSubmitButton).show(),1<t?d(NestedPages.selectors.newPageSubmitButton+".add-edit").hide():d(NestedPages.selectors.newPageSubmitButton+".add-edit").show())},r.toggleLoading=function(e){if(e)return d(NestedPages.selectors.quickEditErrorDiv).hide(),d(NestedPages.selectors.newPageSubmitButton).attr("disabled","disabled"),void d(NestedPages.selectors.quickEditLoadingIndicator).show();d(NestedPages.selectors.newPageSubmitButton).attr("disabled",!1),d(NestedPages.selectors.quickEditLoadingIndicator).hide()},r.bindEvents()},(NestedPages=NestedPages||{}).QuickEditPost=function(){var d=this,r=jQuery;return d.formatter=new NestedPages.Formatter,d.button="",d.initialData="",d.parent_li="",d.form="",d.flatTerms="",d.termNames="",d.saveButton="",d.newData="",d.row="",d.init=function(){d.bindEvents()},d.bindEvents=function(){r(document).on("click",NestedPages.selectors.quickEditOpen,function(e){e.preventDefault(),d.button=r(this),d.openForm()}),r(document).on("click",NestedPages.selectors.quickEditCancel,function(e){e.preventDefault(),d.formatter.removeQuickEdit()}),r(document).on("click",NestedPages.selectors.quickEditToggleTaxonomies,function(e){e.preventDefault(),r(this).parents("form").find(".np-taxonomies").toggle()}),r(document).on("click",NestedPages.selectors.quickEditToggleMenuOptions,function(e){e.preventDefault(),r(this).parents("form").find(".np-menuoptions").toggle()}),r(document).on("change",".keep_private",function(){this.checked?r(".post_password").val("").prop("readonly",!0):r(".post_password").prop("readonly",!1)}),r(document).on("click",NestedPages.selectors.quickEditSaveButton,function(e){e.preventDefault(),d.saveButton=r(this),d.save()}),r(document).on("keydown",function(e){27===e.keyCode&&d.formatter.removeQuickEdit()})},d.openForm=function(){d.setInitialData(),d.createForm(),d.populateForm(),d.populateFlatTaxonomies()},d.setInitialData=function(){d.initialData={id:r(d.button).attr("data-id"),title:r(d.button).attr("data-title"),slug:r(d.button).attr("data-slug"),author:r(d.button).attr("data-author"),cs:r(d.button).attr("data-commentstatus"),status:r(d.button).attr("data-status"),template:r(d.button).attr("data-template"),month:r(d.button).attr("data-month"),day:r(d.button).attr("data-day"),year:r(d.button).attr("data-year"),hour:r(d.button).attr("data-hour"),minute:r(d.button).attr("data-minute"),navstatus:r(d.button).attr("data-navstatus"),npstatus:r(d.button).attr("data-np-status"),navtitle:r(d.button).attr("data-navtitle"),navtitleattr:r(d.button).attr("data-navtitleattr"),navcss:r(d.button).attr("data-navcss"),linktarget:r(d.button).attr("data-linktarget"),password:r(d.button).attr("data-password"),datepicker:r(d.button).attr("data-datepicker"),time:r(d.button).attr("data-formattedtime"),timeTwentyFour:r(d.button).attr("data-time"),ampm:r(d.button).attr("data-ampm"),timeFormat:r(d.button).attr("data-timeformat"),sticky:r(d.button).attr("data-sticky")},d.initialData.h_taxonomies=[],d.initialData.f_taxonomies=[],d.parent_li=r(d.button).closest(NestedPages.selectors.row).parent("li");var e=r(d.parent_li).attr("class").split(/\s+/);for(i=0;i<e.length;i++)"in-"===e[i].substring(0,3)&&d.initialData.h_taxonomies.push(e[i]),"inf-"===e[i].substring(0,4)&&d.initialData.f_taxonomies.push(e[i])},d.createForm=function(){if(d.form=r(NestedPages.selectors.quickEditPostForm).clone(),0<r(d.parent_li).children("ol").length){var e=r(d.parent_li).children("ol");r(d.form).insertBefore(e)}else r(d.form).appendTo(d.parent_li);r(d.form).siblings(NestedPages.selectors.row).hide(),r(d.form).show()},d.populateForm=function(){if(r(d.form).find(".page_id").html("<em>ID:</em> "+d.initialData.id),r(d.form).find(".np_id").val(d.initialData.id),r(d.form).find(".np_title").val(d.initialData.title),r(d.form).find(".np_slug").val(d.initialData.slug),r(d.form).find(".np_author select").val(d.initialData.author),r(d.form).find(".np_status").val(d.initialData.status),r(d.form).find(".np_nav_title").val(d.initialData.navtitle),r(d.form).find(".np_title_attribute").val(d.initialData.navtitleattr),r(d.form).find(".np_nav_css_classes").val(d.initialData.navcss),r(d.form).find(".post_password").val(d.initialData.password),r(d.form).find(".np_datepicker").val(d.initialData.datepicker),"open"===d.initialData.cs&&r(d.form).find(".np_cs").attr("checked","checked"),""!==d.initialData.template?r(d.form).find(".np_template").val(d.initialData.template):r(d.form).find(".np_template").val("default"),"private"===d.initialData.status&&(r(d.form).find(".post_password").attr("readonly",!0),r(d.form).find(".keep_private").attr("checked",!0)),"hide"===d.initialData.npstatus?r(d.form).find(".nested_pages_status").attr("checked","checked"):r(d.form).find(".nested_pages_status").removeAttr("checked"),"hide"===d.initialData.navstatus?r(d.form).find(".np_nav_status").attr("checked","checked"):r(d.form).find(".np_nav_status").attr("checked",!1),"_blank"===d.initialData.linktarget?r(d.form).find(".link_target").attr("checked","checked"):r(d.form).find(".link_target").attr("checked",!1),"private"===d.initialData.status&&r(d.form).find(".np_status").val("publish"),"sticky"===d.initialData.sticky?r(d.form).find(".np-sticky").attr("checked","checked"):r(d.form).find(".np-sticky").removeAttr("checked"),"H:i"===d.initialData.timeFormat?r(d.form).find(".np_time").val(d.initialData.timeTwentyFour):(r(d.form).find(".np_time").val(d.initialData.time),r(d.form).find(".np_ampm").val(d.initialData.ampm),r(d.form).find('select[name="mm"]').val(d.initialData.month),r(d.form).find('input[name="jj"]').val(d.initialData.day),r(d.form).find('input[name="aa"]').val(d.initialData.year),r(d.form).find('input[name="hh"]').val(d.initialData.hour),r(d.form).find('input[name="mn"]').val(d.initialData.minute)),d.initialData.hasOwnProperty("h_taxonomies")){var e=d.initialData.h_taxonomies;for(i=0;i<e.length;i++){var t="#"+e[i];r(d.form).find(t).attr("checked","checked")}}r(d.form).find(".np_datepicker").datepicker({beforeShow:function(e,t){r("#ui-datepicker-div").addClass("nestedpages-datepicker")}}),d.formatter.showQuickEdit(),r(d.form).show()},d.populateFlatTaxonomies=function(){d.initialData.hasOwnProperty("f_taxonomies")&&(d.createTaxonomyObject(),d.getTermNames(),d.setWPSuggest())},d.createTaxonomyObject=function(){var e={};for(i=0;i<d.initialData.f_taxonomies.length;i++){var t=d.initialData.f_taxonomies[i],a=t.split("-"),s=a.indexOf("nps"),n=a.splice(s+1);n=n.join("-");var o=t.split("-").splice(0,s);o.shift("inf");var r=o.join("-");r in e||(e[r]=[]),e[r].push(n)}d.flatTerms=e},d.getTermNames=function(){r.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.getTaxonomies,nonce:NestedPages.jsData.nonce,terms:d.flatTerms},success:function(e){d.termNames=e.terms,d.populateFlatTaxonomyFields()}})},d.populateFlatTaxonomyFields=function(){d.termNames&&r.each(d.termNames,function(e,t){var a=r("#"+e+"-quickedit");r(a).val(t.join(","))})},d.setWPSuggest=function(){var e=r(d.form).find("[data-autotag]");r.each(e,function(e,t){var a=r(this).attr("data-taxonomy");r(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},d.save=function(){d.toggleLoading(!0),r.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:r(d.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditPost+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(d.toggleLoading(!1),r(d.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(d.toggleLoading(!1),d.newData=e.post_data,d.updatePostRow())},error:function(e){console.log(e)}})},d.updatePostRow=function(){d.row=r(d.button).parents(".row-inner"),r(d.row).find(".title").text(d.newData.post_title),r(d.row).find(".np-view-button").attr("href",d.newData.permalink);var e=r(d.row).find(".status");if("publish"!==d.newData._status&&"future"!==d.newData._status?r(e).text("("+d.newData._status+")"):"private"===d.newData.keep_private?r(e).text("("+d.newData.keep_private+")"):r(e).text(""),""!==d.newData.post_password&&void 0!==d.newData.post_password){var t=r(e).text();t+=' <span class="locked">',t+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>',t+="</span>",r(e).html(t)}var a=r(d.row).find(".nav-status");"hide"==d.newData.nav_status?r(a).text("(Hidden)"):r(a).text("");var s=r(d.row).parent("li");"hide"==d.newData.np_status?(r(s).addClass("np-hide"),r(d.row).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(r(s).removeClass("np-hide"),r(d.row).find(".status-np-hidden").remove());var n=r(d.row).find(".sticky");"sticky"==d.newData.sticky?r(n).show():r(n).hide(),NestedPages.jsData.hierarchical||r(d.row).find(".np-author-display").text(d.newData.author_name);var o=r(d.row).find(NestedPages.selectors.quickEditOpen);r(o).attr("data-id",d.newData.post_id),r(o).attr("data-template",d.newData.page_template),r(o).attr("data-title",d.newData.post_title),r(o).attr("data-slug",d.newData.post_name),r(o).attr("data-commentstatus",d.newData.comment_status),r(o).attr("data-status",d.newData._status),r(o).attr("data-sticky",d.newData.sticky),"private"===d.newData.keep_private&&r(o).attr("data-status","private"),r(o).attr("data-author",d.newData.post_author),r(o).attr("data-np-status",d.newData.np_status),r(o).attr("data-password",d.newData.post_password),r(o).attr("data-navstatus",d.newData.nav_status),r(o).attr("data-navtitle",d.newData.np_nav_title),r(o).attr("data-linktarget",d.newData.link_target),r(o).attr("data-navtitleattr",d.newData.np_title_attribute),r(o).attr("data-navcss",d.newData.np_nav_css_classes),r(o).attr("data-month",d.newData.mm),r(o).attr("data-day",d.newData.jj),r(o).attr("data-year",d.newData.aa),r(o).attr("data-hour",d.newData.hh),r(o).attr("data-minute",d.newData.mn),r(o).attr("data-datepicker",d.newData.np_date),r(o).attr("data-time",d.newData.np_time),r(o).attr("data-formattedtime",d.newData.np_time),r(o).attr("data-ampm",d.newData.np_ampm),d.removeTaxonomyClasses(),d.addCategoryClasses(),d.addHierarchicalClasses(),d.addFlatClasses(),d.addStatusClass(),d.formatter.removeQuickEdit(),d.formatter.flashRow(d.row)},d.addStatusClass=function(){var e=["published","draft","pending","future"];for(i=0;i<e.length;i++)r(d.row).removeClass(e[i]);r(d.row).addClass(d.newData._status)},d.removeTaxonomyClasses=function(){taxonomies=[];var e=r(d.row).attr("class").split(/\s+/);for(i=0;i<e.length;i++)"in-"===e[i].substring(0,3)&&r(d.row).removeClass(e[i]),"inf-"===e[i].substring(0,4)&&r(d.row).removeClass(e[i])},d.addCategoryClasses=function(){if(d.newData.hasOwnProperty("post_category")){var e=d.newData.post_category;for(i=0;i<e.length;i++){var t="in-category-"+e[i];r(d.row).addClass(t)}}},d.addHierarchicalClasses=function(){if(d.newData.hasOwnProperty("tax_input")){var e=d.newData.tax_input;r.each(e,function(e,t){for(i=0;i<t.length;i++){var a="in-"+e+"-"+t[i];r(d.row).addClass(a)}})}},d.addFlatClasses=function(){if(d.newData.hasOwnProperty("flat_tax")){var e=d.newData.flat_tax;r.each(e,function(e,t){for(i=0;i<t.length;i++){var a="inf-"+e+"-nps-"+t[i];r(d.row).addClass(a)}})}},d.toggleLoading=function(e){if(e)return r(NestedPages.selectors.quickEditErrorDiv).hide(),r(d.saveButton).attr("disabled","disabled"),void r(NestedPages.selectors.quickEditLoadingIndicator).show();r(d.saveButton).attr("disabled",!1),r(NestedPages.selectors.quickEditLoadingIndicator).hide()},d.init()},(NestedPages=NestedPages||{}).QuickEditLink=function(){var o=this,i=jQuery;return o.formatter=new NestedPages.Formatter,o.button="",o.postData="",o.newPostData="",o.form="",o.bindEvents=function(){i(document).on("click",NestedPages.selectors.quickEditButtonLink,function(e){e.preventDefault(),o.formatter.removeQuickEdit(),o.button=i(this),o.openQuickEdit()}),i(document).on("click",NestedPages.selectors.quickEditLinkSaveButton,function(e){e.preventDefault(),o.submitForm()}),i(document).on("keydown",function(e){27===e.keyCode&&o.formatter.removeQuickEdit()})},o.openQuickEdit=function(){o.setData(),o.createForm(),o.populateForm()},o.setData=function(){o.postData={id:i(o.button).attr("data-id"),url:i(o.button).attr("data-url"),title:i(o.button).attr("data-title"),status:i(o.button).attr("data-status"),navstatus:i(o.button).attr("data-navstatus"),npstatus:i(o.button).attr("data-np-status"),linktarget:i(o.button).attr("data-linktarget"),parentid:i(o.button).attr("data-parentid"),navtitleattr:i(o.button).attr("data-navtitleattr"),navcss:i(o.button).attr("data-navcss"),navtype:i(o.button).attr("data-nav-type"),navobject:i(o.button).attr("data-nav-object"),navobjectid:i(o.button).attr("data-nav-object-id"),navoriginallink:i(o.button).attr("data-nav-original-link"),navoriginaltitle:i(o.button).attr("data-nav-original-title")}},o.createForm=function(){var e=i(o.button).closest(NestedPages.selectors.row).parent("li");if(o.form=i(NestedPages.selectors.quickEditLinkForm).clone(),0<i(e).children("ol").length){var t=i(e).children("ol");i(o.form).insertBefore(t)}else i(o.form).appendTo(e);i(o.form).siblings(NestedPages.selectors.row).hide()},o.populateForm=function(){if(i(o.form).find(".np_id").val(o.postData.id),i(o.form).find(".np_title").val(o.postData.title),i(o.form).find(".np_author select").val(o.postData.author),i(o.form).find(".np_status").val(o.postData.status),i(o.form).find(".np_content").val(o.postData.url),i(o.form).find(".np_parent_id").val(o.postData.parentid),i(o.form).find(".np_title_attribute").val(o.postData.navtitleattr),i(o.form).find(".np_nav_css_classes").val(o.postData.navcss),"hide"===o.postData.npstatus?i(o.form).find(".np_status").prop("checked","checked"):i(o.form).find(".np_status").removeAttr("checked"),"hide"===o.postData.navstatus?i(o.form).find(".np_nav_status").prop("checked","checked"):i(o.form).find(".np_nav_status").removeAttr("checked"),"_blank"===o.postData.linktarget?i(o.form).find(".link_target").prop("checked","checked"):i(o.form).find(".link_target").removeAttr("checked"),"custom"!==o.postData.navobject&&""!==o.postData.navobject){var e='<div class="form-control original-link">Original: <a href="'+o.postData.navoriginallink+'" target="_blank">'+o.postData.navoriginaltitle+"</a></div>";i(o.form).find("[data-url-field]").remove(),i(e).insertAfter(i(o.form).find("h3")),i(o.form).find("[data-np-menu-object-input]").val(o.postData.navobject),i(o.form).find("[data-np-menu-objectid-input]").val(o.postData.navobjectid),i(o.form).find("[data-np-menu-type-input]").val(o.postData.navtype),i(o.form).find("h3").text("Link: "+o.postData.navoriginaltitle)}else i(o.form).find("h3").text("Link"),i(o.form).find("[data-np-menu-object-input]").val("custom"),i(o.form).find("[data-np-menu-type-input]").val("custom");o.formatter.showQuickEdit(),i(o.form).show()},o.submitForm=function(){o.toggleLoading(!0),i.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:i(o.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditLink+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(o.toggleLoading(!1),i(o.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(o.toggleLoading(!1),o.newPostData=e.post_data,o.updateRow())},error:function(e){o.toggleLoading(!1),i(o.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},o.updateRow=function(){var e=i(o.form).siblings(".row");i(e).find(".title").html(o.newPostData.post_title+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>');var t=i(e).find(".status");"publish"!==o.newPostData._status&&"future"!==o.newPostData._status?i(t).text("("+o.newPostData._status+")"):i(t).text("");var a=i(e).find(".nav-status");"hide"==o.newPostData.nav_status?i(a).text("("+NestedPages.jsData.hiddenText+")"):i(a).text("");var s=i(e).parent("li");"hide"==o.newPostData.np_status?(i(s).addClass("np-hide"),i(e).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(i(s).removeClass("np-hide"),i(e).find(".status-np-hidden").remove());var n=i(e).find(NestedPages.selectors.quickEditButtonLink);i(n).attr("data-id",o.newPostData.post_id),i(n).attr("data-title",o.newPostData.post_title),i(n).attr("data-url",o.newPostData.post_content),i(n).attr("data-status",o.newPostData._status),i(n).attr("data-navstatus",o.newPostData.nav_status),i(n).attr("data-np-status",o.newPostData.np_status),i(n).attr("data-linkTarget",o.newPostData.linkTarget),i(n).attr("data-navtitleattr",o.newPostData.titleAttribute),i(n).attr("data-navcss",o.newPostData.cssClasses),o.formatter.removeQuickEdit(),o.formatter.flashRow(e)},o.toggleLoading=function(e){if(i(".row").removeClass("np-updated").removeClass("np-updated-show"),e)return i(NestedPages.selectors.quickEditErrorDiv).hide(),i(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled","disabled"),void i(NestedPages.selectors.quickEditLoadingIndicator).show();i(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled",!1),i(NestedPages.selectors.quickEditLoadingIndicator).hide()},o.bindEvents()},(NestedPages=NestedPages||{}).Clone=function(){var t=this,a=jQuery;return t.parent_id="",t.parent_title="",t.parentLi=null,t.formatter=new NestedPages.Formatter,t.bindEvents=function(){a(document).on("click",NestedPages.selectors.cloneButton,function(e){e.preventDefault(),t.parent_id=a(this).attr("data-id"),t.parent_title=a(this).attr("data-parentname"),t.parentLi=a(this).parent(".row").parent(".page-row").parent(".npList"),t.openModal()}),a(document).on("click",NestedPages.selectors.confirmClone,function(e){e.preventDefault(),t.clone()})},t.openModal=function(){a("#"+NestedPages.selectors.cloneModal).find("[data-clone-parent]").text(t.parent_title),a(document).trigger("open-modal-manual",NestedPages.selectors.cloneModal)},t.clone=function(){t.toggleLoading(!0),a.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.clonePost,parent_id:t.parent_id,quantity:a(NestedPages.selectors.cloneQuantity).val(),status:a(NestedPages.selectors.cloneStatus).val(),author:a(NestedPages.selectors.cloneAuthor).find("select").val(),nonce:NestedPages.jsData.nonce,posttype:NestedPages.jsData.posttype},success:function(e){t.toggleLoading(!1),a(document).trigger("close-modal-manual"),location.reload()}})},t.toggleLoading=function(e){if(e)return a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").show(),void a(NestedPages.selectors.confirmClone).attr("disabled","disabled");a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").hide(),a(NestedPages.selectors.confirmClone).attr("disabled",!1)},t.bindEvents()},(NestedPages=NestedPages||{}).Tabs=function(){var t=this,a=jQuery;return t.activeContent="",t.activeButton="",t.init=function(){t.bindEvents()},t.bindEvents=function(){a(document).on("click",NestedPages.selectors.tabButton,function(e){e.preventDefault(),t.activeButton=a(this),t.toggleTabs()})},t.toggleTabs=function(){t.activeContent=a(t.activeButton).attr("href"),a(NestedPages.selectors.tabContent).hide(),a(t.activeContent).show(),a(t.activeButton).parents(NestedPages.selectors.tabButtonParent).find(NestedPages.selectors.tabButton).removeClass("active"),a(t.activeButton).addClass("active")},t.init()},jQuery(document).ready(function(){new NestedPages.Factory}),(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",syncForm:".np-sync-menu-cont",ajaxError:"[data-nestedpages-error]",toggleEditButtons:".np-toggle-edit",bulkActionsHeader:".nestedpages-list-header",bulkActionsForm:"[data-np-bulk-form]",bulkActionsCheckbox:"[data-np-bulk-checkbox]",bulkActionsIds:"[data-np-bulk-ids]",bulkActionRedirectIds:"[data-np-bulk-redirect-ids]",hiddenItemCount:"[data-np-hidden-count]",hiddenItemCountParent:"[data-np-hidden-count-parent]",bulkEditForm:"[data-np-bulk-edit-form]",bulkEditTitles:"[data-np-bulk-titles]",bulkEditRemoveItem:"[data-np-remove-bulk-item]",bulkEditCancel:"[data-np-cancel-bulk-edit]",bulkEditLinkCount:"[data-bulk-edit-link-count]",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",linkDeleteButton:"[data-np-confirm-delete]",linkDeleteConfirmationButton:"[data-delete-confirmation]",linkDeleteConfirmationModal:"np-delete-confirmation-modal",linkDeleteConfirmationModalText:"[data-np-link-delete-text]",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",newBeforeButton:"data-insert-before",newAfterButton:"data-insert-after",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]",thumbnailContainer:".np-thumbnail",thumbnailContainerLink:".np-thumbnail.link",manualMenuSync:"[data-np-manual-menu-sync]",manualOrderSync:"[data-np-manual-order-sync]"},NestedPages.cssClasses={noborder:"no-border"},NestedPages.jsData={ajaxurl:ajaxurl,nonce:nestedpages.np_nonce,allPostTypes:nestedpages.post_types,syncmenu:"nosync",posttype:"",nestable:!0,sortable:!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",newBeforeAfter:"npnewBeforeAfter",quickEditLink:"npquickEditLink",getTaxonomies:"npgetTaxonomies",quickEditPost:"npquickEdit",clonePost:"npclonePost",search:"npmenuSearch",newMenuItem:"npnewMenuItem",manualMenuSync:"npmanualMenuSync",postSearch:"nppostSearch",wpmlTranslations:"npWpmlTranslations",resetSettings:"npresetSettings",resetUserPrefs:"npresetUserPreferences"},NestedPages.Factory=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.dropdowns=new NestedPages.Dropdowns,t.modals=new NestedPages.Modals,t.checkAll=new NestedPages.CheckAll,t.bulkActions=new NestedPages.BulkActions,t.menuToggle=new NestedPages.MenuToggle,t.pageToggle=new NestedPages.PageToggle,t.nesting=new NestedPages.Nesting,t.syncMenuSetting=new NestedPages.SyncMenuSetting,t.newPage=new NestedPages.NewPost,t.quickEditLink=new NestedPages.QuickEditLink,t.quickEditPost=new NestedPages.QuickEditPost,t.clone=new NestedPages.Clone,t.tabs=new NestedPages.Tabs,t.menuLinks=new NestedPages.MenuLinks,t.hiddenItemCount=new NestedPages.HiddenItemCount,t.confirmDelete=new NestedPages.ConfirmDelete,t.manualSync=new NestedPages.ManualSync,t.postSearch=new NestedPages.PostSearch,t.postMove=new NestedPages.MovePost,t.wpml=new NestedPages.Wpml,t.init=function(){nestedpages.settings_page||(t.bindEvents(),t.setPostType(),t.setMenuSync(),t.setNestable(),t.setSortable(),t.formatter.updateSubMenuToggle(),t.formatter.setBorders(),t.formatter.setNestedMargins(),t.nesting.initializeSortable())},t.bindEvents=function(){e(document).on("click",NestedPages.selectors.quickEditOverlay,function(e){t.formatter.removeQuickEdit(),t.newPage.cancelNewPage()}),e(document).ready(function(){t.formatter.hideAjaxError(),t.formatter.sizeLinkThumbnails()})},t.setNestable=function(){var a=!1;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&(!0===t.hierarchical&&(a=!0),!0===t.disable_nesting&&(a=!1))}),NestedPages.jsData.nestable=a},t.setSortable=function(){var a=!0;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&void 0!==t.disable_sorting&&""!==t.disable_sorting&&"true"===t.disable_sorting&&(a=!1)}),NestedPages.jsData.sortable=a},t.setPostType=function(){NestedPages.jsData.posttype=nestedpages.current_post_type,void 0!==NestedPages.jsData.posttype&&""!==NestedPages.jsData.posttype||(NestedPages.jsData.posttype=e(NestedPages.selectors.sortable).attr("id").substring(3)),NestedPages.jsData.hierarchical=NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical},t.setMenuSync=function(){NestedPages.jsData.syncmenu="1"===nestedpages.syncmenu?"sync":"nosync"},t.init()},(NestedPages=NestedPages||{}).MenuLinks=function(){var a=this,s=jQuery;return a.typeButton="",a.post="",a.formatter=new NestedPages.Formatter,a.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]"},a.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]"},a.search=new NestedPages.MenuSearch,a.init=function(){a.bindEvents()},a.bindEvents=function(){s(document).on("click",NestedPages.selectors.openLinkModal,function(e){e.preventDefault(),a.postParent=s(this).attr("data-parentid"),s(a.selectors.form).find(".parent_id").val(s(this).attr("data-parentid")),a.openModal()}),s(document).on("click",a.selectors.accordionItem,function(e){e.preventDefault(),a.accordion(s(this))}),s(document).on("click",a.selectors.typeSelect,function(e){e.preventDefault(),a.typeButton=s(this),a.setLinkType()}),s(document).on("keyup",a.fields.navigationLabel,function(){a.updateTitle()}),s(document).on("click",a.selectors.saveButton,function(e){e.preventDefault(),a.submitForm()}),s(document).on("keydown",function(e){27===e.keyCode&&s(document).trigger("close-modal-manual")})},a.openModal=function(){s(NestedPages.selectors.linkErrorDiv).hide(),s(NestedPages.selectors.linkModal).find("input").val(""),s(NestedPages.selectors.linkModal).find(".parent_id").val(a.postParent),a.clearForm(),s(a.selectors.accordion).find("ul").hide(),s(a.selectors.typeSelect).removeClass("active"),s(document).trigger("open-modal-manual",NestedPages.selectors.linkModal)},a.accordion=function(e){a.clearForm();var t=s(e).siblings("ul");if(s(t).is(":visible"))return s(e).removeClass("active"),void s(t).slideUp("fast");s(a.selectors.accordionItem).removeClass("active"),s(e).addClass("active"),s(e).parents(a.selectors.accordion).find("ul").slideUp("fast"),s(t).slideDown("fast")},a.setLinkType=function(){s(a.typeButton).hasClass("active")?a.clearForm():(s(a.typeButton).hasClass("np-custom-link")&&(s(a.selectors.accordionItem).removeClass("active"),s(a.selectors.accordion).find("ul").slideUp("fast")),s(a.selectors.formPlaceholder).hide(),a.populateForm())},a.populateForm=function(){s(a.selectors.saveButton).show(),s(a.selectors.typeSelect).removeClass("active"),s(a.typeButton).addClass("active"),s(a.fields.menuTitle).text(s(a.typeButton).text()).val(s(a.typeButton).text()),s(a.selectors.form).find("h3").find("em").text(s(a.typeButton).attr("data-np-object-name")),""!==s(a.typeButton).attr("data-np-permalink")?(s(a.selectors.form).find(a.selectors.urlInputCont).hide(),s(a.selectors.form).find(a.selectors.originalLink).html('<a href="'+s(a.typeButton).attr("data-np-permalink")+'">'+s(a.typeButton).text()+"</a>"),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").show()):(s(a.selectors.form).find(a.selectors.urlInputCont).show(),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").hide()),s(a.fields.object).val(s(a.typeButton).attr("data-np-menu-object")),s(a.fields.objectid).val(s(a.typeButton).attr("data-np-menu-objectid")),s(a.fields.itemType).val(s(a.typeButton).attr("data-np-menu-type")),s(a.selectors.formDetails).show()},a.clearForm=function(){s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.saveButton).hide(),s(a.selectors.formDetails).hide(),s(a.selectors.formPlaceholder).show(),s(a.selectors.form).find("input").not(".parent_id").val(""),s(a.selectors.form).find(a.fields.linkTarget).val("_blank"),s(a.selectors.form).find('input[type="checkbox"]').attr("checked",!1),s(a.selectors.typeSelect).removeClass("active"),a.search.toggleLoading(!1),s(a.selectors.searchResults).remove(),s(a.selectors.defaultResults).show()},a.updateTitle=function(){var e=s(a.fields.navigationLabel).val(),t=s(a.selectors.form).find("h3").find("span");""!==e?(s(a.fields.menuTitle).val(e),s(t).text(e)):(s(a.fields.menuTitle).val(s(a.typeButton).text()),s(t).text(s(a.typeButton).text()))},a.submitForm=function(){a.toggleLoading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:s(a.selectors.form).serialize()+"&action="+NestedPages.formActions.newMenuItem+"&nonce="+NestedPages.jsData.nonce+"&post_type="+NestedPages.jsData.posttype+"&syncmenu="+NestedPages.jsData.syncmenu,success:function(e){a.toggleLoading(!1),"error"!==e.status?(a.post=e.post_data,a.createRow()):s(a.selectors.form).find(a.selectors.errorDiv).text(e.message).show()},error:function(e){console.log(e)}})},a.createRow=function(){var e='<li id="menuItem_'+a.post.id+'" class="page-row published';e+='">',e+='<div class="row"><div class="child-toggle"><div class="child-toggle-spacer"></div></div><div class="row-inner">',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',e+='<a href="'+a.post.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+a.post.menuTitle+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg></span>',e+='</a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ',e+='data-id="'+a.post.id+'"',e+='data-parentid="'+a.post.parent_id+'"',e+='data-title="'+a.post.menuTitle+'" ',e+='data-url="'+a.post.url+'" ',e+='data-status="publish" ',e+='data-np-status="show" ',e+='data-navstatus="show" ',e+='data-navcss="'+a.post.cssClasses+'" ',e+='data-navtitleattr="'+a.post.titleAttribute+'" ',e+='data-nav-type="'+a.post.menuType+'" ',e+='data-nav-object="'+a.post.objectType+'" ',e+='data-nav-object-id="'+a.post.objectId+'" ',e+='data-nav-original-link="'+a.post.original_link+'" ',e+='data-nav-original-title="'+a.post.original_title+'" ',e+='data-linktarget="'+a.post.link_target+'">',e+=NestedPages.jsData.quickEditText,e+="</a>",e+='<a href="'+a.post.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',e+="</div></div></div></li>","0"===a.post.parent_id?s(".nplist:first li:first").after(e):a.appendChildRow(e),s(document).trigger("close-modal-manual"),a.row=s("#menuItem_"+a.post.id).find(".row"),a.formatter.flashRow(a.row)},a.appendChildRow=function(e){var t=s("#menuItem_"+a.post.parent_id);0===s(t).children("ol").length?(e='<ol class="sortable nplist" style="display:block;">'+e+"</ol>",s(t).append(e)):s(t).find("ol:first").prepend(e),a.formatter.updateSubMenuToggle()},a.toggleLoading=function(e){if(e)return s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).show(),void s(a.selectors.saveButton).attr("disabled","disabled");s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).hide(),s(a.selectors.saveButton).attr("disabled",!1)},a.init()},(NestedPages=NestedPages||{}).MenuSearch=function(){var s=this,n=jQuery;return s.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]"},s.activeForm="",s.results="",s.defaultResults="",s.searchType="",s.searchObject="",s.init=function(){s.bindEvents()},s.bindEvents=function(){n(document).on("keyup",s.selectors.searchForms,function(){s.activeForm=n(this),n(s.selectors.searchResults).remove(),s.performSearch()})},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){s.searchType=n(s.activeForm).attr(s.selectors.searchType),s.searchObject=n(s.activeForm).attr(s.selectors.searchObject),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.search,nonce:NestedPages.jsData.nonce,term:n(s.activeForm).val(),searchType:s.searchType,searchObject:s.searchObject},success:function(e){console.log(e),e.results?(s.results=e.results,s.toggleLoading(!1),"post_type"===s.searchType?s.appendPosts():s.appendTaxonomies()):(s.toggleLoading(!1),n(s.activeForm).siblings(s.selectors.noResults).show())}})},s.appendPosts=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.ID+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.singular_name+'" data-np-menu-selection>'+t.post_title+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.appendTaxonomies=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.term_id+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.taxonomy+'" data-np-menu-selection>'+t.name+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).siblings(s.selectors.loadingIndicator);n(s.selectors.noResults).hide(),e?n(t).show():n(t).hide()},s.init()},jQuery(document).ready(function(){new NestedPagesTrash});var NestedPages,NestedPagesTrash=function(){var t=this,a=jQuery;return t.trashButton=".np-empty-trash",t.confirmButton=".np-trash-confirm",t.warningModal="#np-trash-modal",t.errorAlert="#np-error",t.loadingIndicator="#nested-loading",t.trashLinks=".np-trash-links",t.postType=a("#np-trash-posttype").val(),t.nonce=nestedpages.np_nonce,t.formAction="npEmptyTrash",t.bindEvents=function(){a(document).on("click",t.confirmButton,function(e){e.preventDefault(),t.confirmEmpty()})},t.confirmEmpty=function(){t.loading(!0),a(document).trigger("close-modal-manual"),a(t.errorAlert).hide(),t.emptyTrash()},t.emptyTrash=function(){a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:t.formAction,nonce:t.nonce,posttype:t.postType},success:function(e){t.loading(!1),"error"===e.status?a(t.errorAlert).text(e.message).show():(a(t.trashLinks).hide(),a(".notice-dismiss").click())}})},t.loading=function(e){e?a(t.loadingIndicator).show():a(t.loadingIndicator).hide()},t.bindEvents()};(NestedPages=NestedPages||{}).ConfirmDelete=function(){var t=this,a=jQuery;return t.deleteLink="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.linkDeleteButton,function(e){e.preventDefault(),t.confirmSingle(a(this))}),a(document).on("click",NestedPages.selectors.linkDeleteConfirmationButton,function(e){e.preventDefault(),a(this).hasClass("bulk")?t.deleteMultiple():t.deleteSingle()}),a(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){t.confirmMultiple(e)})},t.confirmSingle=function(e){t.deleteLink=a(e).attr("href"),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation_singular),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.delete).removeClass("bulk"),a(document).trigger("open-modal-manual",NestedPages.selectors.linkDeleteConfirmationModal)},t.confirmMultiple=function(e){"trash"===a('select[name="np_bulk_action"]').val()&&(""!==a(NestedPages.selectors.bulkActionRedirectIds).val()&&(e.preventDefault(),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.trash_delete_links).addClass("bulk"),a(document).trigger("open-modal-manual",[NestedPages.selectors.linkDeleteConfirmationModal])))},t.deleteMultiple=function(){a(NestedPages.selectors.bulkActionsForm)[0].submit()},t.deleteSingle=function(){window.location.replace(t.deleteLink)},t.bindEvents()},(NestedPages=NestedPages||{}).ManualSync=function(){var t=this,a=jQuery;return t.activeBtn="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.manualMenuSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncMenu()}),a(document).on("click",NestedPages.selectors.manualOrderSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncOrder()})},t.syncMenu=function(){t.loading(!0),a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.manualMenuSync,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:"sync"},success:function(e){"error"===e.status?(a(NestedPages.selectors.errorDiv).text(e.message).show(),a(NestedPages.selectors.loadingIndicator).hide()):t.loading(!1)}})},t.syncOrder=function(){t.loading(!0),(new NestedPages.Nesting).syncNesting(!0,t.loading(!1))},t.loading=function(e){if(e)return a(t.activeBtn).addClass("disabled"),void a(NestedPages.selectors.loadingIndicator).show();a(t.activeBtn).removeClass("disabled"),a(NestedPages.selectors.loadingIndicator).hide()},t.bindEvents()},(NestedPages=NestedPages||{}).PostSearch=function(){var s=this,n=jQuery;return s.selectors={input:"data-nestedpages-post-search",form:"data-nestedpages-post-search-form",loadingIndicator:"data-nestedpages-loading",noResults:"data-nestedpages-no-results",results:"data-nestedpages-search-results"},s.changed=!1,s.activeInput="",s.results="",s.defaultResults="",s.postType="",s.activeForm="",s.bindEvents=function(){n("["+s.selectors.input+"]").on("input",function(){if(s.activeInput=n(this),s.setOptions(),s.changed||s.setDefaultResults(),""===n(this).val())return n(s.activeForm).find("["+s.selectors.noResults+"]").hide(),void s.showDefaultResults();s.query()})},s.setDefaultResults=function(){s.defaultResults=n(s.activeForm).find("["+s.selectors.results+"]").html(),s.changed=!0},s.showDefaultResults=function(){n(s.activeForm).find("["+s.selectors.results+"]").html(s.defaultResults)},s.setOptions=function(){s.postType=n(s.activeInput).attr(s.selectors.input),s.activeForm=n(s.activeInput).parents("["+s.selectors.form+"]")},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){n(s.activeForm).find("["+s.selectors.results+"]").empty(),s.toggleLoading(!0),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.postSearch,nonce:NestedPages.jsData.nonce,term:n(s.activeInput).val(),postType:s.postType},success:function(e){e.results?(s.results=e.results,s.loadResults(),s.toggleLoading(!1)):(s.toggleLoading(!1),n(s.activeForm).find("["+s.selectors.noResults+"]").show())}})},s.loadResults=function(){var a="<ul>";n.each(s.results,function(e,t){a+='<li><a href="#" data-assignment-page-id="'+t.ID+'" data-assignment-page-title="'+t.post_title+'">'+t.post_title+"</a></li>"}),a+="</ul>",n(s.activeForm).find("["+s.selectors.results+"]").html(a),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).find("["+s.selectors.loadingIndicator+"]"),a=n(s.activeForm).find("["+s.selectors.noResults+"]");n(a).hide(),e?n(t).show():n(t).hide()},s.bindEvents()},(NestedPages=NestedPages||{}).MovePost=function(){var a=this,s=jQuery;return a.formatter=new NestedPages.Formatter,a.nesting=new NestedPages.Nesting,a.activeRow,a.selectors={moveToTop:"data-push-to-top",moveToBottom:"data-push-to-bottom"},a.bindEvents=function(){s(document).ready(function(){a.disableTopOnFirst(),a.disableBottomOnLast()}),s(document).on("click","["+a.selectors.moveToTop+"]",function(e){e.preventDefault(),s(this).hasClass("disabled")||(a.activeRow=s(this).closest(NestedPages.selectors.rows),a.moveToTop())}),s(document).on("click","["+a.selectors.moveToBottom+"]",function(e){e.preventDefault(),s(this).hasClass("disabled")||(a.activeRow=s(this).closest(NestedPages.selectors.rows),a.moveToBottom())})},a.moveToTop=function(){var e=s(a.activeRow).parent(NestedPages.selectors.lists),t=s(e).find(NestedPages.selectors.rows).first();s(a.activeRow).insertBefore(t),a.formatter.setBorders(),s(document).click(),a.nesting.syncNesting(),a.disableTopOnFirst(),a.disableBottomOnLast()},a.moveToBottom=function(){var e=s(a.activeRow).parent(NestedPages.selectors.lists),t=s(e).children(NestedPages.selectors.rows).last();s(a.activeRow).insertAfter(t),a.formatter.setBorders(),s(document).click(),a.nesting.syncNesting(),a.disableTopOnFirst(),a.disableBottomOnLast()},a.disableTopOnFirst=function(){var e=s(NestedPages.selectors.lists);s.each(e,function(){s(this).find("["+a.selectors.moveToTop+"]").removeClass("disabled");var e=s(this).find(NestedPages.selectors.rows).first();s(e).find("["+a.selectors.moveToTop+"]").addClass("disabled")})},a.disableBottomOnLast=function(){var e=s(NestedPages.selectors.lists);s.each(e,function(){s(this).find("["+a.selectors.moveToBottom+"]").removeClass("disabled");var e=s(this).find(NestedPages.selectors.rows).last();s(e).find("["+a.selectors.moveToBottom+"]").addClass("disabled")})},a.bindEvents()},(NestedPages=NestedPages||{}).Wpml=function(){var a=this,o=jQuery;return a.button=null,a.postData=null,a.modal=null,a.parent_li=null,a.formatter=new NestedPages.Formatter,a.selectors={translationsBtn:"data-nestedpages-translations",modal:"data-np-wpml-translations-modal",title:"data-wmpl-translation-title",table:"data-np-wpml-translations-modal-table"},a.bindEvents=function(){nestedpages.wpml&&o(document).on("click","["+a.selectors.translationsBtn+"]",function(e){e.preventDefault(),a.createTranslationsModal(o(this))})},a.createTranslationsModal=function(e){if(a.parent_li=o(e).parents(".action-buttons").closest(NestedPages.selectors.row).parent("li"),a.button=o(a.parent_li).find(NestedPages.selectors.quickEditOpen),a.postData={id:o(a.button).attr("data-id"),title:o(a.button).attr("data-title"),slug:o(a.button).attr("data-slug")},a.modal=o("["+a.selectors.modal+"]").clone(),0<o(a.parent_li).children("ol").length){var t=o(a.parent_li).children("ol");o(a.modal).insertBefore(t)}else o(a.modal).appendTo(a.parent_li);o(a.modal).find("["+a.selectors.title+"]").text(a.postData.title),a.formatter.showQuickEdit(),o(a.modal).show(),a.getTranslationData()},a.getTranslationData=function(){o.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.wpmlTranslations,post_id:a.postData.id,nonce:NestedPages.jsData.nonce},success:function(e){console.log(e),console.log(a.postData.id),"success"===e.status?a.populateModal(e.translations):(o(a.modal).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show(),a.toggleLoading(!1))}})},a.populateModal=function(s){var n="<tbody>";o.each(s,function(e,t){var a=s[e];n+="<tr>",n+='<td><img src="'+a.country_flag_url+'" alt="'+a.translated_name+'" /> '+a.translated_name+"</td>",n+="<td>",a.has_translation&&a.edit_link?n+='<a href="'+a.edit_link+'">'+a.translation.post_title+" ("+nestedpages.edit+")</a>":n+='<a href="'+a.add_link+'" class="np-btn">+ '+nestedpages.add_translation+"</a>",n+="</td>",n+="</tr>"}),n+="</tbody>",o(a.modal).find("["+a.selectors.table+"]").html(n),a.toggleLoading(!1)},a.toggleLoading=function(e){e?o(a.modal).addClass("loading"):o(a.modal).removeClass("loading")},a.bindEvents()};
assets/js/nestedpages.settings.min.js CHANGED
@@ -1 +1 @@
1
- var NestedPages;(NestedPages=NestedPages||{}).SettingsReset=function(){var t=this,s=jQuery;return t.selectors={resetButton:"data-nestedpages-reset-settings",resetForm:".nestedpages-reset-settings",formComplete:".nestedpages-reset-settings-complete"},t.bindEvents=function(){s(document).on("click","["+t.selectors.resetButton+"]",function(e){e.preventDefault(),t.resetSettings()})},t.resetSettings=function(){t.loading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.resetSettings,nonce:NestedPages.jsData.nonce},success:function(e){t.loading(!1),s(t.selectors.resetForm).hide(),s(t.selectors.formComplete).show(),"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},t.loading=function(e){e?s("["+t.selectors.resetButton+"]").attr("disabled",!0):s("["+t.selectors.resetButton+"]").removeAttr("disabled")},t.bindEvents()},new NestedPages.SettingsReset,(NestedPages=NestedPages||{}).Settings=function(){var i=this,a=jQuery;return i.selectors={postTypeToggle:"[data-toggle-nestedpages-pt-settings]",postTypeCheckbox:"[data-nestedpages-settings-row-checkbox]",customFieldsCheckbox:"[data-toggle-nestedpages-cf-settings]",standardFieldsCheckbox:"[data-toggle-nestedpages-sf-settings]",taxonomiesFieldCheckbox:"[data-hide-taxonomies]",thumbnailsCheckbox:"[data-enable-thumbnails]",menuEnabledOption:"[data-menu-enabled-option]",disableMenuCheckbox:"[data-disable-menu-checkbox]",disableAutoCheckbox:"[data-menu-disable-auto-checkbox]",assignPostTypeCheckbox:"[data-nestedpages-assign-post-type]",assignPostTypeId:"[data-nested-pages-assign-post-type-id]",assignPostTypeTitle:"[data-nested-pages-assign-post-type-title]",assignPostTypeOption:"[data-assignment-page-id]",assignPostTypeRemove:"[data-nestedpages-page-pt-assignment-remove]",assignPostTypeSelection:"[data-nestedpages-page-pt-assignment-selection]",sortOptionCheckbox:"[data-nestedpages-sort-option-checkbox]",defaultSortOptions:"[data-nestedpages-sort-option-default]"},i.bindEvents=function(){a(document).ready(function(){i.toggleAllSettingsButtons(),i.toogleAllFieldSettings(".custom-fields"),i.toogleAllFieldSettings(".standard-fields"),i.toggleMenuCheckboxes(),i.toggleHideCheckbox(),i.toggleAssignPostType(),i.toggleAllDefaultSortOptions()}),a(document).on("click",i.selectors.postTypeToggle,function(e){e.preventDefault(),i.toggleRow(a(this))}),a(document).on("change",i.selectors.postTypeCheckbox,function(){i.toggleSettingsButton(a(this))}),a(document).on("change",i.selectors.customFieldsCheckbox,function(){i.toogleFieldSettings(a(this),".custom-fields")}),a(document).on("change",i.selectors.standardFieldsCheckbox,function(){i.toogleFieldSettings(a(this),".standard-fields")}),a(document).on("change",i.selectors.taxonomiesFieldCheckbox,function(){i.toggleTaxonomyCheckboxes(a(this))}),a(document).on("change",i.selectors.thumbnailsCheckbox,function(){i.toggleThumbnailSettings(a(this))}),a(document).on("change",i.selectors.disableMenuCheckbox,function(){i.toggleMenuCheckboxes()}),a(document).on("change",i.selectors.disableAutoCheckbox,function(){i.toggleHideCheckbox()}),a(document).on("change",i.selectors.assignPostTypeCheckbox,function(){i.toggleAssignPostType()}),a(document).on("click",i.selectors.assignPostTypeOption,function(e){e.preventDefault(),i.chooseAssignPostType(a(this))}),a(document).on("click",i.selectors.assignPostTypeRemove,function(e){e.preventDefault(),i.removeAssignPostType(a(this))}),a(document).on("change",i.selectors.sortOptionCheckbox,function(){i.toggleDefaultSortOptions(a(this))})},i.toggleRow=function(e){a(e).parent(".head").siblings(".body").toggle(),a(e).parents(".row-container").toggleClass("active")},i.toggleSettingsButton=function(e){var t=a(e).parents(".head").find(i.selectors.postTypeToggle);if(a(e).is(":checked"))return a(t).show(),void a(t).parents(".head").siblings(".body").find('input[type="hidden"]').attr("disabled",!1);a(t).hide(),a(t).parents(".head").siblings(".body").hide(),a(t).parents(".row-container").removeClass("active"),a(t).parents(".head").siblings(".body").find('input[type="checkbox"]').attr("checked",!1),a(t).parents(".head").siblings(".body").find('input[type="hidden"]').attr("disabled",!0),a(t).parents(".head").siblings(".body").find("select").val(!1)},i.toggleAllSettingsButtons=function(){var e=a(i.selectors.postTypeCheckbox);a.each(e,function(){i.toggleSettingsButton(a(this))})},i.toogleFieldSettings=function(e,t){var s=a(e).parents(".body").find(t);a(e).is(":checked")?a(s).show():a(s).hide()},i.toogleAllFieldSettings=function(e){var t=a(i.selectors.customFieldsCheckbox);if(".standard-fields"==e)t=a(i.selectors.standardFieldsCheckbox);a.each(t,function(){i.toogleFieldSettings(a(this),e)})},i.toggleTaxonomyCheckboxes=function(e){var t=a(e).parents("ul").find(a("*[data-taxonomy-single]"));a(e).is(":checked")?a(t).hide():a(t).show()},i.toggleThumbnailSettings=function(e){var t=a(e).parents(".field").find(a("*[data-thumbnail-options]"));a(e).is(":checked")?a(t).show():a(t).hide()},i.toggleMenuCheckboxes=function(){var e=a(i.selectors.disableMenuCheckbox),t=a(i.selectors.menuEnabledOption);a(e).is(":checked")?a(t).hide():a(t).show()},i.toggleHideCheckbox=function(){var e=a(i.selectors.disableAutoCheckbox),t=a("[data-menu-hide-checkbox]");a(e).is(":checked")?a(t).hide():a(t).show()},i.toggleAssignPostType=function(){var e=a(i.selectors.assignPostTypeCheckbox);a.each(e,function(){var e=a(this),t=a(this).parents(".field").find(".nestedpages-assignment-display");a(e).is(":checked")?a(t).show():a(t).hide()})},i.chooseAssignPostType=function(e){var t=a(e).attr("data-assignment-page-id"),s=a(e).attr("data-assignment-page-title"),o=a(e).parents(".field"),n=nestedpages.currently_assigned_to+" "+s+' <a href="#" data-nestedpages-page-pt-assignment-remove>('+nestedpages.remove+")</a>";a(o).find(i.selectors.assignPostTypeId).val(t),a(o).find(i.selectors.assignPostTypeTitle).val(s),a(o).find(i.selectors.assignPostTypeSelection).html(n).show(),a(o).find("[data-nestedpages-post-search-form]").hide()},i.removeAssignPostType=function(e){var t=a(e).parents(".field");a(t).find(i.selectors.assignPostTypeSelection).hide(),a(t).find("[data-nestedpages-post-search-form]").show(),a(t).find(i.selectors.assignPostTypeId).val(""),a(t).find(i.selectors.assignPostTypeTitle).val("")},i.toggleAllDefaultSortOptions=function(){var e=a(i.selectors.sortOptionCheckbox);a.each(e,function(){i.toggleDefaultSortOptions(a(this))})},i.toggleDefaultSortOptions=function(e){var t=!!a(e).is(":checked"),s=a(e).parent("label").next(i.selectors.defaultSortOptions);a(s).length<1||(t?a(s).show():a(s).hide())},i.bindEvents()},new NestedPages.Settings;
1
+ var NestedPages;(NestedPages=NestedPages||{}).SettingsReset=function(){var t=this,s=jQuery;return t.selectors={resetButton:"data-nestedpages-reset-settings",resetForm:".nestedpages-reset-settings",formComplete:".nestedpages-reset-settings-complete"},t.bindEvents=function(){s(document).on("click","["+t.selectors.resetButton+"]",function(e){e.preventDefault(),t.resetSettings()})},t.resetSettings=function(){t.loading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.resetSettings,nonce:NestedPages.jsData.nonce},success:function(e){t.loading(!1),s(t.selectors.resetForm).hide(),s(t.selectors.formComplete).show(),"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},t.loading=function(e){e?s("["+t.selectors.resetButton+"]").attr("disabled",!0):s("["+t.selectors.resetButton+"]").removeAttr("disabled")},t.bindEvents()},new NestedPages.SettingsReset,(NestedPages=NestedPages||{}).UserPreferencesReset=function(){var t=this,s=jQuery;return t.selectors={resetButton:"data-nestedpages-reset-user-prefs",resetForm:".nestedpages-reset-user-prefs",formComplete:".nestedpages-reset-user-prefs-complete"},t.bindEvents=function(){s(document).on("click","["+t.selectors.resetButton+"]",function(e){e.preventDefault(),t.resetPreferences()})},t.resetPreferences=function(){t.loading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.resetUserPrefs,nonce:NestedPages.jsData.nonce},success:function(e){t.loading(!1),s(t.selectors.resetForm).hide(),s(t.selectors.formComplete).show(),"success"!==e.status&&console.log("There was an error clearing user preferences.")}})},t.loading=function(e){e?s("["+t.selectors.resetButton+"]").attr("disabled",!0):s("["+t.selectors.resetButton+"]").removeAttr("disabled")},t.bindEvents()},new NestedPages.UserPreferencesReset,(NestedPages=NestedPages||{}).Settings=function(){var a=this,i=jQuery;return a.selectors={postTypeToggle:"[data-toggle-nestedpages-pt-settings]",postTypeCheckbox:"[data-nestedpages-settings-row-checkbox]",customFieldsCheckbox:"[data-toggle-nestedpages-cf-settings]",standardFieldsCheckbox:"[data-toggle-nestedpages-sf-settings]",taxonomiesFieldCheckbox:"[data-hide-taxonomies]",thumbnailsCheckbox:"[data-enable-thumbnails]",menuEnabledOption:"[data-menu-enabled-option]",disableMenuCheckbox:"[data-disable-menu-checkbox]",disableAutoCheckbox:"[data-menu-disable-auto-checkbox]",assignPostTypeCheckbox:"[data-nestedpages-assign-post-type]",assignPostTypeId:"[data-nested-pages-assign-post-type-id]",assignPostTypeTitle:"[data-nested-pages-assign-post-type-title]",assignPostTypeOption:"[data-assignment-page-id]",assignPostTypeRemove:"[data-nestedpages-page-pt-assignment-remove]",assignPostTypeSelection:"[data-nestedpages-page-pt-assignment-selection]",sortOptionCheckbox:"[data-nestedpages-sort-option-checkbox]",defaultSortOptions:"[data-nestedpages-sort-option-default]"},a.bindEvents=function(){i(document).ready(function(){a.toggleAllSettingsButtons(),a.toogleAllFieldSettings(".custom-fields"),a.toogleAllFieldSettings(".standard-fields"),a.toggleMenuCheckboxes(),a.toggleHideCheckbox(),a.toggleAssignPostType(),a.toggleAllDefaultSortOptions()}),i(document).on("click",a.selectors.postTypeToggle,function(e){e.preventDefault(),a.toggleRow(i(this))}),i(document).on("change",a.selectors.postTypeCheckbox,function(){a.toggleSettingsButton(i(this))}),i(document).on("change",a.selectors.customFieldsCheckbox,function(){a.toogleFieldSettings(i(this),".custom-fields")}),i(document).on("change",a.selectors.standardFieldsCheckbox,function(){a.toogleFieldSettings(i(this),".standard-fields")}),i(document).on("change",a.selectors.taxonomiesFieldCheckbox,function(){a.toggleTaxonomyCheckboxes(i(this))}),i(document).on("change",a.selectors.thumbnailsCheckbox,function(){a.toggleThumbnailSettings(i(this))}),i(document).on("change",a.selectors.disableMenuCheckbox,function(){a.toggleMenuCheckboxes()}),i(document).on("change",a.selectors.disableAutoCheckbox,function(){a.toggleHideCheckbox()}),i(document).on("change",a.selectors.assignPostTypeCheckbox,function(){a.toggleAssignPostType()}),i(document).on("click",a.selectors.assignPostTypeOption,function(e){e.preventDefault(),a.chooseAssignPostType(i(this))}),i(document).on("click",a.selectors.assignPostTypeRemove,function(e){e.preventDefault(),a.removeAssignPostType(i(this))}),i(document).on("change",a.selectors.sortOptionCheckbox,function(){a.toggleDefaultSortOptions(i(this))})},a.toggleRow=function(e){i(e).parent(".head").siblings(".body").toggle(),i(e).parents(".row-container").toggleClass("active")},a.toggleSettingsButton=function(e){var t=i(e).parents(".head").find(a.selectors.postTypeToggle);if(i(e).is(":checked"))return i(t).show(),void i(t).parents(".head").siblings(".body").find('input[type="hidden"]').attr("disabled",!1);i(t).hide(),i(t).parents(".head").siblings(".body").hide(),i(t).parents(".row-container").removeClass("active"),i(t).parents(".head").siblings(".body").find('input[type="checkbox"]').attr("checked",!1),i(t).parents(".head").siblings(".body").find('input[type="hidden"]').attr("disabled",!0),i(t).parents(".head").siblings(".body").find("select").val(!1)},a.toggleAllSettingsButtons=function(){var e=i(a.selectors.postTypeCheckbox);i.each(e,function(){a.toggleSettingsButton(i(this))})},a.toogleFieldSettings=function(e,t){var s=i(e).parents(".body").find(t);i(e).is(":checked")?i(s).show():i(s).hide()},a.toogleAllFieldSettings=function(e){var t=i(a.selectors.customFieldsCheckbox);if(".standard-fields"==e)t=i(a.selectors.standardFieldsCheckbox);i.each(t,function(){a.toogleFieldSettings(i(this),e)})},a.toggleTaxonomyCheckboxes=function(e){var t=i(e).parents("ul").find(i("*[data-taxonomy-single]"));i(e).is(":checked")?i(t).hide():i(t).show()},a.toggleThumbnailSettings=function(e){var t=i(e).parents(".field").find(i("*[data-thumbnail-options]"));i(e).is(":checked")?i(t).show():i(t).hide()},a.toggleMenuCheckboxes=function(){var e=i(a.selectors.disableMenuCheckbox),t=i(a.selectors.menuEnabledOption);i(e).is(":checked")?i(t).hide():i(t).show()},a.toggleHideCheckbox=function(){var e=i(a.selectors.disableAutoCheckbox),t=i("[data-menu-hide-checkbox]");i(e).is(":checked")?i(t).hide():i(t).show()},a.toggleAssignPostType=function(){var e=i(a.selectors.assignPostTypeCheckbox);i.each(e,function(){var e=i(this),t=i(this).parents(".field").find(".nestedpages-assignment-display");i(e).is(":checked")?i(t).show():i(t).hide()})},a.chooseAssignPostType=function(e){var t=i(e).attr("data-assignment-page-id"),s=i(e).attr("data-assignment-page-title"),n=i(e).parents(".field"),o=nestedpages.currently_assigned_to+" "+s+' <a href="#" data-nestedpages-page-pt-assignment-remove>('+nestedpages.remove+")</a>";i(n).find(a.selectors.assignPostTypeId).val(t),i(n).find(a.selectors.assignPostTypeTitle).val(s),i(n).find(a.selectors.assignPostTypeSelection).html(o).show(),i(n).find("[data-nestedpages-post-search-form]").hide()},a.removeAssignPostType=function(e){var t=i(e).parents(".field");i(t).find(a.selectors.assignPostTypeSelection).hide(),i(t).find("[data-nestedpages-post-search-form]").show(),i(t).find(a.selectors.assignPostTypeId).val(""),i(t).find(a.selectors.assignPostTypeTitle).val("")},a.toggleAllDefaultSortOptions=function(){var e=i(a.selectors.sortOptionCheckbox);i.each(e,function(){a.toggleDefaultSortOptions(i(this))})},a.toggleDefaultSortOptions=function(e){var t=!!i(e).is(":checked"),s=i(e).parent("label").next(a.selectors.defaultSortOptions);i(s).length<1||(t?i(s).show():i(s).hide())},a.bindEvents()},new NestedPages.Settings;
languages/nestedpages.mo DELETED
Binary file
languages/nestedpages.pot DELETED
@@ -1,744 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Nested Pages\n"
4
- "POT-Creation-Date: 2016-10-18 22:30-0500\n"
5
- "PO-Revision-Date: 2016-10-18 22:30-0500\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.6.4\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:124 app/Views/listing.php:31
20
- #: app/Views/partials/list-header.php:21
21
- msgid "Expand All"
22
- msgstr ""
23
-
24
- #: app/Activation/Dependencies.php:125
25
- msgid "Collapse All"
26
- msgstr ""
27
-
28
- #: app/Activation/Dependencies.php:126 app/Views/partials/tool-list.php:19
29
- msgid "Show Hidden"
30
- msgstr ""
31
-
32
- #: app/Activation/Dependencies.php:127 app/Views/partials/tool-list.php:21
33
- msgid "Hide Hidden"
34
- msgstr ""
35
-
36
- #: app/Activation/Dependencies.php:128 app/Views/listing.php:16
37
- #: app/Views/listing.php:17
38
- msgid "Add Link"
39
- msgstr ""
40
-
41
- #: app/Activation/Dependencies.php:129
42
- msgid "Add Child Link"
43
- msgstr ""
44
-
45
- #: app/Activation/Dependencies.php:130
46
- #: app/Entities/Post/PostUpdateRepository.php:91
47
- #: app/Views/forms/new-child.php:19 app/Views/forms/new-child.php:21
48
- #: app/Views/forms/quickedit-post.php:21 app/Views/partials/tool-list.php:69
49
- msgid "Title"
50
- msgstr ""
51
-
52
- #: app/Activation/Dependencies.php:131 app/Views/forms/quickedit-post.php:11
53
- #: app/Views/partials/row-link.php:68 app/Views/partials/row.php:138
54
- msgid "Quick Edit"
55
- msgstr ""
56
-
57
- #: app/Activation/Dependencies.php:132
58
- msgid "Page Title"
59
- msgstr ""
60
-
61
- #: app/Activation/Dependencies.php:133 app/Views/partials/row.php:143
62
- msgid "View"
63
- msgstr ""
64
-
65
- #: app/Activation/Dependencies.php:134 app/Views/forms/new-child.php:7
66
- #: app/Views/partials/row.php:102
67
- msgid "Add Child"
68
- msgstr ""
69
-
70
- #: app/Activation/Dependencies.php:135
71
- msgid "Add Child Page"
72
- msgstr ""
73
-
74
- #: app/Activation/Dependencies.php:136
75
- msgid "Add Child Pages"
76
- msgstr ""
77
-
78
- #: app/Activation/Dependencies.php:137 app/Views/forms/link-form.php:105
79
- #: app/Views/forms/new-child.php:102
80
- msgid "Add"
81
- msgstr ""
82
-
83
- #: app/Activation/Dependencies.php:138
84
- msgid "Add Page"
85
- msgstr ""
86
-
87
- #: app/Activation/Dependencies.php:139
88
- msgid "Add Pages"
89
- msgstr ""
90
-
91
- #: app/Activation/Dependencies.php:140 app/Views/listing.php:10
92
- #: app/Views/listing.php:11
93
- msgid "Add Multiple"
94
- msgstr ""
95
-
96
- #: app/Activation/Dependencies.php:141
97
- msgid ""
98
- "Are you sure you would like to empty the trash? This action is not "
99
- "reversable."
100
- msgstr ""
101
-
102
- #: app/Activation/Dependencies.php:142 app/Views/partials/row-link.php:40
103
- #: app/Views/partials/row.php:48
104
- msgid "Hidden"
105
- msgstr ""
106
-
107
- #: app/Activation/Dependencies.php:143 app/Views/partials/list-header.php:14
108
- msgid "Bulk Actions"
109
- msgstr ""
110
-
111
- #: app/Activation/Dependencies.php:144
112
- msgid ""
113
- "Your selection includes link items, which cannot be recovered after "
114
- "deleting. Would you like to continue? (Other items are moved to the trash)"
115
- msgstr ""
116
-
117
- #: app/Activation/Dependencies.php:145
118
- msgid ""
119
- "Are you sure you would like to delete this item? This action is not "
120
- "reversable."
121
- msgstr ""
122
-
123
- #: app/Activation/Dependencies.php:146
124
- #: app/Views/forms/delete-confirmation-modal.php:12
125
- msgid "Delete"
126
- msgstr ""
127
-
128
- #: app/Activation/Dependencies.php:147
129
- msgid "Trash Posts and Delete Links"
130
- msgstr ""
131
-
132
- #: app/Bootstrap.php:69 app/Views/settings/settings-posttypes.php:22
133
- msgid "Settings"
134
- msgstr ""
135
-
136
- #: app/Config/Settings.php:66 app/Views/settings/settings.php:2
137
- msgid "Nested Pages Settings"
138
- msgstr ""
139
-
140
- #: app/Config/Settings.php:67
141
- msgid "Nested Pages"
142
- msgstr ""
143
-
144
- #: app/Config/SettingsRepository.php:79
145
- msgid "Post Title"
146
- msgstr ""
147
-
148
- #: app/Config/SettingsRepository.php:80 app/Views/forms/quickedit-post.php:28
149
- msgid "Slug"
150
- msgstr ""
151
-
152
- #: app/Config/SettingsRepository.php:81
153
- msgid "Post Date"
154
- msgstr ""
155
-
156
- #: app/Config/SettingsRepository.php:82 app/Views/forms/clone-form.php:50
157
- #: app/Views/forms/new-child.php:61 app/Views/forms/quickedit-post.php:74
158
- msgid "Author"
159
- msgstr ""
160
-
161
- #: app/Config/SettingsRepository.php:83
162
- msgid "Post Status"
163
- msgstr ""
164
-
165
- #: app/Config/SettingsRepository.php:84
166
- msgid "Password/Private"
167
- msgstr ""
168
-
169
- #: app/Config/SettingsRepository.php:85 app/Views/forms/quickedit-post.php:129
170
- msgid "Allow Comments"
171
- msgstr ""
172
-
173
- #: app/Config/SettingsRepository.php:89 app/Views/forms/new-child.php:71
174
- #: app/Views/forms/quickedit-post.php:103
175
- msgid "Template"
176
- msgstr ""
177
-
178
- #: app/Config/SettingsRepository.php:90 app/Views/forms/quickedit-post.php:145
179
- msgid "Menu Options"
180
- msgstr ""
181
-
182
- #: app/Config/SettingsRepository.php:93 app/Views/forms/quickedit-link.php:60
183
- #: app/Views/forms/quickedit-post.php:138
184
- msgid "Hide in Nested Pages"
185
- msgstr ""
186
-
187
- #: app/Config/SettingsRepository.php:101
188
- #: app/Views/forms/quickedit-post.php:149
189
- msgid "Taxonomies"
190
- msgstr ""
191
-
192
- #: app/Entities/AdminMenu/AdminSubmenu.php:75
193
- #: app/Views/partials/tool-list.php:38
194
- msgid "Default"
195
- msgstr ""
196
-
197
- #: app/Entities/Confirmation/LinkDeletedConfirmation.php:12
198
- msgid "Link successfully deleted."
199
- msgstr ""
200
-
201
- #: app/Entities/Confirmation/TrashConfirmation.php:20
202
- msgid "Links Removed."
203
- msgstr ""
204
-
205
- #: app/Entities/Confirmation/TrashConfirmation.php:21
206
- msgid "Link Removed."
207
- msgstr ""
208
-
209
- #: app/Entities/Confirmation/TrashConfirmation.php:30
210
- #: app/Entities/Confirmation/TrashConfirmation.php:31
211
- msgid "moved to the Trash."
212
- msgstr ""
213
-
214
- #: app/Entities/Confirmation/TrashConfirmation.php:35
215
- msgid "Undo"
216
- msgstr ""
217
-
218
- #: app/Entities/Confirmation/TrashRestoredConfirmation.php:14
219
- msgid "items"
220
- msgstr ""
221
-
222
- #: app/Entities/Confirmation/TrashRestoredConfirmation.php:14
223
- msgid "item"
224
- msgstr ""
225
-
226
- #: app/Entities/Confirmation/TrashRestoredConfirmation.php:15
227
- msgid "restored from trash."
228
- msgstr ""
229
-
230
- #: app/Entities/PostType/PostTypeRepository.php:317
231
- msgid "Nested View"
232
- msgstr ""
233
-
234
- #: app/Entities/PostType/PostTypeRepository.php:317
235
- msgid "Sort View"
236
- msgstr ""
237
-
238
- #: app/Entities/PostType/RegisterPostTypes.php:22
239
- msgid "Redirects"
240
- msgstr ""
241
-
242
- #: app/Entities/PostType/RegisterPostTypes.php:23
243
- msgid "Redirect"
244
- msgstr ""
245
-
246
- #: app/Form/Listeners/BaseHandler.php:80
247
- msgid "Incorrect Form Field"
248
- msgstr ""
249
-
250
- #: app/Form/Listeners/BaseHandler.php:113
251
- msgid "There was an error updating the page."
252
- msgstr ""
253
-
254
- #: app/Form/Listeners/ClonePost.php:36
255
- msgid "Post Not Found"
256
- msgstr ""
257
-
258
- #: app/Form/Listeners/EmptyTrash.php:19
259
- msgid "Trash successfully emptied."
260
- msgstr ""
261
-
262
- #: app/Form/Listeners/NewMenuItem.php:27
263
- msgid "Custom Links must have a label."
264
- msgstr ""
265
-
266
- #: app/Form/Listeners/NewMenuItem.php:28
267
- #: app/Form/Validation/Validation.php:148
268
- msgid "Please provide a valid URL."
269
- msgstr ""
270
-
271
- #: app/Form/Listeners/NewMenuItem.php:47
272
- #: app/Form/Listeners/QuickEditLink.php:30
273
- msgid "Link successfully updated."
274
- msgstr ""
275
-
276
- #: app/Form/Listeners/QuickEdit.php:32
277
- msgid "Post successfully updated."
278
- msgstr ""
279
-
280
- #: app/Form/Listeners/Sort.php:29
281
- msgid "Page order successfully updated."
282
- msgstr ""
283
-
284
- #: app/Form/Listeners/Sort.php:31
285
- msgid "There was an error updating the page order."
286
- msgstr ""
287
-
288
- #: app/Form/Listeners/SyncMenu.php:26
289
- msgid "Menu sync disabled."
290
- msgstr ""
291
-
292
- #: app/Form/Listeners/SyncMenu.php:36
293
- msgid "Menu sync enabled."
294
- msgstr ""
295
-
296
- #: app/Form/Validation/Validation.php:134
297
- msgid "Please provide a valid date."
298
- msgstr ""
299
-
300
- #: app/Form/Validation/Validation.php:145
301
- msgid "Please provide a menu title."
302
- msgstr ""
303
-
304
- #: app/Form/Validation/Validation.php:158
305
- msgid "Please provide a "
306
- msgstr ""
307
-
308
- #: app/Form/Validation/Validation.php:171
309
- msgid "A valid parent page was not provided."
310
- msgstr ""
311
-
312
- #: app/Form/Validation/Validation.php:178
313
- msgid "Please provide at least one page title."
314
- msgstr ""
315
-
316
- #: app/Form/Validation/Validation.php:186
317
- msgid "Page titles cannot be blank."
318
- msgstr ""
319
-
320
- #: app/Views/forms/clone-form.php:9 app/Views/forms/clone-form.php:65
321
- #: app/Views/partials/row.php:107
322
- msgid "Clone"
323
- msgstr ""
324
-
325
- #: app/Views/forms/clone-form.php:14
326
- msgid "Number of Copies"
327
- msgstr ""
328
-
329
- #: app/Views/forms/clone-form.php:26 app/Views/forms/new-child.php:35
330
- #: app/Views/forms/quickedit-link.php:27 app/Views/forms/quickedit-post.php:85
331
- msgid "Status"
332
- msgstr ""
333
-
334
- #: app/Views/forms/clone-form.php:29 app/Views/forms/new-child.php:38
335
- #: app/Views/forms/quickedit-link.php:30 app/Views/forms/quickedit-post.php:88
336
- #: app/Views/partials/tool-list.php:10
337
- msgid "Published"
338
- msgstr ""
339
-
340
- #: app/Views/forms/clone-form.php:31 app/Views/forms/quickedit-link.php:33
341
- #: app/Views/forms/quickedit-post.php:91
342
- msgid "Pending Review"
343
- msgstr ""
344
-
345
- #: app/Views/forms/clone-form.php:32 app/Views/forms/new-child.php:40
346
- #: app/Views/forms/quickedit-link.php:34 app/Views/forms/quickedit-post.php:92
347
- #: app/Views/partials/tool-list.php:14
348
- msgid "Draft"
349
- msgstr ""
350
-
351
- #: app/Views/forms/clone-form.php:62
352
- #: app/Views/forms/delete-confirmation-modal.php:11
353
- #: app/Views/forms/empty-trash-modal.php:11 app/Views/forms/link-form.php:101
354
- #: app/Views/forms/new-child.php:99 app/Views/forms/quickedit-link.php:84
355
- #: app/Views/forms/quickedit-post.php:231
356
- msgid "Cancel"
357
- msgstr ""
358
-
359
- #: app/Views/forms/empty-trash-modal.php:12
360
- msgid "Empty Trash"
361
- msgstr ""
362
-
363
- #: app/Views/forms/link-form.php:18
364
- msgid "Custom Link"
365
- msgstr ""
366
-
367
- #: app/Views/forms/link-form.php:27 app/Views/forms/link-form.php:44
368
- msgid "Search"
369
- msgstr ""
370
-
371
- #: app/Views/forms/link-form.php:27 app/Views/forms/link-form.php:44
372
- msgid "No Results"
373
- msgstr ""
374
-
375
- #: app/Views/forms/link-form.php:58
376
- msgid "Select an item"
377
- msgstr ""
378
-
379
- #: app/Views/forms/link-form.php:63
380
- msgid "Original"
381
- msgstr ""
382
-
383
- #: app/Views/forms/link-form.php:68 app/Views/forms/quickedit-link.php:22
384
- msgid "URL"
385
- msgstr ""
386
-
387
- #: app/Views/forms/link-form.php:72 app/Views/forms/quickedit-link.php:17
388
- #: app/Views/forms/quickedit-post.php:195
389
- msgid "Navigation Label"
390
- msgstr ""
391
-
392
- #: app/Views/forms/link-form.php:76 app/Views/forms/quickedit-link.php:44
393
- #: app/Views/forms/quickedit-post.php:199
394
- msgid "Title Attribute"
395
- msgstr ""
396
-
397
- #: app/Views/forms/link-form.php:80
398
- msgid "CSS Classes (optional)"
399
- msgstr ""
400
-
401
- #: app/Views/forms/link-form.php:86 app/Views/forms/quickedit-link.php:66
402
- #: app/Views/forms/quickedit-post.php:217
403
- msgid "Open link in a new window/tab"
404
- msgstr ""
405
-
406
- #: app/Views/forms/new-child.php:28
407
- msgid "+"
408
- msgstr ""
409
-
410
- #: app/Views/forms/new-child.php:73 app/Views/forms/quickedit-post.php:105
411
- msgid "Default Template"
412
- msgstr ""
413
-
414
- #: app/Views/forms/new-child.php:83 app/Views/forms/quickedit-link.php:54
415
- #: app/Views/forms/quickedit-post.php:211
416
- msgid "Hide in Nav Menu"
417
- msgstr ""
418
-
419
- #: app/Views/forms/new-child.php:105
420
- msgid "Add & Edit"
421
- msgstr ""
422
-
423
- #: app/Views/forms/quickedit-link.php:8
424
- #: app/Views/settings/settings-posttypes.php:44
425
- msgid "Link"
426
- msgstr ""
427
-
428
- #: app/Views/forms/quickedit-link.php:31 app/Views/forms/quickedit-post.php:89
429
- msgid "Scheduled"
430
- msgstr ""
431
-
432
- #: app/Views/forms/quickedit-link.php:48
433
- #: app/Views/forms/quickedit-post.php:203
434
- msgid "CSS Classes"
435
- msgstr ""
436
-
437
- #: app/Views/forms/quickedit-link.php:87
438
- #: app/Views/forms/quickedit-post.php:234
439
- msgid "Update"
440
- msgstr ""
441
-
442
- #: app/Views/forms/quickedit-post.php:36 app/Views/forms/quickedit-post.php:51
443
- #: app/Views/partials/tool-list.php:68
444
- msgid "Date"
445
- msgstr ""
446
-
447
- #: app/Views/forms/quickedit-post.php:39
448
- msgid "@"
449
- msgstr ""
450
-
451
- #: app/Views/forms/quickedit-post.php:42
452
- msgid "am"
453
- msgstr ""
454
-
455
- #: app/Views/forms/quickedit-post.php:43
456
- msgid "pm"
457
- msgstr ""
458
-
459
- #: app/Views/forms/quickedit-post.php:113
460
- msgid "Password"
461
- msgstr ""
462
-
463
- #: app/Views/forms/quickedit-post.php:116
464
- msgid "&ndash;OR&ndash;"
465
- msgstr ""
466
-
467
- #: app/Views/forms/quickedit-post.php:119
468
- msgid "Private"
469
- msgstr ""
470
-
471
- #: app/Views/listing.php:38
472
- msgid "Sync"
473
- msgstr ""
474
-
475
- #: app/Views/listing.php:38
476
- msgid "Order"
477
- msgstr ""
478
-
479
- #: app/Views/listing.php:45 app/Views/listing.php:48
480
- msgid "Sync Menu"
481
- msgstr ""
482
-
483
- #: app/Views/partials/list-header.php:16
484
- msgid "Move to Trash"
485
- msgstr ""
486
-
487
- #: app/Views/partials/list-header.php:21
488
- msgid "Nested Items Selected"
489
- msgstr ""
490
-
491
- #: app/Views/partials/row.php:31
492
- msgid "Front Page"
493
- msgstr ""
494
-
495
- #: app/Views/partials/row.php:32
496
- msgid "Posts Page"
497
- msgstr ""
498
-
499
- #: app/Views/partials/row.php:56
500
- msgid "currently editing"
501
- msgstr ""
502
-
503
- #: app/Views/partials/row.php:60
504
- msgid "Edit"
505
- msgstr ""
506
-
507
- #: app/Views/partials/tool-list.php:6
508
- msgid "All"
509
- msgstr ""
510
-
511
- #: app/Views/partials/tool-list.php:29
512
- msgid "Trash"
513
- msgstr ""
514
-
515
- #: app/Views/partials/tool-list.php:30
516
- msgid "Empty"
517
- msgstr ""
518
-
519
- #: app/Views/partials/tool-list.php:52
520
- msgid "All Authors"
521
- msgstr ""
522
-
523
- #: app/Views/partials/tool-list.php:67
524
- msgid "Menu Order"
525
- msgstr ""
526
-
527
- #: app/Views/partials/tool-list.php:71
528
- msgid "Order By"
529
- msgstr ""
530
-
531
- #: app/Views/partials/tool-list.php:85
532
- msgid "Ascending"
533
- msgstr ""
534
-
535
- #: app/Views/partials/tool-list.php:86
536
- msgid "Descending"
537
- msgstr ""
538
-
539
- #: app/Views/partials/tool-list.php:115
540
- msgid "All "
541
- msgstr ""
542
-
543
- #: app/Views/settings/settings-general.php:4
544
- msgid "Currently Enabled"
545
- msgstr ""
546
-
547
- #: app/Views/settings/settings-general.php:4
548
- msgid "Currently Disabled"
549
- msgstr ""
550
-
551
- #: app/Views/settings/settings-general.php:9
552
- msgid "Nested Pages Version"
553
- msgstr ""
554
-
555
- #: app/Views/settings/settings-general.php:14
556
- msgid "Menu Name"
557
- msgstr ""
558
-
559
- #: app/Views/settings/settings-general.php:17
560
- msgid ""
561
- "Important: Once the menu name has changed, theme files should be updated to "
562
- "reference the new name."
563
- msgstr ""
564
-
565
- #: app/Views/settings/settings-general.php:22
566
- msgid "Display Options"
567
- msgstr ""
568
-
569
- #: app/Views/settings/settings-general.php:26
570
- msgid "Enable Date Picker in Quick Edit"
571
- msgstr ""
572
-
573
- #: app/Views/settings/settings-general.php:31
574
- msgid "Menu Sync"
575
- msgstr ""
576
-
577
- #: app/Views/settings/settings-general.php:36
578
- msgid "Hide Menu Sync Checkbox"
579
- msgstr ""
580
-
581
- #: app/Views/settings/settings-general.php:42
582
- msgid "Manually sync menu."
583
- msgstr ""
584
-
585
- #: app/Views/settings/settings-general.php:48
586
- msgid "Manually sync page order."
587
- msgstr ""
588
-
589
- #: app/Views/settings/settings-general.php:54
590
- msgid "Disable menu sync completely"
591
- msgstr ""
592
-
593
- #: app/Views/settings/settings-general.php:60
594
- msgid "Allow Page Sorting"
595
- msgstr ""
596
-
597
- #: app/Views/settings/settings-general.php:70
598
- msgid "Admins always have sorting ability."
599
- msgstr ""
600
-
601
- #: app/Views/settings/settings-posttypes.php:7
602
- msgid "Enable Nested Pages for:"
603
- msgstr ""
604
-
605
- #: app/Views/settings/settings-posttypes.php:19
606
- msgid "Hierarchical"
607
- msgstr ""
608
-
609
- #: app/Views/settings/settings-posttypes.php:29
610
- msgid "Replace Default Menu"
611
- msgstr ""
612
-
613
- #: app/Views/settings/settings-posttypes.php:30
614
- msgid "Replace the default top-level item with the nested view link."
615
- msgstr ""
616
-
617
- #: app/Views/settings/settings-posttypes.php:33
618
- msgid "Replace Default"
619
- msgstr ""
620
-
621
- #: app/Views/settings/settings-posttypes.php:33
622
- msgid "Menu"
623
- msgstr ""
624
-
625
- #: app/Views/settings/settings-posttypes.php:40
626
- msgid "Remove Default Link"
627
- msgstr ""
628
-
629
- #: app/Views/settings/settings-posttypes.php:41
630
- msgid ""
631
- "If the default menu is replaced, a link to the default view will be added. "
632
- "Select this to remove the link"
633
- msgstr ""
634
-
635
- #: app/Views/settings/settings-posttypes.php:44
636
- msgid "Hide Default"
637
- msgstr ""
638
-
639
- #: app/Views/settings/settings-posttypes.php:52
640
- msgid "Disable Nesting"
641
- msgstr ""
642
-
643
- #: app/Views/settings/settings-posttypes.php:53
644
- msgid "To disable nesting on hierarchical post types, select this option."
645
- msgstr ""
646
-
647
- #: app/Views/settings/settings-posttypes.php:56
648
- msgid "Disable Nesting for"
649
- msgstr ""
650
-
651
- #: app/Views/settings/settings-posttypes.php:69
652
- msgid "Display Thumbnails"
653
- msgstr ""
654
-
655
- #: app/Views/settings/settings-posttypes.php:70
656
- msgid "Display the thumbnail in the list sort view."
657
- msgstr ""
658
-
659
- #: app/Views/settings/settings-posttypes.php:71
660
- msgid ""
661
- "Note: Thumbnail width is displayed at a maximum of 80px in the nested pages "
662
- "view. The image is scaled proportionally."
663
- msgstr ""
664
-
665
- #: app/Views/settings/settings-posttypes.php:74
666
- msgid "Display Thumbnails for"
667
- msgstr ""
668
-
669
- #: app/Views/settings/settings-posttypes.php:77
670
- msgid "Thumbnail Source"
671
- msgstr ""
672
-
673
- #: app/Views/settings/settings-posttypes.php:88
674
- msgid "Thumbnail Display Size"
675
- msgstr ""
676
-
677
- #: app/Views/settings/settings-posttypes.php:90
678
- msgid "Small"
679
- msgstr ""
680
-
681
- #: app/Views/settings/settings-posttypes.php:91
682
- msgid "Medium"
683
- msgstr ""
684
-
685
- #: app/Views/settings/settings-posttypes.php:92
686
- msgid "Large"
687
- msgstr ""
688
-
689
- #: app/Views/settings/settings-posttypes.php:101
690
- #: app/Views/settings/settings-posttypes.php:105
691
- msgid "Configure Standard Fields"
692
- msgstr ""
693
-
694
- #: app/Views/settings/settings-posttypes.php:102
695
- msgid "Remove standard fields from the quick edit form."
696
- msgstr ""
697
-
698
- #: app/Views/settings/settings-posttypes.php:108
699
- msgid "Check to remove from Quick Edit."
700
- msgstr ""
701
-
702
- #: app/Views/settings/settings-posttypes.php:150
703
- #: app/Views/settings/settings-posttypes.php:154
704
- msgid "Configure Custom Fields"
705
- msgstr ""
706
-
707
- #: app/Views/settings/settings-posttypes.php:151
708
- msgid "Set which custom fields display in the quick edit form."
709
- msgstr ""
710
-
711
- #: app/Views/settings/settings-posttypes.php:157
712
- msgid "Check to Include in Quick Edit."
713
- msgstr ""
714
-
715
- #: app/Views/settings/settings-posttypes.php:163
716
- msgid "Advanced Custom Fields"
717
- msgstr ""
718
-
719
- #: app/Views/settings/settings-posttypes.php:178
720
- msgid "No ACF Fields configured for this post type"
721
- msgstr ""
722
-
723
- #: app/Views/settings/settings-posttypes.php:194
724
- msgid ""
725
- "If default menu is not replaced, an additional submenu item will be added "
726
- "for \"Nested/Sort View\""
727
- msgstr ""
728
-
729
- #: app/Views/settings/settings-posttypes.php:197
730
- msgid ""
731
- "<strong>Important:</strong> Changing page structures on live sites may "
732
- "effect SEO and existing inbound links. Limit URL structure changes on live "
733
- "sites by disabling nesting. Sorting within the current nesting structure "
734
- "will still be available. If nesting changes are made to a live site, it may "
735
- "help to add a 301 redirect from the old location to the new one."
736
- msgstr ""
737
-
738
- #: app/Views/settings/settings.php:6
739
- msgid "General"
740
- msgstr ""
741
-
742
- #: app/Views/settings/settings.php:10
743
- msgid "Post Types"
744
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/{nestedpages-cs_CZ.mo → wp-nested-pages-cs_CZ.mo} RENAMED
File without changes
languages/{nestedpages-cs_CZ.po → wp-nested-pages-cs_CZ.po} RENAMED
File without changes
languages/{nestedpages-da_DK.mo → wp-nested-pages-da_DK.mo} RENAMED
File without changes
languages/{nestedpages-da_DK.po → wp-nested-pages-da_DK.po} RENAMED
File without changes
languages/{nestedpages-de_CH.mo → wp-nested-pages-de_CH.mo} RENAMED
File without changes
languages/{nestedpages-de_CH.po → wp-nested-pages-de_CH.po} RENAMED
File without changes
languages/{nestedpages-de_DE.mo → wp-nested-pages-de_DE.mo} RENAMED
File without changes
languages/{nestedpages-de_DE.po → wp-nested-pages-de_DE.po} RENAMED
File without changes
languages/{nestedpages-es_ES.mo → wp-nested-pages-es_ES.mo} RENAMED
File without changes
languages/{nestedpages-es_ES.po → wp-nested-pages-es_ES.po} RENAMED
File without changes
languages/{nestedpages-fi.mo → wp-nested-pages-fi.mo} RENAMED
File without changes
languages/{nestedpages-fi.po → wp-nested-pages-fi.po} RENAMED
File without changes
languages/{nestedpages-fr_FR.mo → wp-nested-pages-fr_FR.mo} RENAMED
File without changes
languages/{nestedpages-fr_FR.po → wp-nested-pages-fr_FR.po} RENAMED
File without changes
languages/{nestedpages-it_IT.mo → wp-nested-pages-it_IT.mo} RENAMED
File without changes
languages/{nestedpages-it_IT.po → wp-nested-pages-it_IT.po} RENAMED
File without changes
languages/{nestedpages-nl_NL.mo → wp-nested-pages-nl_NL.mo} RENAMED
File without changes
languages/{nestedpages-nl_NL.po → wp-nested-pages-nl_NL.po} RENAMED
File without changes
languages/{nestedpages-pt_BR.mo → wp-nested-pages-pt_BR.mo} RENAMED
File without changes
languages/{nestedpages-pt_BR.po → wp-nested-pages-pt_BR.po} RENAMED
File without changes
languages/{nestedpages-pt_PT.mo → wp-nested-pages-pt_PT.mo} RENAMED
File without changes
languages/{nestedpages-pt_PT.po → wp-nested-pages-pt_PT.po} RENAMED
File without changes
languages/{nestedpages-ru_RU.mo → wp-nested-pages-ru_RU.mo} RENAMED
File without changes
languages/{nestedpages-ru_RU.po → wp-nested-pages-ru_RU.po} RENAMED
File without changes
languages/{nestedpages-sv_SE.mo → wp-nested-pages-sv_SE.mo} RENAMED
File without changes
languages/{nestedpages-sv_SE.po → wp-nested-pages-sv_SE.po} RENAMED
File without changes
languages/{nestedpages-tr_TR.mo → wp-nested-pages-tr_TR.mo} RENAMED
File without changes
languages/{nestedpages-tr_TR.po → wp-nested-pages-tr_TR.po} RENAMED
File without changes
languages/wp-nested-pages.pot ADDED
@@ -0,0 +1,1024 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
+ "Project-Id-Version: Nested Pages\n"
6
+ "POT-Creation-Date: 2019-04-04 13:18-0400\n"
7
+ "PO-Revision-Date: 2019-04-04 13:06-0400\n"
8
+ "Last-Translator: \n"
9
+ "Language-Team: \n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.2.1\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
+ "X-Poedit-WPHeader: nestedpages.php\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
20
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21
+ "X-Poedit-SearchPath-0: .\n"
22
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
23
+
24
+ #: app/Activation/Dependencies.php:118 app/Views/listing.php:36
25
+ #: app/Views/partials/list-header.php:19
26
+ msgid "Expand All"
27
+ msgstr ""
28
+
29
+ #: app/Activation/Dependencies.php:119
30
+ msgid "Collapse All"
31
+ msgstr ""
32
+
33
+ #: app/Activation/Dependencies.php:120 app/Views/partials/tool-list.php:27
34
+ msgid "Show Hidden"
35
+ msgstr ""
36
+
37
+ #: app/Activation/Dependencies.php:121 app/Views/partials/tool-list.php:29
38
+ msgid "Hide Hidden"
39
+ msgstr ""
40
+
41
+ #: app/Activation/Dependencies.php:122 app/Views/listing.php:29
42
+ #: app/Views/listing.php:30
43
+ msgid "Add Link"
44
+ msgstr ""
45
+
46
+ #: app/Activation/Dependencies.php:123 app/Views/partials/row.php:146
47
+ msgid "Add Child Link"
48
+ msgstr ""
49
+
50
+ #: app/Activation/Dependencies.php:124
51
+ #: app/Entities/Post/PostUpdateRepository.php:92
52
+ #: app/Views/forms/new-child.php:19 app/Views/forms/new-child.php:21
53
+ #: app/Views/forms/quickedit-post.php:24 app/Views/partials/tool-list.php:88
54
+ #: app/Views/settings/settings-posttypes.php:269
55
+ msgid "Title"
56
+ msgstr ""
57
+
58
+ #: app/Activation/Dependencies.php:125 app/Views/forms/quickedit-post.php:14
59
+ #: app/Views/partials/row-link.php:70 app/Views/partials/row.php:254
60
+ msgid "Quick Edit"
61
+ msgstr ""
62
+
63
+ #: app/Activation/Dependencies.php:126
64
+ msgid "Page Title"
65
+ msgstr ""
66
+
67
+ #: app/Activation/Dependencies.php:127 app/Views/partials/row.php:260
68
+ msgid "View"
69
+ msgstr ""
70
+
71
+ #: app/Activation/Dependencies.php:128 app/Views/forms/new-child.php:7
72
+ #: app/Views/partials/row.php:154
73
+ msgid "Add Child"
74
+ msgstr ""
75
+
76
+ #: app/Activation/Dependencies.php:129
77
+ msgid "Add Child Page"
78
+ msgstr ""
79
+
80
+ #: app/Activation/Dependencies.php:130
81
+ msgid "Add Child Pages"
82
+ msgstr ""
83
+
84
+ #: app/Activation/Dependencies.php:131 app/Views/forms/link-form.php:113
85
+ #: app/Views/forms/new-child.php:105
86
+ msgid "Add"
87
+ msgstr ""
88
+
89
+ #: app/Activation/Dependencies.php:132
90
+ msgid "Add Page"
91
+ msgstr ""
92
+
93
+ #: app/Activation/Dependencies.php:133
94
+ msgid "Add Pages"
95
+ msgstr ""
96
+
97
+ #: app/Activation/Dependencies.php:134 app/Views/listing.php:23
98
+ #: app/Views/listing.php:24
99
+ msgid "Add Multiple"
100
+ msgstr ""
101
+
102
+ #: app/Activation/Dependencies.php:135
103
+ msgid ""
104
+ "Are you sure you would like to empty the trash? This action is not "
105
+ "reversible."
106
+ msgstr ""
107
+
108
+ #: app/Activation/Dependencies.php:136 app/Views/partials/row-link.php:43
109
+ #: app/Views/partials/row.php:56
110
+ msgid "Hidden"
111
+ msgstr ""
112
+
113
+ #: app/Activation/Dependencies.php:137 app/Views/partials/list-header.php:11
114
+ msgid "Bulk Actions"
115
+ msgstr ""
116
+
117
+ #: app/Activation/Dependencies.php:138
118
+ msgid ""
119
+ "Your selection includes link items, which cannot be recovered after "
120
+ "deleting. Would you like to continue? (Other items are moved to the trash)"
121
+ msgstr ""
122
+
123
+ #: app/Activation/Dependencies.php:139
124
+ msgid ""
125
+ "Are you sure you would like to delete this item? This action is not "
126
+ "reversible."
127
+ msgstr ""
128
+
129
+ #: app/Activation/Dependencies.php:140
130
+ #: app/Views/forms/delete-confirmation-modal.php:11
131
+ msgid "Delete"
132
+ msgstr ""
133
+
134
+ #: app/Activation/Dependencies.php:141
135
+ msgid "Trash Posts and Delete Links"
136
+ msgstr ""
137
+
138
+ #: app/Activation/Dependencies.php:144
139
+ #: app/Views/settings/settings-posttypes.php:86
140
+ msgid "Currently assigned to:"
141
+ msgstr ""
142
+
143
+ #: app/Activation/Dependencies.php:145
144
+ #: app/Views/settings/settings-posttypes.php:86
145
+ msgid "Remove"
146
+ msgstr ""
147
+
148
+ #: app/Activation/Dependencies.php:148
149
+ msgid "Add Translation"
150
+ msgstr ""
151
+
152
+ #: app/Activation/Dependencies.php:149 app/Views/partials/list-header.php:15
153
+ #: app/Views/partials/row.php:73
154
+ msgid "Edit"
155
+ msgstr ""
156
+
157
+ #: app/Activation/Dependencies.php:150
158
+ msgid "Insert Before"
159
+ msgstr ""
160
+
161
+ #: app/Activation/Dependencies.php:151
162
+ msgid "Insert After"
163
+ msgstr ""
164
+
165
+ #: app/Bootstrap.php:67 app/Views/settings/settings-posttypes.php:22
166
+ msgid "Settings"
167
+ msgstr ""
168
+
169
+ #: app/Config/Settings.php:78 app/Views/settings/settings.php:2
170
+ msgid "Nested Pages Settings"
171
+ msgstr ""
172
+
173
+ #. Plugin Name of the plugin/theme
174
+ #: app/Config/Settings.php:79
175
+ msgid "Nested Pages"
176
+ msgstr ""
177
+
178
+ #: app/Config/SettingsRepository.php:79
179
+ msgid "Post Title"
180
+ msgstr ""
181
+
182
+ #: app/Config/SettingsRepository.php:80 app/Views/forms/quickedit-post.php:31
183
+ msgid "Slug"
184
+ msgstr ""
185
+
186
+ #: app/Config/SettingsRepository.php:81
187
+ msgid "Post Date"
188
+ msgstr ""
189
+
190
+ #: app/Config/SettingsRepository.php:82 app/Views/forms/clone-form.php:51
191
+ #: app/Views/forms/new-child.php:62 app/Views/forms/quickedit-post.php:79
192
+ #: app/Views/partials/bulk-edit.php:35
193
+ #: app/Views/settings/settings-posttypes.php:256
194
+ msgid "Author"
195
+ msgstr ""
196
+
197
+ #: app/Config/SettingsRepository.php:83
198
+ msgid "Post Status"
199
+ msgstr ""
200
+
201
+ #: app/Config/SettingsRepository.php:84
202
+ msgid "Password/Private"
203
+ msgstr ""
204
+
205
+ #: app/Config/SettingsRepository.php:85 app/Views/forms/quickedit-post.php:141
206
+ msgid "Allow Comments"
207
+ msgstr ""
208
+
209
+ #: app/Config/SettingsRepository.php:89 app/Views/forms/new-child.php:72
210
+ #: app/Views/forms/quickedit-post.php:115 app/Views/partials/bulk-edit.php:58
211
+ msgid "Template"
212
+ msgstr ""
213
+
214
+ #: app/Config/SettingsRepository.php:90 app/Views/forms/quickedit-post.php:166
215
+ msgid "Menu Options"
216
+ msgstr ""
217
+
218
+ #: app/Config/SettingsRepository.php:93 app/Views/forms/quickedit-link.php:60
219
+ #: app/Views/forms/quickedit-post.php:150
220
+ msgid "Hide in Nested Pages"
221
+ msgstr ""
222
+
223
+ #: app/Config/SettingsRepository.php:101 app/Views/forms/quickedit-post.php:170
224
+ msgid "Taxonomies"
225
+ msgstr ""
226
+
227
+ #: app/Entities/AdminMenu/AdminSubmenu.php:72
228
+ #: app/Views/partials/tool-list.php:46
229
+ msgid "Default"
230
+ msgstr ""
231
+
232
+ #: app/Entities/Confirmation/LinkDeletedConfirmation.php:11
233
+ msgid "Link successfully deleted."
234
+ msgstr ""
235
+
236
+ #: app/Entities/Confirmation/TrashConfirmation.php:18
237
+ msgid "Links Removed."
238
+ msgstr ""
239
+
240
+ #: app/Entities/Confirmation/TrashConfirmation.php:19
241
+ msgid "Link Removed."
242
+ msgstr ""
243
+
244
+ #: app/Entities/Confirmation/TrashConfirmation.php:28
245
+ #: app/Entities/Confirmation/TrashConfirmation.php:29
246
+ msgid "moved to the Trash."
247
+ msgstr ""
248
+
249
+ #: app/Entities/Confirmation/TrashConfirmation.php:33
250
+ msgid "Undo"
251
+ msgstr ""
252
+
253
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:12
254
+ msgid "items"
255
+ msgstr ""
256
+
257
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:12
258
+ msgid "item"
259
+ msgstr ""
260
+
261
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:13
262
+ msgid "restored from trash."
263
+ msgstr ""
264
+
265
+ #: app/Entities/PluginIntegration/WPML.php:146
266
+ msgid "Sync WPML Menus"
267
+ msgstr ""
268
+
269
+ #: app/Entities/PluginIntegration/WPML.php:223
270
+ msgid "All Languages"
271
+ msgstr ""
272
+
273
+ #: app/Entities/Post/PrivatePostParent.php:30
274
+ msgid "(no parent)"
275
+ msgstr ""
276
+
277
+ #: app/Entities/PostType/PostTypeRepository.php:412
278
+ msgid "Nested View"
279
+ msgstr ""
280
+
281
+ #: app/Entities/PostType/PostTypeRepository.php:412
282
+ msgid "Sort View"
283
+ msgstr ""
284
+
285
+ #: app/Entities/PostType/PostTypeRepository.php:470
286
+ #: app/Views/forms/clone-form.php:30 app/Views/forms/new-child.php:38
287
+ #: app/Views/forms/quickedit-link.php:30 app/Views/partials/bulk-edit.php:48
288
+ #: app/Views/partials/tool-list.php:18
289
+ msgid "Published"
290
+ msgstr ""
291
+
292
+ #: app/Entities/PostType/PostTypeRepository.php:471
293
+ #: app/Views/forms/quickedit-link.php:31
294
+ msgid "Scheduled"
295
+ msgstr ""
296
+
297
+ #: app/Entities/PostType/PostTypeRepository.php:474
298
+ #: app/Views/forms/clone-form.php:32 app/Views/forms/quickedit-link.php:33
299
+ #: app/Views/partials/bulk-edit.php:51
300
+ msgid "Pending Review"
301
+ msgstr ""
302
+
303
+ #: app/Entities/PostType/PostTypeRepository.php:475
304
+ #: app/Views/forms/clone-form.php:33 app/Views/forms/new-child.php:40
305
+ #: app/Views/forms/quickedit-link.php:34 app/Views/partials/bulk-edit.php:52
306
+ #: app/Views/partials/tool-list.php:22
307
+ msgid "Draft"
308
+ msgstr ""
309
+
310
+ #: app/Entities/PostType/RegisterPostTypes.php:29
311
+ msgid "Redirects"
312
+ msgstr ""
313
+
314
+ #: app/Entities/PostType/RegisterPostTypes.php:30
315
+ msgid "Redirect"
316
+ msgstr ""
317
+
318
+ #: app/Form/Listeners/BaseHandler.php:94
319
+ msgid "Incorrect Form Field"
320
+ msgstr ""
321
+
322
+ #: app/Form/Listeners/BaseHandler.php:128
323
+ msgid "There was an error updating the page."
324
+ msgstr ""
325
+
326
+ #: app/Form/Listeners/ClonePost.php:35
327
+ #: app/Form/Listeners/WpmlTranslations.php:47
328
+ msgid "Post Not Found"
329
+ msgstr ""
330
+
331
+ #: app/Form/Listeners/EmptyTrash.php:17
332
+ msgid "Trash successfully emptied."
333
+ msgstr ""
334
+
335
+ #: app/Form/Listeners/NewMenuItem.php:26
336
+ msgid "Custom Links must have a label."
337
+ msgstr ""
338
+
339
+ #: app/Form/Listeners/NewMenuItem.php:27 app/Form/Validation/Validation.php:150
340
+ msgid "Please provide a valid URL."
341
+ msgstr ""
342
+
343
+ #: app/Form/Listeners/NewMenuItem.php:46
344
+ #: app/Form/Listeners/QuickEditLink.php:28
345
+ msgid "Link successfully updated."
346
+ msgstr ""
347
+
348
+ #: app/Form/Listeners/QuickEdit.php:26
349
+ msgid "You do not have sufficient privileges to edit this post."
350
+ msgstr ""
351
+
352
+ #: app/Form/Listeners/QuickEdit.php:35
353
+ msgid "Post successfully updated."
354
+ msgstr ""
355
+
356
+ #: app/Form/Listeners/Sort.php:30
357
+ msgid "Page order successfully updated."
358
+ msgstr ""
359
+
360
+ #: app/Form/Listeners/Sort.php:32
361
+ msgid "There was an error updating the page order."
362
+ msgstr ""
363
+
364
+ #: app/Form/Listeners/SyncMenu.php:24
365
+ msgid "Menu sync disabled."
366
+ msgstr ""
367
+
368
+ #: app/Form/Listeners/SyncMenu.php:34
369
+ msgid "Menu sync enabled."
370
+ msgstr ""
371
+
372
+ #: app/Form/Listeners/WpmlTranslations.php:28
373
+ msgid "WPML is not currently installed."
374
+ msgstr ""
375
+
376
+ #: app/Form/Listeners/WpmlTranslations.php:35
377
+ msgid "There are currently no translations for the selected post."
378
+ msgstr ""
379
+
380
+ #: app/Form/Validation/Validation.php:136
381
+ msgid "Please provide a valid date."
382
+ msgstr ""
383
+
384
+ #: app/Form/Validation/Validation.php:147
385
+ msgid "Please provide a menu title."
386
+ msgstr ""
387
+
388
+ #: app/Form/Validation/Validation.php:160
389
+ msgid "Please provide a "
390
+ msgstr ""
391
+
392
+ #: app/Form/Validation/Validation.php:174
393
+ msgid "A valid parent page was not provided."
394
+ msgstr ""
395
+
396
+ #: app/Form/Validation/Validation.php:181
397
+ msgid "A valid parent page was not provided to insert before."
398
+ msgstr ""
399
+
400
+ #: app/Form/Validation/Validation.php:187
401
+ msgid "A valid parent page was not provided to insert after."
402
+ msgstr ""
403
+
404
+ #: app/Form/Validation/Validation.php:194
405
+ msgid "Please provide at least one page title."
406
+ msgstr ""
407
+
408
+ #: app/Form/Validation/Validation.php:202
409
+ msgid "Page titles cannot be blank."
410
+ msgstr ""
411
+
412
+ #: app/Views/forms/clone-form.php:10 app/Views/forms/clone-form.php:66
413
+ #: app/Views/partials/row.php:210
414
+ msgid "Clone"
415
+ msgstr ""
416
+
417
+ #: app/Views/forms/clone-form.php:15
418
+ msgid "Number of Copies"
419
+ msgstr ""
420
+
421
+ #: app/Views/forms/clone-form.php:27 app/Views/forms/new-child.php:35
422
+ #: app/Views/forms/quickedit-link.php:27 app/Views/forms/quickedit-post.php:93
423
+ #: app/Views/partials/bulk-edit.php:44
424
+ msgid "Status"
425
+ msgstr ""
426
+
427
+ #: app/Views/forms/clone-form.php:63
428
+ #: app/Views/forms/delete-confirmation-modal.php:10
429
+ #: app/Views/forms/empty-trash-modal.php:10 app/Views/forms/link-form.php:109
430
+ #: app/Views/forms/new-child.php:102 app/Views/forms/quickedit-link.php:84
431
+ #: app/Views/forms/quickedit-post.php:252 app/Views/partials/bulk-edit.php:143
432
+ msgid "Cancel"
433
+ msgstr ""
434
+
435
+ #: app/Views/forms/empty-trash-modal.php:9
436
+ msgid ""
437
+ "Are you sure you would like to empty the trash? This action is not "
438
+ "reversable."
439
+ msgstr ""
440
+
441
+ #: app/Views/forms/empty-trash-modal.php:11
442
+ msgid "Empty Trash"
443
+ msgstr ""
444
+
445
+ #: app/Views/forms/link-form.php:19
446
+ msgid "Custom Link"
447
+ msgstr ""
448
+
449
+ #: app/Views/forms/link-form.php:28 app/Views/forms/link-form.php:52
450
+ msgid "Search"
451
+ msgstr ""
452
+
453
+ #: app/Views/forms/link-form.php:35 app/Views/forms/link-form.php:52
454
+ msgid "No Results"
455
+ msgstr ""
456
+
457
+ #: app/Views/forms/link-form.php:66
458
+ msgid "Select an item"
459
+ msgstr ""
460
+
461
+ #: app/Views/forms/link-form.php:71
462
+ msgid "Original"
463
+ msgstr ""
464
+
465
+ #: app/Views/forms/link-form.php:76 app/Views/forms/quickedit-link.php:22
466
+ msgid "URL"
467
+ msgstr ""
468
+
469
+ #: app/Views/forms/link-form.php:80 app/Views/forms/quickedit-link.php:17
470
+ #: app/Views/forms/quickedit-post.php:216
471
+ msgid "Navigation Label"
472
+ msgstr ""
473
+
474
+ #: app/Views/forms/link-form.php:84 app/Views/forms/quickedit-link.php:44
475
+ #: app/Views/forms/quickedit-post.php:220
476
+ msgid "Title Attribute"
477
+ msgstr ""
478
+
479
+ #: app/Views/forms/link-form.php:88
480
+ msgid "CSS Classes (optional)"
481
+ msgstr ""
482
+
483
+ #: app/Views/forms/link-form.php:94 app/Views/forms/quickedit-link.php:66
484
+ #: app/Views/forms/quickedit-post.php:238
485
+ msgid "Open link in a new window/tab"
486
+ msgstr ""
487
+
488
+ #: app/Views/forms/new-child.php:28
489
+ msgid "+"
490
+ msgstr ""
491
+
492
+ #: app/Views/forms/new-child.php:74 app/Views/forms/quickedit-post.php:117
493
+ #: app/Views/partials/bulk-edit.php:61
494
+ msgid "Default Template"
495
+ msgstr ""
496
+
497
+ #: app/Views/forms/new-child.php:84 app/Views/forms/quickedit-link.php:54
498
+ #: app/Views/forms/quickedit-post.php:232 app/Views/partials/bulk-edit.php:108
499
+ msgid "Hide in Nav Menu"
500
+ msgstr ""
501
+
502
+ #: app/Views/forms/new-child.php:108
503
+ msgid "Add & Edit"
504
+ msgstr ""
505
+
506
+ #: app/Views/forms/quickedit-link.php:8
507
+ #: app/Views/settings/settings-posttypes.php:44
508
+ msgid "Link"
509
+ msgstr ""
510
+
511
+ #: app/Views/forms/quickedit-link.php:48 app/Views/forms/quickedit-post.php:224
512
+ msgid "CSS Classes"
513
+ msgstr ""
514
+
515
+ #: app/Views/forms/quickedit-link.php:87 app/Views/forms/quickedit-post.php:255
516
+ #: app/Views/partials/bulk-edit.php:146
517
+ msgid "Update"
518
+ msgstr ""
519
+
520
+ #: app/Views/forms/quickedit-post.php:39 app/Views/forms/quickedit-post.php:56
521
+ #: app/Views/partials/tool-list.php:87
522
+ #: app/Views/settings/settings-posttypes.php:268
523
+ msgid "Date"
524
+ msgstr ""
525
+
526
+ #: app/Views/forms/quickedit-post.php:42
527
+ msgid "@"
528
+ msgstr ""
529
+
530
+ #: app/Views/forms/quickedit-post.php:46
531
+ msgid "am"
532
+ msgstr ""
533
+
534
+ #: app/Views/forms/quickedit-post.php:47
535
+ msgid "pm"
536
+ msgstr ""
537
+
538
+ #: app/Views/forms/quickedit-post.php:125
539
+ msgid "Password"
540
+ msgstr ""
541
+
542
+ #: app/Views/forms/quickedit-post.php:128
543
+ msgid "&ndash;OR&ndash;"
544
+ msgstr ""
545
+
546
+ #: app/Views/forms/quickedit-post.php:131 app/Views/partials/bulk-edit.php:50
547
+ msgid "Private"
548
+ msgstr ""
549
+
550
+ #: app/Views/forms/quickedit-post.php:159
551
+ msgid "Make Sticky"
552
+ msgstr ""
553
+
554
+ #: app/Views/listing.php:43
555
+ msgid "Sync"
556
+ msgstr ""
557
+
558
+ #: app/Views/listing.php:43 app/Views/settings/settings-posttypes.php:284
559
+ msgid "Order"
560
+ msgstr ""
561
+
562
+ #: app/Views/listing.php:61 app/Views/listing.php:66
563
+ msgid "Sync Menu"
564
+ msgstr ""
565
+
566
+ #: app/Views/listing.php:85 app/Views/listing.php:88
567
+ msgid "Dismiss this notice."
568
+ msgstr ""
569
+
570
+ #: app/Views/partials/bulk-edit.php:10
571
+ msgid "Bulk Edit"
572
+ msgstr ""
573
+
574
+ #: app/Views/partials/bulk-edit.php:13
575
+ msgid "There are links selected. Bulk edit will not apply to links."
576
+ msgstr ""
577
+
578
+ #: app/Views/partials/bulk-edit.php:25 app/Views/partials/bulk-edit.php:46
579
+ #: app/Views/partials/bulk-edit.php:60 app/Views/partials/bulk-edit.php:90
580
+ #: app/Views/partials/bulk-edit.php:100 app/Views/partials/bulk-edit.php:110
581
+ msgid "No Change"
582
+ msgstr ""
583
+
584
+ #: app/Views/partials/bulk-edit.php:69
585
+ msgid "Parent"
586
+ msgstr ""
587
+
588
+ #: app/Views/partials/bulk-edit.php:72
589
+ msgid "— No Change —"
590
+ msgstr ""
591
+
592
+ #: app/Views/partials/bulk-edit.php:88 app/Views/partials/row.php:133
593
+ msgid "Comments"
594
+ msgstr ""
595
+
596
+ #: app/Views/partials/bulk-edit.php:91
597
+ msgid "Allow"
598
+ msgstr ""
599
+
600
+ #: app/Views/partials/bulk-edit.php:92
601
+ msgid "Do not allow"
602
+ msgstr ""
603
+
604
+ #: app/Views/partials/bulk-edit.php:98
605
+ msgid "Display in Nested View"
606
+ msgstr ""
607
+
608
+ #: app/Views/partials/bulk-edit.php:101 app/Views/partials/bulk-edit.php:111
609
+ msgid "Hide"
610
+ msgstr ""
611
+
612
+ #: app/Views/partials/bulk-edit.php:102 app/Views/partials/bulk-edit.php:112
613
+ msgid "Show"
614
+ msgstr ""
615
+
616
+ #: app/Views/partials/list-header.php:13
617
+ msgid "Move to Trash"
618
+ msgstr ""
619
+
620
+ #: app/Views/partials/list-header.php:17 app/Views/partials/tool-list.php:150
621
+ msgid "Apply"
622
+ msgstr ""
623
+
624
+ #: app/Views/partials/list-header.php:19
625
+ msgid "Nested Items Selected"
626
+ msgstr ""
627
+
628
+ #: app/Views/partials/row.php:33
629
+ msgid "Front Page"
630
+ msgstr ""
631
+
632
+ #: app/Views/partials/row.php:34
633
+ msgid "Posts Page"
634
+ msgstr ""
635
+
636
+ #: app/Views/partials/row.php:66
637
+ msgid "currently editing"
638
+ msgstr ""
639
+
640
+ #: app/Views/partials/row.php:79
641
+ msgid "Sticky"
642
+ msgstr ""
643
+
644
+ #: app/Views/partials/row.php:122
645
+ msgid "Translations"
646
+ msgstr ""
647
+
648
+ #: app/Views/partials/row.php:166
649
+ #, php-format
650
+ msgid "Insert %s Before"
651
+ msgstr ""
652
+
653
+ #: app/Views/partials/row.php:174
654
+ #, php-format
655
+ msgid "Insert %s After"
656
+ msgstr ""
657
+
658
+ #: app/Views/partials/row.php:189
659
+ msgid "Push to Top"
660
+ msgstr ""
661
+
662
+ #: app/Views/partials/row.php:200
663
+ msgid "Push to Bottom"
664
+ msgstr ""
665
+
666
+ #: app/Views/partials/tool-list.php:14
667
+ msgid "All"
668
+ msgstr ""
669
+
670
+ #: app/Views/partials/tool-list.php:37
671
+ msgid "Trash"
672
+ msgstr ""
673
+
674
+ #: app/Views/partials/tool-list.php:38
675
+ msgid "Empty"
676
+ msgstr ""
677
+
678
+ #: app/Views/partials/tool-list.php:65
679
+ msgid "All Authors"
680
+ msgstr ""
681
+
682
+ #: app/Views/partials/tool-list.php:86
683
+ msgid "Menu Order"
684
+ msgstr ""
685
+
686
+ #: app/Views/partials/tool-list.php:90
687
+ #: app/Views/settings/settings-posttypes.php:261
688
+ msgid "Order By"
689
+ msgstr ""
690
+
691
+ #: app/Views/partials/tool-list.php:111
692
+ #: app/Views/settings/settings-posttypes.php:291
693
+ msgid "Ascending"
694
+ msgstr ""
695
+
696
+ #: app/Views/partials/tool-list.php:112
697
+ #: app/Views/settings/settings-posttypes.php:292
698
+ msgid "Descending"
699
+ msgstr ""
700
+
701
+ #: app/Views/partials/tool-list.php:164
702
+ msgid "All "
703
+ msgstr ""
704
+
705
+ #: app/Views/partials/wpml-translations.php:4
706
+ msgid "Translations for "
707
+ msgstr ""
708
+
709
+ #: app/Views/partials/wpml-translations.php:13
710
+ msgid "Close"
711
+ msgstr ""
712
+
713
+ #: app/Views/settings/settings-general.php:4
714
+ msgid "Currently Enabled"
715
+ msgstr ""
716
+
717
+ #: app/Views/settings/settings-general.php:4
718
+ msgid "Currently Disabled"
719
+ msgstr ""
720
+
721
+ #: app/Views/settings/settings-general.php:9
722
+ msgid "Nested Pages Version"
723
+ msgstr ""
724
+
725
+ #: app/Views/settings/settings-general.php:14
726
+ msgid "Menu Name"
727
+ msgstr ""
728
+
729
+ #: app/Views/settings/settings-general.php:17
730
+ msgid ""
731
+ "Important: Once the menu name has changed, theme files should be updated to "
732
+ "reference the new name."
733
+ msgstr ""
734
+
735
+ #: app/Views/settings/settings-general.php:22
736
+ msgid "Display Options"
737
+ msgstr ""
738
+
739
+ #: app/Views/settings/settings-general.php:26
740
+ msgid "Enable Date Picker in Quick Edit"
741
+ msgstr ""
742
+
743
+ #: app/Views/settings/settings-general.php:31
744
+ msgid "Menu Sync"
745
+ msgstr ""
746
+
747
+ #: app/Views/settings/settings-general.php:37
748
+ msgid "Hide Menu Sync Checkbox"
749
+ msgstr ""
750
+
751
+ #: app/Views/settings/settings-general.php:44
752
+ msgid "Manually sync menu."
753
+ msgstr ""
754
+
755
+ #: app/Views/settings/settings-general.php:50
756
+ msgid "Manually sync page order."
757
+ msgstr ""
758
+
759
+ #: app/Views/settings/settings-general.php:56
760
+ msgid "Disable menu sync completely"
761
+ msgstr ""
762
+
763
+ #: app/Views/settings/settings-general.php:62
764
+ msgid "Allow Page Sorting"
765
+ msgstr ""
766
+
767
+ #: app/Views/settings/settings-general.php:72
768
+ msgid "Admins always have sorting ability."
769
+ msgstr ""
770
+
771
+ #: app/Views/settings/settings-general.php:76
772
+ msgid "Reset Plugin Settings"
773
+ msgstr ""
774
+
775
+ #: app/Views/settings/settings-general.php:80
776
+ msgid ""
777
+ "Warning: Resetting plugin settings will remove all menu settings, post type "
778
+ "customizations, role customizations and any other Nested Pages settings. "
779
+ "These will be replaced with the default settings. This action cannot be "
780
+ "undone."
781
+ msgstr ""
782
+
783
+ #: app/Views/settings/settings-general.php:83
784
+ msgid "Reset Nested Pages Settings"
785
+ msgstr ""
786
+
787
+ #: app/Views/settings/settings-general.php:87
788
+ msgid "Settings have been successfully reset."
789
+ msgstr ""
790
+
791
+ #: app/Views/settings/settings-general.php:92
792
+ #: app/Views/settings/settings-general.php:99
793
+ msgid "Reset User Preferences"
794
+ msgstr ""
795
+
796
+ #: app/Views/settings/settings-general.php:96
797
+ msgid ""
798
+ "Toggle states are saved for each user. This action will clear these "
799
+ "preferences for all users. If PHP errors appear within the nested view after "
800
+ "an update, this may help clear them."
801
+ msgstr ""
802
+
803
+ #: app/Views/settings/settings-general.php:103
804
+ msgid "User preferences have been successfully reset."
805
+ msgstr ""
806
+
807
+ #: app/Views/settings/settings-posttypes.php:7
808
+ msgid "Enable Post Types:"
809
+ msgstr ""
810
+
811
+ #: app/Views/settings/settings-posttypes.php:19
812
+ msgid "Hierarchical"
813
+ msgstr ""
814
+
815
+ #: app/Views/settings/settings-posttypes.php:29
816
+ msgid "Replace Default Menu"
817
+ msgstr ""
818
+
819
+ #: app/Views/settings/settings-posttypes.php:30
820
+ msgid "Replace the default top-level item with the nested view link."
821
+ msgstr ""
822
+
823
+ #: app/Views/settings/settings-posttypes.php:33
824
+ msgid "Replace Default"
825
+ msgstr ""
826
+
827
+ #: app/Views/settings/settings-posttypes.php:33
828
+ msgid "Menu"
829
+ msgstr ""
830
+
831
+ #: app/Views/settings/settings-posttypes.php:40
832
+ msgid "Remove Default Link"
833
+ msgstr ""
834
+
835
+ #: app/Views/settings/settings-posttypes.php:41
836
+ msgid ""
837
+ "If the default menu is replaced, a link to the default view will be added. "
838
+ "Select this to remove the link"
839
+ msgstr ""
840
+
841
+ #: app/Views/settings/settings-posttypes.php:44
842
+ msgid "Hide Default"
843
+ msgstr ""
844
+
845
+ #: app/Views/settings/settings-posttypes.php:51
846
+ #: app/Views/settings/settings-posttypes.php:55
847
+ msgid "Disable Sorting"
848
+ msgstr ""
849
+
850
+ #: app/Views/settings/settings-posttypes.php:52
851
+ msgid "Remove drag and drop sorting from this post type."
852
+ msgstr ""
853
+
854
+ #: app/Views/settings/settings-posttypes.php:63
855
+ msgid "Disable Nesting"
856
+ msgstr ""
857
+
858
+ #: app/Views/settings/settings-posttypes.php:64
859
+ msgid "To disable nesting on hierarchical post types, select this option."
860
+ msgstr ""
861
+
862
+ #: app/Views/settings/settings-posttypes.php:67
863
+ msgid "Disable Nesting for"
864
+ msgstr ""
865
+
866
+ #: app/Views/settings/settings-posttypes.php:75
867
+ msgid "Assign Page for Listing"
868
+ msgstr ""
869
+
870
+ #: app/Views/settings/settings-posttypes.php:76
871
+ msgid ""
872
+ "Adds contextual links and post counts to the page row for the assigned post "
873
+ "type."
874
+ msgstr ""
875
+
876
+ #: app/Views/settings/settings-posttypes.php:79
877
+ msgid "Assign Page"
878
+ msgstr ""
879
+
880
+ #: app/Views/settings/settings-posttypes.php:94
881
+ msgid "Search Pages"
882
+ msgstr ""
883
+
884
+ #: app/Views/settings/settings-posttypes.php:95
885
+ msgid "No pages were found."
886
+ msgstr ""
887
+
888
+ #: app/Views/settings/settings-posttypes.php:108
889
+ msgid "There are currently no pages available."
890
+ msgstr ""
891
+
892
+ #: app/Views/settings/settings-posttypes.php:124
893
+ msgid "Display Thumbnails"
894
+ msgstr ""
895
+
896
+ #: app/Views/settings/settings-posttypes.php:125
897
+ msgid "Display the thumbnail in the list sort view."
898
+ msgstr ""
899
+
900
+ #: app/Views/settings/settings-posttypes.php:126
901
+ msgid ""
902
+ "Note: Thumbnail width is displayed at a maximum of 80px in the nested pages "
903
+ "view. The image is scaled proportionally."
904
+ msgstr ""
905
+
906
+ #: app/Views/settings/settings-posttypes.php:129
907
+ msgid "Display Thumbnails for"
908
+ msgstr ""
909
+
910
+ #: app/Views/settings/settings-posttypes.php:132
911
+ msgid "Thumbnail Source"
912
+ msgstr ""
913
+
914
+ #: app/Views/settings/settings-posttypes.php:143
915
+ msgid "Thumbnail Display Size"
916
+ msgstr ""
917
+
918
+ #: app/Views/settings/settings-posttypes.php:145
919
+ msgid "Small"
920
+ msgstr ""
921
+
922
+ #: app/Views/settings/settings-posttypes.php:146
923
+ msgid "Medium"
924
+ msgstr ""
925
+
926
+ #: app/Views/settings/settings-posttypes.php:147
927
+ msgid "Large"
928
+ msgstr ""
929
+
930
+ #: app/Views/settings/settings-posttypes.php:156
931
+ #: app/Views/settings/settings-posttypes.php:160
932
+ msgid "Configure Standard Fields"
933
+ msgstr ""
934
+
935
+ #: app/Views/settings/settings-posttypes.php:157
936
+ msgid "Remove standard fields from the quick edit form."
937
+ msgstr ""
938
+
939
+ #: app/Views/settings/settings-posttypes.php:163
940
+ msgid "Check to remove from Quick Edit."
941
+ msgstr ""
942
+
943
+ #: app/Views/settings/settings-posttypes.php:205
944
+ #: app/Views/settings/settings-posttypes.php:209
945
+ msgid "Configure Custom Fields"
946
+ msgstr ""
947
+
948
+ #: app/Views/settings/settings-posttypes.php:206
949
+ msgid "Set which custom fields display in the quick edit form."
950
+ msgstr ""
951
+
952
+ #: app/Views/settings/settings-posttypes.php:212
953
+ msgid "Check to Include in Quick Edit."
954
+ msgstr ""
955
+
956
+ #: app/Views/settings/settings-posttypes.php:218
957
+ msgid "Advanced Custom Fields"
958
+ msgstr ""
959
+
960
+ #: app/Views/settings/settings-posttypes.php:233
961
+ msgid "No ACF Fields configured for this post type"
962
+ msgstr ""
963
+
964
+ #: app/Views/settings/settings-posttypes.php:249
965
+ msgid "Sort Options"
966
+ msgstr ""
967
+
968
+ #: app/Views/settings/settings-posttypes.php:250
969
+ msgid "Add and remove sort options."
970
+ msgstr ""
971
+
972
+ #: app/Views/settings/settings-posttypes.php:264
973
+ msgid "Initial Order By:"
974
+ msgstr ""
975
+
976
+ #: app/Views/settings/settings-posttypes.php:271
977
+ msgid "Default (Menu Order)"
978
+ msgstr ""
979
+
980
+ #: app/Views/settings/settings-posttypes.php:287
981
+ msgid "Initial Order:"
982
+ msgstr ""
983
+
984
+ #: app/Views/settings/settings-posttypes.php:324
985
+ msgid ""
986
+ "If default menu is not replaced, an additional submenu item will be added "
987
+ "for \"Nested/Sort View\""
988
+ msgstr ""
989
+
990
+ #: app/Views/settings/settings-posttypes.php:327
991
+ msgid ""
992
+ "<strong>Important:</strong> Changing page structures on live sites may "
993
+ "effect SEO and existing inbound links. Limit URL structure changes on live "
994
+ "sites by disabling nesting. Sorting within the current nesting structure "
995
+ "will still be available. If nesting changes are made to a live site, it may "
996
+ "help to add a 301 redirect from the old location to the new one."
997
+ msgstr ""
998
+
999
+ #: app/Views/settings/settings.php:6
1000
+ msgid "General"
1001
+ msgstr ""
1002
+
1003
+ #: app/Views/settings/settings.php:10
1004
+ msgid "Post Types"
1005
+ msgstr ""
1006
+
1007
+ #. Plugin URI of the plugin/theme
1008
+ msgid "http://nestedpages.com"
1009
+ msgstr ""
1010
+
1011
+ #. Description of the plugin/theme
1012
+ msgid ""
1013
+ "Provides an intuitive drag and drop interface for managing pages in the "
1014
+ "Wordpress admin, while enhancing quick edit. Includes an auto-generated menu "
1015
+ "to match the nested interface, support for all post types and more."
1016
+ msgstr ""
1017
+
1018
+ #. Author of the plugin/theme
1019
+ msgid "Kyle Phillips"
1020
+ msgstr ""
1021
+
1022
+ #. Author URI of the plugin/theme
1023
+ msgid "https://github.com/kylephillips"
1024
+ msgstr ""
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 enhancing quick edit. Includes an auto-generated menu to match the nested interface, support for all post types and more.
6
- Version: 3.0.9
7
  Author: Kyle Phillips
8
  Author URI: https://github.com/kylephillips
9
  Text Domain: wp-nested-pages
3
  Plugin Name: Nested Pages
4
  Plugin URI: http://nestedpages.com
5
  Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while enhancing quick edit. Includes an auto-generated menu to match the nested interface, support for all post types and more.
6
+ Version: 3.0.10
7
  Author: Kyle Phillips
8
  Author URI: https://github.com/kylephillips
9
  Text Domain: wp-nested-pages
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
5
  Requires at least: 3.8
6
  Tested up to: 5.1
7
  Requires PHP: 5.4
8
- Stable tag: 3.0.8
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -79,6 +79,9 @@ Yes! Visit Settings > Nested Pages > Post Types to configure thumbnail settings
79
  = Nested Pages changes my permalink structure. How do I stop that? =
80
  Nested Pages uses the same ordering methodology as WordPress core. The plugin offers an enhanced interface to achieve the same results. Parent/Child relationships are used in conjunction with the post menu_order field to nest and order posts/pages. There is currently no option to disable this core feature.
81
 
 
 
 
82
 
83
  == Screenshots ==
84
 
@@ -102,6 +105,10 @@ Nested Pages uses the same ordering methodology as WordPress core. The plugin of
102
 
103
  == Changelog ==
104
 
 
 
 
 
105
  = 3.0.9 =
106
  * Fixes Javascript bug introduced in v3.0.8 resulting in console error on page edit screen.
107
 
5
  Requires at least: 3.8
6
  Tested up to: 5.1
7
  Requires PHP: 5.4
8
+ Stable tag: 3.0.9
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
79
  = Nested Pages changes my permalink structure. How do I stop that? =
80
  Nested Pages uses the same ordering methodology as WordPress core. The plugin offers an enhanced interface to achieve the same results. Parent/Child relationships are used in conjunction with the post menu_order field to nest and order posts/pages. There is currently no option to disable this core feature.
81
 
82
+ = Can I generate a menu using a custom post type? =
83
+ No. The menu synchronization currently only works within the pages post type.
84
+
85
 
86
  == Screenshots ==
87
 
105
 
106
  == Changelog ==
107
 
108
+ = 3.0.10 =
109
+ * Fixes issue with translation file naming that was preventing plugin translations from loading.
110
+ * Adds settings action to reset user preferences (toggled/visible pages). For clearing user meta that may has become unnormalized during site/other plugin updates, resulting in PHP errors in the listing view.
111
+
112
  = 3.0.9 =
113
  * Fixes Javascript bug introduced in v3.0.8 resulting in console error on page edit screen.
114
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit236886854fb2275d6b0b4224182e20cd::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit56f1aa73876d57e9dead1f33d820aeb4::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -10,7 +10,7 @@
10
  * file that was distributed with this source code.
11
  */
12
 
13
- namespace NestedPages\Composer\Autoload;
14
 
15
  /**
16
  * ClassLoader implements a PSR-0 class loader
@@ -54,9 +54,15 @@ class ClassLoader
54
  private $useIncludePath = false;
55
  private $classMap = array();
56
 
 
 
57
  public function getPrefixes()
58
  {
59
- return call_user_func_array('array_merge', $this->prefixesPsr0);
 
 
 
 
60
  }
61
 
62
  public function getPrefixesPsr4()
@@ -143,6 +149,8 @@ class ClassLoader
143
  * @param string $prefix The prefix/namespace, with trailing '\\'
144
  * @param array|string $paths The PSR-0 base directories
145
  * @param bool $prepend Whether to prepend the directories
 
 
146
  */
147
  public function addPsr4($prefix, $paths, $prepend = false)
148
  {
@@ -202,10 +210,13 @@ class ClassLoader
202
  * Registers a set of PSR-4 directories for a given namespace,
203
  * replacing any others previously set for this namespace.
204
  *
205
- * @param string $prefix The prefix/namespace, with trailing '\\'
206
- * @param array|string $paths The PSR-4 base directories
 
 
207
  */
208
- public function setPsr4($prefix, $paths) {
 
209
  if (!$prefix) {
210
  $this->fallbackDirsPsr4 = (array) $paths;
211
  } else {
@@ -239,6 +250,27 @@ class ClassLoader
239
  return $this->useIncludePath;
240
  }
241
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  /**
243
  * Registers this instance as an autoloader.
244
  *
@@ -290,6 +322,9 @@ class ClassLoader
290
  if (isset($this->classMap[$class])) {
291
  return $this->classMap[$class];
292
  }
 
 
 
293
 
294
  $file = $this->findFileWithExtension($class, '.php');
295
 
@@ -316,7 +351,7 @@ class ClassLoader
316
  foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
317
  if (0 === strpos($class, $prefix)) {
318
  foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
319
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
320
  return $file;
321
  }
322
  }
@@ -326,7 +361,7 @@ class ClassLoader
326
 
327
  // PSR-4 fallback dirs
328
  foreach ($this->fallbackDirsPsr4 as $dir) {
329
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
330
  return $file;
331
  }
332
  }
@@ -345,7 +380,7 @@ class ClassLoader
345
  foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
346
  if (0 === strpos($class, $prefix)) {
347
  foreach ($dirs as $dir) {
348
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
349
  return $file;
350
  }
351
  }
@@ -355,7 +390,7 @@ class ClassLoader
355
 
356
  // PSR-0 fallback dirs
357
  foreach ($this->fallbackDirsPsr0 as $dir) {
358
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
359
  return $file;
360
  }
361
  }
10
  * file that was distributed with this source code.
11
  */
12
 
13
+ namespace Composer\Autoload;
14
 
15
  /**
16
  * ClassLoader implements a PSR-0 class loader
54
  private $useIncludePath = false;
55
  private $classMap = array();
56
 
57
+ private $classMapAuthoritative = false;
58
+
59
  public function getPrefixes()
60
  {
61
+ if (!empty($this->prefixesPsr0)) {
62
+ return call_user_func_array('array_merge', $this->prefixesPsr0);
63
+ }
64
+
65
+ return array();
66
  }
67
 
68
  public function getPrefixesPsr4()
149
  * @param string $prefix The prefix/namespace, with trailing '\\'
150
  * @param array|string $paths The PSR-0 base directories
151
  * @param bool $prepend Whether to prepend the directories
152
+ *
153
+ * @throws \InvalidArgumentException
154
  */
155
  public function addPsr4($prefix, $paths, $prepend = false)
156
  {
210
  * Registers a set of PSR-4 directories for a given namespace,
211
  * replacing any others previously set for this namespace.
212
  *
213
+ * @param string $prefix The prefix/namespace, with trailing '\\'
214
+ * @param array|string $paths The PSR-4 base directories
215
+ *
216
+ * @throws \InvalidArgumentException
217
  */
218
+ public function setPsr4($prefix, $paths)
219
+ {
220
  if (!$prefix) {
221
  $this->fallbackDirsPsr4 = (array) $paths;
222
  } else {
250
  return $this->useIncludePath;
251
  }
252
 
253
+ /**
254
+ * Turns off searching the prefix and fallback directories for classes
255
+ * that have not been registered with the class map.
256
+ *
257
+ * @param bool $classMapAuthoritative
258
+ */
259
+ public function setClassMapAuthoritative($classMapAuthoritative)
260
+ {
261
+ $this->classMapAuthoritative = $classMapAuthoritative;
262
+ }
263
+
264
+ /**
265
+ * Should class lookup fail if not found in the current class map?
266
+ *
267
+ * @return bool
268
+ */
269
+ public function isClassMapAuthoritative()
270
+ {
271
+ return $this->classMapAuthoritative;
272
+ }
273
+
274
  /**
275
  * Registers this instance as an autoloader.
276
  *
322
  if (isset($this->classMap[$class])) {
323
  return $this->classMap[$class];
324
  }
325
+ if ($this->classMapAuthoritative) {
326
+ return false;
327
+ }
328
 
329
  $file = $this->findFileWithExtension($class, '.php');
330
 
351
  foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
352
  if (0 === strpos($class, $prefix)) {
353
  foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
354
+ if (is_file($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
355
  return $file;
356
  }
357
  }
361
 
362
  // PSR-4 fallback dirs
363
  foreach ($this->fallbackDirsPsr4 as $dir) {
364
+ if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
365
  return $file;
366
  }
367
  }
380
  foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
381
  if (0 === strpos($class, $prefix)) {
382
  foreach ($dirs as $dir) {
383
+ if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
384
  return $file;
385
  }
386
  }
390
 
391
  // PSR-0 fallback dirs
392
  foreach ($this->fallbackDirsPsr0 as $dir) {
393
+ if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
394
  return $file;
395
  }
396
  }
vendor/composer/autoload_real.php CHANGED
@@ -2,13 +2,13 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit236886854fb2275d6b0b4224182e20cd
6
  {
7
  private static $loader;
8
 
9
  public static function loadClassLoader($class)
10
  {
11
- if ('NestedPages\Composer\Autoload\ClassLoader' === $class) {
12
  require __DIR__ . '/ClassLoader.php';
13
  }
14
  }
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit236886854fb2275d6b0b4224182e20cd
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit236886854fb2275d6b0b4224182e20cd', 'loadClassLoader'), true, true);
23
- self::$loader = $loader = new \NestedPages\Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit236886854fb2275d6b0b4224182e20cd', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -44,7 +44,7 @@ class ComposerAutoloaderInit236886854fb2275d6b0b4224182e20cd
44
  }
45
  }
46
 
47
- function composerRequire236886854fb2275d6b0b4224182e20cd($file)
48
  {
49
  require $file;
50
  }
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit56f1aa73876d57e9dead1f33d820aeb4
6
  {
7
  private static $loader;
8
 
9
  public static function loadClassLoader($class)
10
  {
11
+ if ('Composer\Autoload\ClassLoader' === $class) {
12
  require __DIR__ . '/ClassLoader.php';
13
  }
14
  }
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit56f1aa73876d57e9dead1f33d820aeb4', 'loadClassLoader'), true, true);
23
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit56f1aa73876d57e9dead1f33d820aeb4', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
44
  }
45
  }
46
 
47
+ function composerRequire56f1aa73876d57e9dead1f33d820aeb4($file)
48
  {
49
  require $file;
50
  }