diff --git a/src/addons/block/blogmenu/services/block-handler.ts b/src/addons/block/blogmenu/services/block-handler.ts index dfe0aa3ee..45103da25 100644 --- a/src/addons/block/blogmenu/services/block-handler.ts +++ b/src/addons/block/blogmenu/services/block-handler.ts @@ -18,6 +18,7 @@ import { CoreBlockHandlerData } from '@features/block/services/block-delegate'; import { CoreBlockBaseHandler } from '@features/block/classes/base-block-handler'; import { AddonBlockBlogMenuComponent } from '../components/blogmenu/blogmenu'; import { makeSingleton } from '@singletons'; +import { AddonBlog } from '@addons/blog/services/blog'; /** * Block handler. @@ -28,6 +29,13 @@ export class AddonBlockBlogMenuHandlerService extends CoreBlockBaseHandler { name = 'AddonBlockBlogMenu'; blockName = 'blog_menu'; + /** + * @inheritdoc + */ + async isEnabled(): Promise { + return await AddonBlog.isPluginEnabled(); + } + /** * Returns the data needed to render the block. * diff --git a/src/addons/block/blogrecent/services/block-handler.ts b/src/addons/block/blogrecent/services/block-handler.ts index 18d6f5e3b..1404c6db6 100644 --- a/src/addons/block/blogrecent/services/block-handler.ts +++ b/src/addons/block/blogrecent/services/block-handler.ts @@ -18,6 +18,7 @@ import { CoreBlockHandlerData } from '@features/block/services/block-delegate'; import { CoreBlockBaseHandler } from '@features/block/classes/base-block-handler'; import { AddonBlockBlogRecentComponent } from '../components/blogrecent/blogrecent'; import { makeSingleton } from '@singletons'; +import { AddonBlog } from '@addons/blog/services/blog'; /** * Block handler. @@ -28,6 +29,13 @@ export class AddonBlockBlogRecentHandlerService extends CoreBlockBaseHandler { name = 'AddonBlockBlogRecent'; blockName = 'blog_recent'; + /** + * @inheritdoc + */ + async isEnabled(): Promise { + return await AddonBlog.isPluginEnabled(); + } + /** * Returns the data needed to render the block. *