diff --git a/assets/js/boldgrid-inspirations.js b/assets/js/boldgrid-inspirations.js
index d08f10c..d3e7e34 100644
--- a/assets/js/boldgrid-inspirations.js
+++ b/assets/js/boldgrid-inspirations.js
@@ -1357,7 +1357,10 @@ IMHWPB.InspirationsDesignFirst = function( $, configs ) {
* @since 1.2.3
*/
this.initCategories = function() {
- var failureMessage, failAction, success_action;
+ var template = wp.template( 'init-categories' ),
+ failureMessage,
+ failAction,
+ success_action;
// Show a loading message to the user that we're fetching categories.
self.$categories.html( Inspiration.fetchingCategories + ' ' );
@@ -1418,12 +1421,47 @@ IMHWPB.InspirationsDesignFirst = function( $, configs ) {
}
};
- self.ajax.ajaxCall(
- { inspirations_mode: 'standard' },
- 'get_categories',
- success_action,
- failAction
- );
+ /**
+ * We are now only going to display the 'default' category on the stable release channel.
+ *
+ * Rather than remove the code that fetches categories, we will just hide the categories
+ * in case we need to revert back to the old behavior, or if we need to display categories
+ * for development / test releases. This method easily allows for them to be displayed if the
+ * user has selected a non-stable release channel.
+ *
+ * Adding this logic here, rather than inside the 'success_action' callback, also prevents making
+ * an unnecessary API call to fetch the categories list.
+ */
+ if ( 'stable' === self.themeReleaseChannel ) {
+ template = wp.template( 'init-categories' );
+ self.categories = {};
+ self.categories.default = {
+ subcategories: [
+ {
+ displayOrder: 1,
+ name: 'Default',
+ id: 'default'
+ }
+ ]
+ };
+
+ self.$categories.html( template( self.categories ) );
+
+ self.sortCategories( 'data-display-order' );
+
+ self.initThemes();
+
+ $( '#screen-design #categories.left' ).hide();
+ $( '#screen-design #categories.left .sub-category.active' ).hide();
+ $( '#screen-design .right.theme-browser' ).css( 'width', '100%' );
+ } else {
+ self.ajax.ajaxCall(
+ { inspirations_mode: 'standard' },
+ 'get_categories',
+ success_action,
+ failAction
+ );
+ }
};
/**
@@ -1618,6 +1656,11 @@ IMHWPB.InspirationsDesignFirst = function( $, configs ) {
build.isDefault = false;
}
+ // On the stable release channel, we only display 'default' themes category.
+ if ( 'stable' === self.themeReleaseChannel ) {
+ return;
+ }
+
/**
* If, however, the theme's category is hidden from the sidebar, we do not want
* to have it printed twice, since the user does not need to be able to select that
diff --git a/pages/templates/boldgrid-inspirations.php b/pages/templates/boldgrid-inspirations.php
index 6abb28e..51ecccb 100644
--- a/pages/templates/boldgrid-inspirations.php
+++ b/pages/templates/boldgrid-inspirations.php
@@ -1,17 +1,24 @@