Skip to content

Commit

Permalink
Fix SIG not shown in Jetpack sidebar (#36895)
Browse files Browse the repository at this point in the history
* Fix SIG not shown in Jetpack sidebar

* Ensure that the panel is shown when module is active

* Disabling publicize should disable SIG
  • Loading branch information
manzoorwanijk authored Apr 15, 2024
1 parent 781e346 commit e8db235
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Fixed SIG not visible in Jetpack sidebar
12 changes: 7 additions & 5 deletions projects/plugins/jetpack/extensions/plugins/publicize/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const name = 'publicize';
const PublicizeSettings = () => {
const { isLoadingModules, isChangingStatus, isModuleActive, changeStatus } =
useModuleStatus( name );
const { isSocialImageGeneratorAvailable } = usePublicizeConfig();
const { isSocialImageGeneratorAvailable, isPublicizeEnabled } = usePublicizeConfig();

let children = null;
let panels = null;
Expand All @@ -45,13 +45,15 @@ const PublicizeSettings = () => {
);
} else {
children = (
<PublicizePanel>
<UpsellNotice />
</PublicizePanel>
<>
<PublicizePanel>
<UpsellNotice />
</PublicizePanel>
{ isSocialImageGeneratorAvailable && isPublicizeEnabled && <SocialImageGeneratorPanel /> }
</>
);
panels = (
<>
{ isSocialImageGeneratorAvailable && <SocialImageGeneratorPanel /> }
<PrePublishPanels isSocialImageGeneratorAvailable={ isSocialImageGeneratorAvailable } />
<PostPublishPanels />
</>
Expand Down

0 comments on commit e8db235

Please sign in to comment.