Skip to content

Commit

Permalink
Ignore taxonomies with "show_cloud" false
Browse files Browse the repository at this point in the history
  • Loading branch information
jahvi committed May 4, 2018
1 parent fa4e306 commit 4876922
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blocks/library/tag-cloud/block.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { map } from 'lodash';
import { map, filter } from 'lodash';
import { stringify } from 'querystringify';

/**
Expand Down Expand Up @@ -31,7 +31,7 @@ class TagCloudBlock extends Component {
}

getTaxonomies() {
const taxonomies = this.props.taxonomies.data;
const taxonomies = filter( this.props.taxonomies.data, 'show_cloud' );

return map( taxonomies, taxonomy => {
return {
Expand Down Expand Up @@ -127,7 +127,7 @@ export default withAPIData( ( props, { taxonomy } ) => {
} );

return {
taxonomies: '/wp/v2/taxonomies',
taxonomies: '/wp/v2/taxonomies?context=edit',
termList: `/wp/v2/${ taxonomyRestBase }?${ queryString }`,
};
} )( TagCloudBlock );

0 comments on commit 4876922

Please sign in to comment.