Skip to content

Commit

Permalink
Merge pull request Automattic#7466 from Automattic/remove/cpt-jetpack…
Browse files Browse the repository at this point in the history
…-support

CPT: Disable CPT writing settings for unsupported Jetpack versions
  • Loading branch information
aduth authored Aug 15, 2016
2 parents c5ec5ae + ba55403 commit 40657f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/my-sites/site-settings/form-writing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const SiteSettingsFormWriting = React.createClass( {
isCustomPostTypesSettingsEnabled() {
return (
config.isEnabled( 'manage/custom-post-types' ) &&
false !== this.props.jetpackVersionSupportsCustomTypes
this.props.jetpackVersionSupportsCustomTypes
);
},

Expand Down Expand Up @@ -168,7 +168,7 @@ const SiteSettingsFormWriting = React.createClass( {
</FormSelect>
</FormFieldset>

{ config.isEnabled( 'manage/custom-post-types' ) && (
{ config.isEnabled( 'manage/custom-post-types' ) && this.props.jetpackVersionSupportsCustomTypes && (
<CustomPostTypeFieldset
requestingSettings={ this.state.fetchingSettings }
value={ pick( this.state, 'jetpack_testimonial', 'jetpack_portfolio' ) }
Expand Down Expand Up @@ -227,8 +227,8 @@ export default connect(
const siteId = getSelectedSiteId( state );

return {
jetpackCustomTypesModuleActive: isJetpackModuleActive( state, siteId, 'custom-content-types' ),
jetpackVersionSupportsCustomTypes: isJetpackMinimumVersion( state, siteId, '4.2.0' )
jetpackCustomTypesModuleActive: false !== isJetpackModuleActive( state, siteId, 'custom-content-types' ),
jetpackVersionSupportsCustomTypes: false !== isJetpackMinimumVersion( state, siteId, '4.2.0' )
};
},
{ requestPostTypes },
Expand Down

0 comments on commit 40657f4

Please sign in to comment.