Nested Pages - Version 1.7.1

Version Description

  • Bug fix where saving post type options was enabling all post types
Download this release

Release Info

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

Code changes from version 1.7.0 to 1.7.1

app/NestedPages.php CHANGED
@@ -12,7 +12,7 @@ class NestedPages
12
  $np_env = 'live';
13
 
14
  global $np_version;
15
- $np_version = '1.7.0';
16
 
17
  if ( is_admin() ) $app = new NestedPages\Bootstrap;
18
  if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
12
  $np_env = 'live';
13
 
14
  global $np_version;
15
+ $np_version = '1.7.1';
16
 
17
  if ( is_admin() ) $app = new NestedPages\Bootstrap;
18
  if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
assets/js/lib/nestedpages.settings.js CHANGED
@@ -95,12 +95,14 @@ NestedPages.Settings = function()
95
  var button = $(checkbox).parents('.head').find(plugin.selectors.postTypeToggle);
96
  if ( $(checkbox).is(':checked') ){
97
  $(button).show();
 
98
  return;
99
  }
100
  $(button).hide();
101
  $(button).parents('.head').siblings('.body').hide();
102
  $(button).parents('.post-type').removeClass('active');
103
  $(button).parents('.head').siblings('.body').find('input[type="checkbox"]').attr('checked', false);
 
104
  $(button).parents('.head').siblings('.body').find('select').val(false);
105
  }
106
 
95
  var button = $(checkbox).parents('.head').find(plugin.selectors.postTypeToggle);
96
  if ( $(checkbox).is(':checked') ){
97
  $(button).show();
98
+ $(button).parents('.head').siblings('.body').find('input[type="hidden"]').attr('disabled', false);
99
  return;
100
  }
101
  $(button).hide();
102
  $(button).parents('.head').siblings('.body').hide();
103
  $(button).parents('.post-type').removeClass('active');
104
  $(button).parents('.head').siblings('.body').find('input[type="checkbox"]').attr('checked', false);
105
+ $(button).parents('.head').siblings('.body').find('input[type="hidden"]').attr('disabled', true);
106
  $(button).parents('.head').siblings('.body').find('select').val(false);
107
  }
108
 
assets/js/nestedpages.settings.min.js CHANGED
@@ -1 +1 @@
1
- var NestedPages=NestedPages||{};NestedPages.Settings=function(){var e=this,t=jQuery;return e.selectors={postTypeToggle:"[data-toggle-nestedpages-pt-settings]",postTypeCheckbox:"[data-nestedpages-pt-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]"},e.bindEvents=function(){t(document).ready(function(){e.toggleAllSettingsButtons(),e.toogleAllFieldSettings(".custom-fields"),e.toogleAllFieldSettings(".standard-fields"),e.toggleMenuCheckboxes(),e.toggleHideCheckbox(),e.toggleAssignPostType()}),t(document).on("click",e.selectors.postTypeToggle,function(s){s.preventDefault(),e.togglePostTypeSettings(t(this))}),t(document).on("change",e.selectors.postTypeCheckbox,function(){e.toggleSettingsButton(t(this))}),t(document).on("change",e.selectors.customFieldsCheckbox,function(){e.toogleFieldSettings(t(this),".custom-fields")}),t(document).on("change",e.selectors.standardFieldsCheckbox,function(){e.toogleFieldSettings(t(this),".standard-fields")}),t(document).on("change",e.selectors.taxonomiesFieldCheckbox,function(){e.toggleTaxonomyCheckboxes(t(this))}),t(document).on("change",e.selectors.thumbnailsCheckbox,function(){e.toggleThumbnailSettings(t(this))}),t(document).on("change",e.selectors.disableMenuCheckbox,function(){e.toggleMenuCheckboxes()}),t(document).on("change",e.selectors.disableAutoCheckbox,function(){e.toggleHideCheckbox()}),t(document).on("change",e.selectors.assignPostTypeCheckbox,function(){e.toggleAssignPostType()}),t(document).on("click",e.selectors.assignPostTypeOption,function(s){s.preventDefault(),e.chooseAssignPostType(t(this))}),t(document).on("click",e.selectors.assignPostTypeRemove,function(s){s.preventDefault(),e.removeAssignPostType(t(this))})},e.togglePostTypeSettings=function(e){t(e).parent(".head").siblings(".body").toggle(),t(e).parents(".post-type").toggleClass("active")},e.toggleSettingsButton=function(s){var o=t(s).parents(".head").find(e.selectors.postTypeToggle);return t(s).is(":checked")?void t(o).show():(t(o).hide(),t(o).parents(".head").siblings(".body").hide(),t(o).parents(".post-type").removeClass("active"),t(o).parents(".head").siblings(".body").find('input[type="checkbox"]').attr("checked",!1),void t(o).parents(".head").siblings(".body").find("select").val(!1))},e.toggleAllSettingsButtons=function(){var s=t(e.selectors.postTypeCheckbox);t.each(s,function(){e.toggleSettingsButton(t(this))})},e.toogleFieldSettings=function(e,s){var o=t(e).parents(".body").find(s);return t(e).is(":checked")?void t(o).show():void t(o).hide()},e.toogleAllFieldSettings=function(s){var o=t(e.selectors.customFieldsCheckbox);if(".standard-fields"==s)var o=t(e.selectors.standardFieldsCheckbox);t.each(o,function(){e.toogleFieldSettings(t(this),s)})},e.toggleTaxonomyCheckboxes=function(e){var s=t(e).parents("ul").find(t("*[data-taxonomy-single]"));return t(e).is(":checked")?void t(s).hide():void t(s).show()},e.toggleThumbnailSettings=function(e){var s=t(e).parents(".field").find(t("*[data-thumbnail-options]"));return t(e).is(":checked")?void t(s).show():void t(s).hide()},e.toggleMenuCheckboxes=function(){var s=t(e.selectors.disableMenuCheckbox),o=t(e.selectors.menuEnabledOption);return t(s).is(":checked")?void t(o).hide():void t(o).show()},e.toggleHideCheckbox=function(){var s=t(e.selectors.disableAutoCheckbox),o=t("[data-menu-hide-checkbox]");return t(s).is(":checked")?void t(o).hide():void t(o).show()},e.toggleAssignPostType=function(){var s=t(e.selectors.assignPostTypeCheckbox);t.each(s,function(){var e=t(this),s=t(this).parents(".field").find(".nestedpages-assignment-display");t(e).is(":checked")?t(s).show():t(s).hide()})},e.chooseAssignPostType=function(s){var o=t(s).attr("data-assignment-page-id"),n=t(s).attr("data-assignment-page-title"),i=t(s).parents(".field"),a=nestedpages.currently_assigned_to+" "+n+' <a href="#" data-nestedpages-page-pt-assignment-remove>('+nestedpages.remove+")</a>";t(i).find(e.selectors.assignPostTypeId).val(o),t(i).find(e.selectors.assignPostTypeTitle).val(n),t(i).find(e.selectors.assignPostTypeSelection).html(a).show(),t(i).find("[data-nestedpages-post-search-form]").hide()},e.removeAssignPostType=function(s){var o=t(s).parents(".field");t(o).find(e.selectors.assignPostTypeSelection).hide(),t(o).find("[data-nestedpages-post-search-form]").show(),t(o).find(e.selectors.assignPostTypeId).val(""),t(o).find(e.selectors.assignPostTypeTitle).val("")},e.init=function(){e.bindEvents()},e.init()},new NestedPages.Settings;
1
+ var NestedPages=NestedPages||{};NestedPages.Settings=function(){var e=this,t=jQuery;return e.selectors={postTypeToggle:"[data-toggle-nestedpages-pt-settings]",postTypeCheckbox:"[data-nestedpages-pt-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]"},e.bindEvents=function(){t(document).ready(function(){e.toggleAllSettingsButtons(),e.toogleAllFieldSettings(".custom-fields"),e.toogleAllFieldSettings(".standard-fields"),e.toggleMenuCheckboxes(),e.toggleHideCheckbox(),e.toggleAssignPostType()}),t(document).on("click",e.selectors.postTypeToggle,function(s){s.preventDefault(),e.togglePostTypeSettings(t(this))}),t(document).on("change",e.selectors.postTypeCheckbox,function(){e.toggleSettingsButton(t(this))}),t(document).on("change",e.selectors.customFieldsCheckbox,function(){e.toogleFieldSettings(t(this),".custom-fields")}),t(document).on("change",e.selectors.standardFieldsCheckbox,function(){e.toogleFieldSettings(t(this),".standard-fields")}),t(document).on("change",e.selectors.taxonomiesFieldCheckbox,function(){e.toggleTaxonomyCheckboxes(t(this))}),t(document).on("change",e.selectors.thumbnailsCheckbox,function(){e.toggleThumbnailSettings(t(this))}),t(document).on("change",e.selectors.disableMenuCheckbox,function(){e.toggleMenuCheckboxes()}),t(document).on("change",e.selectors.disableAutoCheckbox,function(){e.toggleHideCheckbox()}),t(document).on("change",e.selectors.assignPostTypeCheckbox,function(){e.toggleAssignPostType()}),t(document).on("click",e.selectors.assignPostTypeOption,function(s){s.preventDefault(),e.chooseAssignPostType(t(this))}),t(document).on("click",e.selectors.assignPostTypeRemove,function(s){s.preventDefault(),e.removeAssignPostType(t(this))})},e.togglePostTypeSettings=function(e){t(e).parent(".head").siblings(".body").toggle(),t(e).parents(".post-type").toggleClass("active")},e.toggleSettingsButton=function(s){var n=t(s).parents(".head").find(e.selectors.postTypeToggle);return t(s).is(":checked")?(t(n).show(),void t(n).parents(".head").siblings(".body").find('input[type="hidden"]').attr("disabled",!1)):(t(n).hide(),t(n).parents(".head").siblings(".body").hide(),t(n).parents(".post-type").removeClass("active"),t(n).parents(".head").siblings(".body").find('input[type="checkbox"]').attr("checked",!1),t(n).parents(".head").siblings(".body").find('input[type="hidden"]').attr("disabled",!0),void t(n).parents(".head").siblings(".body").find("select").val(!1))},e.toggleAllSettingsButtons=function(){var s=t(e.selectors.postTypeCheckbox);t.each(s,function(){e.toggleSettingsButton(t(this))})},e.toogleFieldSettings=function(e,s){var n=t(e).parents(".body").find(s);return t(e).is(":checked")?void t(n).show():void t(n).hide()},e.toogleAllFieldSettings=function(s){var n=t(e.selectors.customFieldsCheckbox);if(".standard-fields"==s)var n=t(e.selectors.standardFieldsCheckbox);t.each(n,function(){e.toogleFieldSettings(t(this),s)})},e.toggleTaxonomyCheckboxes=function(e){var s=t(e).parents("ul").find(t("*[data-taxonomy-single]"));return t(e).is(":checked")?void t(s).hide():void t(s).show()},e.toggleThumbnailSettings=function(e){var s=t(e).parents(".field").find(t("*[data-thumbnail-options]"));return t(e).is(":checked")?void t(s).show():void t(s).hide()},e.toggleMenuCheckboxes=function(){var s=t(e.selectors.disableMenuCheckbox),n=t(e.selectors.menuEnabledOption);return t(s).is(":checked")?void t(n).hide():void t(n).show()},e.toggleHideCheckbox=function(){var s=t(e.selectors.disableAutoCheckbox),n=t("[data-menu-hide-checkbox]");return t(s).is(":checked")?void t(n).hide():void t(n).show()},e.toggleAssignPostType=function(){var s=t(e.selectors.assignPostTypeCheckbox);t.each(s,function(){var e=t(this),s=t(this).parents(".field").find(".nestedpages-assignment-display");t(e).is(":checked")?t(s).show():t(s).hide()})},e.chooseAssignPostType=function(s){var n=t(s).attr("data-assignment-page-id"),o=t(s).attr("data-assignment-page-title"),i=t(s).parents(".field"),a=nestedpages.currently_assigned_to+" "+o+' <a href="#" data-nestedpages-page-pt-assignment-remove>('+nestedpages.remove+")</a>";t(i).find(e.selectors.assignPostTypeId).val(n),t(i).find(e.selectors.assignPostTypeTitle).val(o),t(i).find(e.selectors.assignPostTypeSelection).html(a).show(),t(i).find("[data-nestedpages-post-search-form]").hide()},e.removeAssignPostType=function(s){var n=t(s).parents(".field");t(n).find(e.selectors.assignPostTypeSelection).hide(),t(n).find("[data-nestedpages-post-search-form]").show(),t(n).find(e.selectors.assignPostTypeId).val(""),t(n).find(e.selectors.assignPostTypeTitle).val("")},e.init=function(){e.bindEvents()},e.init()},new NestedPages.Settings;
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: 1.7.0
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: 1.7.1
7
  Author: Kyle Phillips
8
  Author URI: https://github.com/kylephillips
9
  Text Domain: wp-nested-pages
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://nestedpages.com/
4
  Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
5
  Requires at least: 3.8
6
  Tested up to: 4.7
7
- Stable tag: 1.6.8
8
 
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -99,6 +99,9 @@ As of version 1.6, yes. Visit Settings > Nested Pages > Post Types to configure
99
 
100
  == Changelog ==
101
 
 
 
 
102
  = 1.7.0 =
103
  * Added option to disable sorting per post type
104
  * Added option to assign a post type page. Assigning a page to a post type adds "Add New" and "All" links to the page row for the given post type, along with a count of published posts for that type
4
  Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
5
  Requires at least: 3.8
6
  Tested up to: 4.7
7
+ Stable tag: 1.7.0
8
 
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
99
 
100
  == Changelog ==
101
 
102
+ = 1.7.1 =
103
+ * Bug fix where saving post type options was enabling all post types
104
+
105
  = 1.7.0 =
106
  * Added option to disable sorting per post type
107
  * Added option to assign a post type page. Assigning a page to a post type adds "Add New" and "All" links to the page row for the given post type, along with a count of published posts for that type