File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
packages/js/src/components/fills Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,10 @@ const BlackFridayPromotionWithMetaboxWarningsCheck = withMetaboxWarningsCheck( B
3838 * @returns {wp.Element } The Metabox component.
3939 */
4040export default function MetaboxFill ( { settings } ) {
41- const { isTerm, isPost } = useSelect ( ( select ) => ( {
41+ const { isTerm, isPost, isAiFeatureActive } = useSelect ( ( select ) => ( {
4242 isTerm : select ( "yoast-seo/editor" ) . getIsTerm ( ) ,
4343 isPost : select ( "yoast-seo/editor" ) . getPostType ( ) === "post" ,
44+ isAiFeatureActive : select ( "yoast-seo/editor" ) . getPreference ( "isAiFeatureActive" ) ,
4445 } ) , [ ] ) ;
4546
4647 const isBlockEditorActive = isBlockEditor ( ) ;
@@ -64,7 +65,7 @@ export default function MetaboxFill( { settings } ) {
6465 >
6566 < EditorIntro isBlockEditor = { isBlockEditorActive } isPost = { isPost } />
6667 </ SidebarItem >
67- { isPost && isBlockEditorActive && < SidebarItem key = "next-post" renderPriority = { 2 } >
68+ { isPost && isBlockEditorActive && isAiFeatureActive && < SidebarItem key = "next-post" renderPriority = { 2 } >
6869 < NextPostEditorItem location = "metabox" />
6970 </ SidebarItem > }
7071 < SidebarItem
Original file line number Diff line number Diff line change @@ -41,7 +41,10 @@ import { EditorIntro } from "../EditorIntro";
4141export default function SidebarFill ( { settings } ) {
4242 const webinarIntroUrl = get ( window , "wpseoScriptData.webinarIntroBlockEditorUrl" , "https://yoa.st/webinar-intro-block-editor" ) ;
4343 const FirstEligibleNotification = useFirstEligibleNotification ( { webinarIntroUrl } ) ;
44- const isPost = useSelect ( ( select ) => select ( "yoast-seo/editor" ) . getPostType ( ) === "post" , [ ] ) ;
44+ const { isAiFeatureActive, isPost } = useSelect ( ( select ) => ( {
45+ isAiFeatureActive : select ( "yoast-seo/editor" ) . getPreference ( "isAiFeatureActive" ) ,
46+ isPost : select ( "yoast-seo/editor" ) . getPostType ( ) === "post" ,
47+ } ) , [ ] ) ;
4548
4649 const isBlockEditorActive = isBlockEditor ( ) ;
4750 if ( isBlockEditorActive ) {
@@ -63,7 +66,7 @@ export default function SidebarFill( { settings } ) {
6366 >
6467 < EditorIntro isBlockEditor = { isBlockEditorActive } isPost = { isPost } />
6568 </ SidebarItem >
66- { isPost && isBlockEditorActive && < SidebarItem key = "next-post" renderPriority = { 2 } >
69+ { isPost && isBlockEditorActive && isAiFeatureActive && < SidebarItem key = "next-post" renderPriority = { 2 } >
6770 < NextPostEditorItem location = "sidebar" />
6871 </ SidebarItem > }
6972 { settings . isKeywordAnalysisActive && < SidebarItem key = "keyword-input" renderPriority = { 8 } >
You can’t perform that action at this time.
0 commit comments