We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b44214c commit c86e555Copy full SHA for c86e555
src/editor/taxonomy-panel/index.js
@@ -33,19 +33,18 @@ export const TaxonomyPanel = PostTaxonomies => {
33
labels.name.toLowerCase()
34
);
35
36
- // Remove "Add new sponsors" link since sponsor terms are shadow terms of sponsor posts.
37
- if ( 'newspack_spnsrs_tax' === slug ) {
38
- props.hasCreateAction = false;
39
- }
40
-
41
return (
42
<Fragment>
43
{ 'newspack_spnsrs_cpt' === postType && ( slug === 'category' || slug === 'post_tag' ) && (
44
<p>
45
<em>{ message }</em>
46
</p>
47
) }
48
- <PostTaxonomies { ...props } />
+ <PostTaxonomies
+ { ...props }
+ // Remove "Add new sponsors" link since sponsor terms are shadow terms of sponsor posts.
+ hasCreateAction={ 'newspack_spnsrs_tax' !== slug }
+ />
49
</Fragment>
50
51
};
0 commit comments