diff --git a/composer.json b/composer.json index bb0a10ad..cea148b2 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "require-dev": { "squizlabs/php_codesniffer": "^3.6", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", - "wp-coding-standards/wpcs": "3.3.0", + "wp-coding-standards/wpcs": "3.4.1", "phpunit/phpunit": "^9.6.33", "elementor/elementor-editor-testing": "0.0.3", "yoast/phpunit-polyfills": "^1.0.1" diff --git a/composer.lock b/composer.lock index 21ec81e9..8e36bbf0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d133c01ace6042957ca22367dbe19bc2", + "content-hash": "75130b564c01964caa55ddff862a5716", "packages": [ { "name": "elementor/wp-notifications-package", @@ -352,20 +352,19 @@ }, { "name": "nikic/php-parser", - "version": "v5.7.0", + "version": "v5.8.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", - "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f", "shasum": "" }, "require": { - "ext-ctype": "*", "ext-json": "*", "ext-tokenizer": "*", "php": ">=7.4" @@ -404,9 +403,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.8.0" }, - "time": "2025-12-06T11:56:16+00:00" + "time": "2026-07-04T14:30:18+00:00" }, { "name": "phar-io/manifest", @@ -528,21 +527,21 @@ }, { "name": "phpcsstandards/phpcsextra", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", - "reference": "b598aa890815b8df16363271b659d73280129101" + "reference": "39467533fdb742446d68c1d10ac33d625ee0311c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/b598aa890815b8df16363271b659d73280129101", - "reference": "b598aa890815b8df16363271b659d73280129101", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/39467533fdb742446d68c1d10ac33d625ee0311c", + "reference": "39467533fdb742446d68c1d10ac33d625ee0311c", "shasum": "" }, "require": { "php": ">=5.4", - "phpcsstandards/phpcsutils": "^1.2.0", + "phpcsstandards/phpcsutils": "^1.2.3", "squizlabs/php_codesniffer": "^3.13.5 || ^4.0.1" }, "require-dev": { @@ -606,20 +605,20 @@ "type": "thanks_dev" } ], - "time": "2025-11-12T23:06:57+00:00" + "time": "2026-07-27T11:13:17+00:00" }, { "name": "phpcsstandards/phpcsutils", - "version": "1.2.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", - "reference": "c216317e96c8b3f5932808f9b0f1f7a14e3bbf55" + "reference": "5f35d9408c54d7b529501f3c688b6eae562aea1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/c216317e96c8b3f5932808f9b0f1f7a14e3bbf55", - "reference": "c216317e96c8b3f5932808f9b0f1f7a14e3bbf55", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/5f35d9408c54d7b529501f3c688b6eae562aea1f", + "reference": "5f35d9408c54d7b529501f3c688b6eae562aea1f", "shasum": "" }, "require": { @@ -699,7 +698,7 @@ "type": "thanks_dev" } ], - "time": "2025-12-08T14:27:58+00:00" + "time": "2026-07-27T10:28:41+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1022,25 +1021,25 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.34", + "version": "9.6.35", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b36f02317466907a230d3aa1d34467041271ef4a" + "reference": "0edba2f3a0c48df3553cb9b640810b30df60302b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b36f02317466907a230d3aa1d34467041271ef4a", - "reference": "b36f02317466907a230d3aa1d34467041271ef4a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0edba2f3a0c48df3553cb9b640810b30df60302b", + "reference": "0edba2f3a0c48df3553cb9b640810b30df60302b", "shasum": "" }, "require": { "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", + "ext-filter": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", - "ext-xml": "*", "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.13.4", "phar-io/manifest": "^2.0.4", @@ -1105,31 +1104,15 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.34" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.35" }, "funding": [ { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" + "url": "https://phpunit.de/sponsoring.html", + "type": "other" } ], - "time": "2026-01-27T05:45:00+00:00" + "time": "2026-07-06T14:48:07+00:00" }, { "name": "sebastian/cli-parser", @@ -2144,16 +2127,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.13.5", + "version": "3.13.6", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4" + "reference": "4c378e1a528ea066890fc2397cbdd2f94eb2fc91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4", - "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/4c378e1a528ea066890fc2397cbdd2f94eb2fc91", + "reference": "4c378e1a528ea066890fc2397cbdd2f94eb2fc91", "shasum": "" }, "require": { @@ -2219,7 +2202,7 @@ "type": "thanks_dev" } ], - "time": "2025-11-04T16:30:35+00:00" + "time": "2026-08-06T00:17:32+00:00" }, { "name": "theseer/tokenizer", @@ -2273,16 +2256,16 @@ }, { "name": "wp-coding-standards/wpcs", - "version": "3.3.0", + "version": "3.4.1", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "7795ec6fa05663d716a549d0b44e47ffc8b0d4a6" + "reference": "ec2ff942335f33683a5957a85d138753876a05cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7795ec6fa05663d716a549d0b44e47ffc8b0d4a6", - "reference": "7795ec6fa05663d716a549d0b44e47ffc8b0d4a6", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/ec2ff942335f33683a5957a85d138753876a05cf", + "reference": "ec2ff942335f33683a5957a85d138753876a05cf", "shasum": "" }, "require": { @@ -2291,9 +2274,9 @@ "ext-tokenizer": "*", "ext-xmlreader": "*", "php": ">=7.2", - "phpcsstandards/phpcsextra": "^1.5.0", - "phpcsstandards/phpcsutils": "^1.1.0", - "squizlabs/php_codesniffer": "^3.13.4" + "phpcsstandards/phpcsextra": "^1.5.1", + "phpcsstandards/phpcsutils": "^1.2.3", + "squizlabs/php_codesniffer": "^3.13.5" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0.0", @@ -2335,7 +2318,7 @@ "type": "custom" } ], - "time": "2025-11-25T12:08:04+00:00" + "time": "2026-07-27T11:53:23+00:00" }, { "name": "yoast/phpunit-polyfills", diff --git a/dev/images/ai.png b/dev/images/ai.png deleted file mode 100644 index b2ecc1c7..00000000 Binary files a/dev/images/ai.png and /dev/null differ diff --git a/dev/images/image-optimization-bg.svg b/dev/images/image-optimization-bg.svg deleted file mode 100644 index b57baccf..00000000 --- a/dev/images/image-optimization-bg.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/dev/images/image-optimizer.svg b/dev/images/image-optimizer.svg deleted file mode 100644 index 3cd2bfbb..00000000 --- a/dev/images/image-optimizer.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/includes/utils.php b/includes/utils.php index 94338200..e826f27d 100644 --- a/includes/utils.php +++ b/includes/utils.php @@ -2,8 +2,6 @@ namespace HelloTheme\Includes; -use Elementor\App\App; - if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } @@ -13,10 +11,6 @@ **/ class Utils { - public static function elementor(): \Elementor\Plugin { - return \Elementor\Plugin::$instance; - } - public static function has_pro(): bool { return defined( 'ELEMENTOR_PRO_VERSION' ); } @@ -39,22 +33,6 @@ public static function is_elementor_installed(): bool { return $elementor_installed; } - public static function get_theme_builder_url(): string { - if ( ! class_exists( 'Elementor\App\App' ) ) { - return 'https://go.elementor.com/hello-theme-builder'; - } - - if ( self::has_pro() ) { - return admin_url( 'admin.php?page=' . App::PAGE_ID . '&ver=' . ELEMENTOR_VERSION ) . '#site-editor'; - } - - if ( self::is_elementor_active() ) { - return admin_url( 'admin.php?page=' . App::PAGE_ID . '&ver=' . ELEMENTOR_VERSION ) . '#site-editor/promotion'; - } - - return 'https://go.elementor.com/hello-theme-builder'; - } - public static function get_elementor_activation_link(): string { $plugin = 'elementor/elementor.php'; @@ -63,21 +41,6 @@ public static function get_elementor_activation_link(): string { return add_query_arg( '_wpnonce', wp_create_nonce( 'activate-plugin_' . $plugin ), $url ); } - public static function get_plugin_install_url( $plugin_slug ): string { - $action = 'install-plugin'; - - $url = add_query_arg( - [ - 'action' => $action, - 'plugin' => $plugin_slug, - 'referrer' => 'hello-elementor', - ], - admin_url( 'update.php' ) - ); - - return add_query_arg( '_wpnonce', wp_create_nonce( $action . '_' . $plugin_slug ), $url ); - } - public static function get_action_link_type() { $installed_plugins = get_plugins(); diff --git a/modules/admin-home/assets/js/components/dynamic-icon.js b/modules/admin-home/assets/js/components/dynamic-icon.js index 91c6569a..0021a62f 100644 --- a/modules/admin-home/assets/js/components/dynamic-icon.js +++ b/modules/admin-home/assets/js/components/dynamic-icon.js @@ -1,23 +1,7 @@ import React, { useState, useEffect } from 'react'; const componentMap = { - BrandYoutubeIcon: () => import('../icons/youtube.tsx'), BrandElementorIcon: () => import('../icons/elementor.tsx'), - ThemeBuilderIcon: () => import('@elementor/icons/ThemeBuilderIcon'), - SettingsIcon: () => import('@elementor/icons/SettingsIcon'), - BrandFacebookIcon: () => import('@elementor/icons/BrandFacebookIcon'), - StarIcon: () => import('@elementor/icons/StarIcon'), - HelpIcon: () => import('@elementor/icons/HelpIcon'), - SpeakerphoneIcon: () => import('@elementor/icons/SpeakerphoneIcon'), - TextIcon: () => import('@elementor/icons/TextIcon'), - PhotoIcon: () => import('@elementor/icons/PhotoIcon'), - AppsIcon: () => import('@elementor/icons/AppsIcon'), - BrushIcon: () => import('@elementor/icons/BrushIcon'), - UnderlineIcon: () => import('@elementor/icons/UnderlineIcon'), - PagesIcon: () => import('@elementor/icons/PagesIcon'), - PageTypeIcon: () => import('@elementor/icons/PageTypeIcon'), - HeaderTemplateIcon: () => import('@elementor/icons/HeaderTemplateIcon'), - FooterTemplateIcon: () => import('@elementor/icons/FooterTemplateIcon'), }; const DynamicIcon = ({ componentName, ...rest }) => { diff --git a/modules/admin-home/assets/js/components/link/link-or-title.js b/modules/admin-home/assets/js/components/link/link-or-title.js deleted file mode 100644 index 7c2e929c..00000000 --- a/modules/admin-home/assets/js/components/link/link-or-title.js +++ /dev/null @@ -1,29 +0,0 @@ -import Stack from '@elementor/ui/Stack'; -import Typography from '@elementor/ui/Typography'; -import Link from '@elementor/ui/Link'; -import { decode } from 'html-entities'; - -const LinkOrTitle = ({ title, link, sublinks, onClick, target }) => ( - - - {link && 0 === sublinks.length ? ( - - {decode(title)} - - ) : ( - - {decode(title)} - - )} - - -); - -export default LinkOrTitle; diff --git a/modules/admin-home/assets/js/components/link/link-with-icon-and-title.js b/modules/admin-home/assets/js/components/link/link-with-icon-and-title.js deleted file mode 100644 index 9443a441..00000000 --- a/modules/admin-home/assets/js/components/link/link-with-icon-and-title.js +++ /dev/null @@ -1,37 +0,0 @@ -import Stack from '@elementor/ui/Stack'; -import SublinksList from './sub-links-list'; -import LinkOrTitle from './link-or-title'; -import DynamicIcon from '../dynamic-icon'; - -export const LinkWithIconAndTitle = ({ - title, - link = null, - icon = 'SettingsIcon', - sublinks = [], - onClick = () => {}, - target = '', -}) => { - return ( - - - - - {sublinks.length > 0 && ( - - )} - - - ); -}; diff --git a/modules/admin-home/assets/js/components/link/promotion-link.js b/modules/admin-home/assets/js/components/link/promotion-link.js deleted file mode 100644 index fc8c8f62..00000000 --- a/modules/admin-home/assets/js/components/link/promotion-link.js +++ /dev/null @@ -1,87 +0,0 @@ -import Stack from '@elementor/ui/Stack'; -import Typography from '@elementor/ui/Typography'; -import Button from '@elementor/ui/Button'; -import Paper from '@elementor/ui/Paper'; -import Image from '@elementor/ui/Image'; -import { Feature } from '../promotions/feature'; -import UpgradeIcon from '@elementor/icons/UpgradeIcon'; - -export const PromotionLink = ({ - image, - alt, - title, - messages, - button, - url, - features, - target = '_blank', - width = 100, - height = 100, - horizontalLayout = false, - upgrade = false, - backgroundImage = false, - backgroundColor = false, - buttonBgColor = false, -}) => { - const backgroundFallback = backgroundImage ? 'transparent' : null; - const paperSx = horizontalLayout - ? { - display: 'flex', - alignItems: 'center', - justifyContent: 'space-between', - p: 3, - gap: 4, - maxWidth: 600, - } - : { p: 3 }; - paperSx.backgroundImage = backgroundImage ? `url(${backgroundImage})` : null; - paperSx.backgroundColor = backgroundColor - ? backgroundColor - : backgroundFallback; - paperSx.color = backgroundImage || backgroundColor ? 'rgb(12, 13, 14)' : null; - - const stackSx = horizontalLayout - ? { flex: 0.6, alignItems: 'center', justifyContent: 'center' } - : { alignItems: 'center', justifyContent: 'center' }; - - const featuresStackSx = horizontalLayout ? { flex: 0.4, mt: 4 } : { mt: 4 }; - - const startIcon = upgrade ? : null; - - return ( - - - {alt} - - {title} - - {messages.map((message, i) => { - return ( - - {message} - - ); - })} - - - - {features && ( - - {features.map((feature, i) => { - return ; - })} - - )} - - ); -}; diff --git a/modules/admin-home/assets/js/components/link/sub-links-list.js b/modules/admin-home/assets/js/components/link/sub-links-list.js deleted file mode 100644 index c0f4bc38..00000000 --- a/modules/admin-home/assets/js/components/link/sub-links-list.js +++ /dev/null @@ -1,27 +0,0 @@ -import Box from '@elementor/ui/Box'; -import Typography from '@elementor/ui/Typography'; -import Link from '@elementor/ui/Link'; -import { decode } from 'html-entities'; - -const SublinksList = ({ sublinks, target }) => ( - - - {sublinks.map((sublink, index) => ( - - {index > 0 && |} - - {decode(sublink.title)} - - - ))} - - -); - -export default SublinksList; diff --git a/modules/admin-home/assets/js/components/linkGroup/column-link-group.js b/modules/admin-home/assets/js/components/linkGroup/column-link-group.js deleted file mode 100644 index 77713e36..00000000 --- a/modules/admin-home/assets/js/components/linkGroup/column-link-group.js +++ /dev/null @@ -1,27 +0,0 @@ -import Stack from '@elementor/ui/Stack'; -import { LinkWithIconAndTitle } from '../link/link-with-icon-and-title'; -import Typography from '@elementor/ui/Typography'; - -export const ColumnLinkGroup = ({ - links = [], - title = '', - noLinksMessage, - sx = {}, -}) => { - if (!links.length) { - return null; - } - - return ( - - {title && {title}} - {links.map((link) => { - return ; - })} - - {!links.length && noLinksMessage && ( - {noLinksMessage} - )} - - ); -}; diff --git a/modules/admin-home/assets/js/components/paper/quick-links.js b/modules/admin-home/assets/js/components/paper/quick-links.js deleted file mode 100644 index 1e0268bc..00000000 --- a/modules/admin-home/assets/js/components/paper/quick-links.js +++ /dev/null @@ -1,29 +0,0 @@ -import { BaseAdminPaper } from './base-admin-paper'; -import Typography from '@elementor/ui/Typography'; -import { __ } from '@wordpress/i18n'; -import Stack from '@elementor/ui/Stack'; -import { ColumnLinkGroup } from '../linkGroup/column-link-group'; -import { useAdminContext } from '../../hooks/use-admin-context'; - -export const QuickLinks = () => { - const { adminSettings: { quickLinks = [] } = {} } = useAdminContext(); - - return ( - - - {__('Quick Links', 'hello-elementor')} - - - {__( - 'These quick actions will get your site airborne in a flash.', - 'hello-elementor', - )} - - - {Object.keys(quickLinks).map((key) => { - return ; - })} - - - ); -}; diff --git a/modules/admin-home/assets/js/components/paper/resources.js b/modules/admin-home/assets/js/components/paper/resources.js deleted file mode 100644 index fa77887c..00000000 --- a/modules/admin-home/assets/js/components/paper/resources.js +++ /dev/null @@ -1,30 +0,0 @@ -import { BaseAdminPaper } from './base-admin-paper'; -import { __ } from '@wordpress/i18n'; -import Stack from '@elementor/ui/Stack'; -import { ColumnLinkGroup } from '../linkGroup/column-link-group'; -import { useAdminContext } from '../../hooks/use-admin-context'; - -export const Resources = () => { - const { - adminSettings: { - resourcesData: { community = [], resources = [] } = {}, - } = {}, - } = useAdminContext(); - - return ( - - - - - - - ); -}; diff --git a/modules/admin-home/assets/js/components/paper/site-parts.js b/modules/admin-home/assets/js/components/paper/site-parts.js deleted file mode 100644 index 4d07a129..00000000 --- a/modules/admin-home/assets/js/components/paper/site-parts.js +++ /dev/null @@ -1,35 +0,0 @@ -import { BaseAdminPaper } from './base-admin-paper'; -import Stack from '@elementor/ui/Stack'; -import { ColumnLinkGroup } from '../linkGroup/column-link-group'; -import { __ } from '@wordpress/i18n'; -import { useAdminContext } from '../../hooks/use-admin-context'; - -export const SiteParts = () => { - const { - adminSettings: { - siteParts: { siteParts = [], sitePages = [], general = [] } = {}, - } = {}, - } = useAdminContext(); - - return ( - - - - - - - - ); -}; diff --git a/modules/admin-home/assets/js/components/promotions/feature.js b/modules/admin-home/assets/js/components/promotions/feature.js deleted file mode 100644 index a9f864b8..00000000 --- a/modules/admin-home/assets/js/components/promotions/feature.js +++ /dev/null @@ -1,12 +0,0 @@ -import Stack from '@elementor/ui/Stack'; -import CheckedCircleIcon from '@elementor/icons/CheckedCircleIcon'; -import Typography from '@elementor/ui/Typography'; - -export const Feature = ({ text }) => { - return ( - - - {text} - - ); -}; diff --git a/modules/admin-home/assets/js/components/promotions/list.js b/modules/admin-home/assets/js/components/promotions/list.js deleted file mode 100644 index 1f987d20..00000000 --- a/modules/admin-home/assets/js/components/promotions/list.js +++ /dev/null @@ -1,15 +0,0 @@ -import { PromotionLink } from '../link/promotion-link'; -import { useAdminContext } from '../../hooks/use-admin-context'; -import Stack from '@elementor/ui/Stack'; - -export const PromotionsList = () => { - const { promotionsLinks } = useAdminContext(); - - return ( - - {promotionsLinks.map((link, i) => { - return ; - })} - - ); -}; diff --git a/modules/admin-home/assets/js/hello-elementor-admin.js b/modules/admin-home/assets/js/hello-elementor-admin.js deleted file mode 100644 index 5c161809..00000000 --- a/modules/admin-home/assets/js/hello-elementor-admin.js +++ /dev/null @@ -1,35 +0,0 @@ -import { createRoot } from 'react-dom/client'; -import { AdminProvider } from './providers/admin-provider'; -import { AdminPage } from './pages/admin-page'; -import Box from '@elementor/ui/Box'; -import Container from '@elementor/ui/Container'; - -const App = () => { - return ( - - - - - - - - ); -}; - -document.addEventListener('DOMContentLoaded', () => { - const container = document.getElementById('ehe-admin-home'); - - if (container) { - const root = createRoot(container); - root.render(); - } -}); diff --git a/modules/admin-home/assets/js/icons/youtube.tsx b/modules/admin-home/assets/js/icons/youtube.tsx deleted file mode 100644 index 017b9190..00000000 --- a/modules/admin-home/assets/js/icons/youtube.tsx +++ /dev/null @@ -1,20 +0,0 @@ -'use client'; -import * as React from 'react'; -import SvgIcon from '@elementor/ui/SvgIcon'; - -const BrandYoutubeIcon = React.forwardRef< - SVGSVGElement, - React.ComponentProps ->((props, ref) => { - return ( - - - - ); -}); - -export default BrandYoutubeIcon; diff --git a/modules/admin-home/assets/js/layouts/grids/grid-with-action-links.js b/modules/admin-home/assets/js/layouts/grids/grid-with-action-links.js deleted file mode 100644 index c23aef96..00000000 --- a/modules/admin-home/assets/js/layouts/grids/grid-with-action-links.js +++ /dev/null @@ -1,37 +0,0 @@ -import Grid from '@elementor/ui/Grid'; -import { PromotionsList } from '../../components/promotions/list'; -import useMediaQuery from '@elementor/ui/useMediaQuery'; - -export const GridWithActionLinks = ({ children }) => { - const isSmallScreen = useMediaQuery((theme) => theme.breakpoints.down('sm')); - - return ( - - - {children} - - {!isSmallScreen && ( - - - - )} - - ); -}; diff --git a/modules/admin-home/assets/js/pages/admin-page.js b/modules/admin-home/assets/js/pages/admin-page.js deleted file mode 100644 index 41a6f091..00000000 --- a/modules/admin-home/assets/js/pages/admin-page.js +++ /dev/null @@ -1,30 +0,0 @@ -import Box from '@elementor/ui/Box'; - -import { ThemeProvider } from '@elementor/ui/styles'; - -import { GridWithActionLinks } from '../layouts/grids/grid-with-action-links'; -import Stack from '@elementor/ui/Stack'; -import { QuickLinks } from '../components/paper/quick-links'; -import { Welcome } from '../components/paper/welcome'; -import { SiteParts } from '../components/paper/site-parts'; -import { Resources } from '../components/paper/resources'; - -export const AdminPage = () => { - return ( - - - - - - - - - - - - - - - - ); -}; diff --git a/modules/admin-home/assets/js/providers/admin-provider.js b/modules/admin-home/assets/js/providers/admin-provider.js index c52f81c8..b5f929d4 100644 --- a/modules/admin-home/assets/js/providers/admin-provider.js +++ b/modules/admin-home/assets/js/providers/admin-provider.js @@ -5,16 +5,11 @@ export const AdminContext = createContext(); export const AdminProvider = ({ children }) => { const [isLoading, setIsLoading] = React.useState(true); - const [promotionsLinks, setPromotionsLinks] = React.useState([]); const [adminSettings, setAdminSettings] = React.useState({}); useEffect(() => { - Promise.all([ - apiFetch({ path: '/elementor-hello-elementor/v1/promotions' }), - apiFetch({ path: '/elementor-hello-elementor/v1/admin-settings' }), - ]) - .then(([links, settings]) => { - setPromotionsLinks(links.links); + apiFetch({ path: '/elementor-hello-elementor/v1/admin-settings' }) + .then((settings) => { setAdminSettings(settings.config); }) .finally(() => { @@ -25,7 +20,6 @@ export const AdminProvider = ({ children }) => { return ( '; + public function redirect_to_settings(): void { + wp_safe_redirect( admin_url( 'admin.php?page=' . Settings_Controller::SETTINGS_PAGE_SLUG ) ); + exit; + } + + public function remove_duplicated_parent_submenu(): void { + remove_submenu_page( EHP_THEME_SLUG, EHP_THEME_SLUG ); } public function __construct() { add_action( 'admin_menu', [ $this, 'admin_menu' ] ); + add_action( 'admin_menu', [ $this, 'remove_duplicated_parent_submenu' ], 999 ); } } diff --git a/modules/admin-home/components/api-controller.php b/modules/admin-home/components/api-controller.php index 31f69be5..3df935fe 100644 --- a/modules/admin-home/components/api-controller.php +++ b/modules/admin-home/components/api-controller.php @@ -7,7 +7,6 @@ } use HelloTheme\Modules\AdminHome\Rest\Admin_Config; -use HelloTheme\Modules\AdminHome\Rest\Promotions; use HelloTheme\Modules\AdminHome\Rest\Theme_Settings; use HelloTheme\Modules\AdminHome\Rest\Whats_New; @@ -16,7 +15,6 @@ class Api_Controller { protected $endpoints = []; public function __construct() { - $this->endpoints['promotions'] = new Promotions(); $this->endpoints['admin-config'] = new Admin_Config(); $this->endpoints['theme-settings'] = new Theme_Settings(); $this->endpoints['whats-new'] = new Whats_New(); diff --git a/modules/admin-home/components/finder.php b/modules/admin-home/components/finder.php index f42e12fa..6520d642 100644 --- a/modules/admin-home/components/finder.php +++ b/modules/admin-home/components/finder.php @@ -10,11 +10,11 @@ class Finder { public function add_hello_theme_finder_entry( $categories_data ) { if ( isset( $categories_data['site'] ) && isset( $categories_data['site']['items'] ) ) { - $categories_data['site']['items']['hello-elementor-home'] = [ - 'title' => esc_html__( 'Hello Theme Home', 'hello-elementor' ), + $categories_data['site']['items']['hello-elementor-settings'] = [ + 'title' => esc_html__( 'Hello Theme Settings', 'hello-elementor' ), 'icon' => 'paint-brush', - 'url' => admin_url( 'admin.php?page=hello-elementor' ), - 'keywords' => [ 'theme', 'hello', 'home', 'plus', '+' ], + 'url' => admin_url( 'admin.php?page=hello-elementor-settings' ), + 'keywords' => [ 'theme', 'hello', 'home', 'settings', 'plus', '+' ], ]; } diff --git a/modules/admin-home/components/scripts-controller.php b/modules/admin-home/components/scripts-controller.php deleted file mode 100644 index 63e9780a..00000000 --- a/modules/admin-home/components/scripts-controller.php +++ /dev/null @@ -1,31 +0,0 @@ -id ) { - return; - } - - $script = new Script( - 'hello-home-app', - [ 'wp-util' ] - ); - - $script->enqueue(); - } -} diff --git a/modules/admin-home/module.php b/modules/admin-home/module.php index 38fe3b23..8864a926 100644 --- a/modules/admin-home/module.php +++ b/modules/admin-home/module.php @@ -28,7 +28,6 @@ public static function get_name(): string { protected function get_component_ids(): array { return [ 'Admin_Menu_Controller', - 'Scripts_Controller', 'Api_Controller', 'Ajax_Handler', 'Conversion_Banner', diff --git a/modules/admin-home/rest/admin-config.php b/modules/admin-home/rest/admin-config.php index 68b66ab5..3d6cccf7 100644 --- a/modules/admin-home/rest/admin-config.php +++ b/modules/admin-home/rest/admin-config.php @@ -6,7 +6,6 @@ exit; // Exit if accessed directly. } -use Elementor\Core\DocumentTypes\Page; use HelloTheme\Includes\Utils; use WP_REST_Server; @@ -25,14 +24,8 @@ public function register_routes() { } public function get_admin_config() { - $elementor_page_id = Utils::is_elementor_active() ? $this->ensure_elementor_page_exists() : null; - $config = $this->get_welcome_box_config( [] ); - $config = $this->get_site_parts( $config, $elementor_page_id ); - - $config = $this->get_resources( $config ); - $config = apply_filters( 'hello-plus-theme/rest/admin-config', $config ); $config['config'] = [ @@ -43,281 +36,6 @@ public function get_admin_config() { return rest_ensure_response( [ 'config' => $config ] ); } - private function ensure_elementor_page_exists(): int { - $existing_page = \Elementor\Core\DocumentTypes\Page::get_elementor_page(); - - if ( $existing_page ) { - return $existing_page->ID; - } - - $page_data = [ - 'post_title' => 'Hello Theme page', - 'post_content' => '', - 'post_status' => 'draft', - 'post_type' => 'page', - 'meta_input' => [ - '_elementor_edit_mode' => 'builder', - '_elementor_template_type' => 'wp-page', - ], - ]; - - $page_id = wp_insert_post( $page_data ); - - if ( is_wp_error( $page_id ) ) { - throw new \RuntimeException( 'Failed to create Elementor page: ' . esc_html( $page_id->get_error_message() ) ); - } - - if ( ! $page_id ) { - throw new \RuntimeException( 'Page creation returned invalid ID' ); - } - - wp_update_post([ - 'ID' => $page_id, - 'post_title' => 'Hello Theme #' . $page_id, - ]); - return $page_id; - } - - private function get_elementor_editor_url( ?int $page_id, string $active_tab ): string { - $active_kit_id = Utils::elementor()->kits_manager->get_active_id(); - - $url = add_query_arg( - [ - 'post' => $page_id, - 'action' => 'elementor', - 'active-tab' => $active_tab, - 'active-document' => $active_kit_id, - ], - admin_url( 'post.php' ) - ); - - return $url . '#e:run:panel/global/open'; - } - - public function get_resources( array $config ) { - $config['resourcesData'] = [ - 'community' => [ - [ - 'title' => __( 'Facebook', 'hello-elementor' ), - 'link' => 'https://www.facebook.com/groups/Elementors/', - 'icon' => 'BrandFacebookIcon', - 'target' => '_blank', - ], - [ - 'title' => __( 'YouTube', 'hello-elementor' ), - 'link' => 'https://www.youtube.com/@Elementor', - 'icon' => 'BrandYoutubeIcon', - 'target' => '_blank', - ], - [ - 'title' => __( 'Discord', 'hello-elementor' ), - 'link' => 'https://discord.com/servers/elementor-official-community-1164474724626206720', - 'target' => '_blank', - ], - [ - 'title' => __( 'Rate Us', 'hello-elementor' ), - 'link' => 'https://wordpress.org/support/theme/hello-elementor/reviews/#new-post', - 'icon' => 'StarIcon', - 'target' => '_blank', - ], - ], - 'resources' => [ - [ - 'title' => __( 'Help Center', 'hello-elementor' ), - 'link' => ' https://go.elementor.com/hello-help/', - 'icon' => 'HelpIcon', - 'target' => '_blank', - ], - [ - 'title' => __( 'Blog', 'hello-elementor' ), - 'link' => 'https://go.elementor.com/hello-blog/', - 'icon' => 'SpeakerphoneIcon', - 'target' => '_blank', - ], - [ - 'title' => __( 'Platinum Support', 'hello-elementor' ), - 'link' => 'https://go.elementor.com/platinum-support', - 'icon' => 'BrandElementorIcon', - 'target' => '_blank', - ], - ], - ]; - - return $config; - } - - public function get_site_parts( array $config, ?int $elementor_page_id = null ): array { - $last_five_pages_query = new \WP_Query( - [ - 'posts_per_page' => 5, - 'post_type' => 'page', - 'post_status' => 'publish', - 'orderby' => 'post_date', - 'order' => 'DESC', - 'fields' => 'ids', - 'no_found_rows' => true, - 'lazy_load_term_meta' => true, - 'update_post_meta_cache' => false, - ] - ); - - $site_pages = []; - - if ( $last_five_pages_query->have_posts() ) { - $elementor_active = Utils::is_elementor_active(); - $edit_with_elementor = $elementor_active ? '&action=elementor' : ''; - while ( $last_five_pages_query->have_posts() ) { - $last_five_pages_query->the_post(); - $site_pages[] = [ - 'title' => get_the_title(), - 'link' => get_edit_post_link( get_the_ID(), 'admin' ) . $edit_with_elementor, - 'icon' => 'PagesIcon', - ]; - } - } - - $general = [ - [ - 'title' => __( 'Add New Page', 'hello-elementor' ), - 'link' => self_admin_url( 'post-new.php?post_type=page' ), - 'icon' => 'PageTypeIcon', - ], - [ - 'title' => __( 'Settings', 'hello-elementor' ), - 'link' => self_admin_url( 'admin.php?page=hello-elementor-settings' ), - ], - ]; - - $common_parts = []; - - $customizer_header_footer_url = $this->get_open_homepage_with_tab( $elementor_page_id, '', null, [ 'autofocus[section]' => 'hello-options' ] ); - - $header_part = [ - 'id' => 'header', - 'title' => __( 'Header', 'hello-elementor' ), - 'link' => $customizer_header_footer_url, - 'icon' => 'HeaderTemplateIcon', - 'sublinks' => [], - ]; - $footer_part = [ - 'id' => 'footer', - 'title' => __( 'Footer', 'hello-elementor' ), - 'link' => $customizer_header_footer_url, - 'icon' => 'FooterTemplateIcon', - 'sublinks' => [], - ]; - - if ( Utils::is_elementor_active() ) { - $common_parts = [ - [ - 'title' => __( 'Theme Builder', 'hello-elementor' ), - 'link' => Utils::get_theme_builder_url(), - 'icon' => 'ThemeBuilderIcon', - ], - ]; - $header_part['link'] = $this->get_open_homepage_with_tab( $elementor_page_id, 'hello-settings-header' ); - $footer_part['link'] = $this->get_open_homepage_with_tab( $elementor_page_id, 'hello-settings-footer' ); - - if ( Utils::has_pro() ) { - $header_part = $this->update_pro_part( $header_part, 'header' ); - $footer_part = $this->update_pro_part( $footer_part, 'footer' ); - } - } - - $site_parts = [ - 'siteParts' => array_merge( - [ - $header_part, - $footer_part, - ], - $common_parts - ), - 'sitePages' => $site_pages, - 'general' => $general, - ]; - - $config['siteParts'] = apply_filters( 'hello-plus-theme/template-parts', $site_parts ); - - return $this->get_quicklinks( $config, $elementor_page_id ); - } - - private function update_pro_part( array $part, string $location ): array { - $theme_builder_module = \ElementorPro\Modules\ThemeBuilder\Module::instance(); - $conditions_manager = $theme_builder_module->get_conditions_manager(); - - $documents = $conditions_manager->get_documents_for_location( $location ); - if ( ! empty( $documents ) ) { - $first_document_id = array_key_first( $documents ); - $edit_link = get_edit_post_link( $first_document_id, 'admin' ) . '&action=elementor'; - - } else { - $edit_link = $this->get_open_homepage_with_tab( null, 'hello-settings-' . $location ); - } - $part['sublinks'] = [ - [ - 'title' => __( 'Edit', 'hello-elementor' ), - 'link' => $edit_link, - ], - [ - 'title' => __( 'Add New', 'hello-elementor' ), - 'link' => \Elementor\Plugin::instance()->app->get_base_url() . '#/site-editor/templates/' . $location, - ], - ]; - - return $part; - } - - public function get_open_homepage_with_tab( ?int $page_id, $action, $section = null, $customizer_fallback_args = [] ): string { - if ( Utils::is_elementor_active() ) { - $url = $page_id ? $this->get_elementor_editor_url( $page_id, $action ) : Page::get_site_settings_url_config( $action )['url']; - - if ( $section ) { - $url = add_query_arg( 'active-section', $section, $url ); - } - - return $url; - } - - return add_query_arg( $customizer_fallback_args, self_admin_url( 'customize.php' ) ); - } - - public function get_quicklinks( $config, ?int $elementor_page_id = null ): array { - $config['quickLinks'] = [ - 'site_name' => [ - 'title' => __( 'Site Name', 'hello-elementor' ), - 'link' => $this->get_open_homepage_with_tab( $elementor_page_id, 'settings-site-identity', null, [ 'autofocus[section]' => 'title_tagline' ] ), - 'icon' => 'TextIcon', - - ], - 'site_logo' => [ - 'title' => __( 'Site Logo', 'hello-elementor' ), - 'link' => $this->get_open_homepage_with_tab( $elementor_page_id, 'settings-site-identity', null, [ 'autofocus[section]' => 'title_tagline' ] ), - 'icon' => 'PhotoIcon', - ], - 'site_favicon' => [ - 'title' => __( 'Site Favicon', 'hello-elementor' ), - 'link' => $this->get_open_homepage_with_tab( $elementor_page_id, 'settings-site-identity', null, [ 'autofocus[section]' => 'title_tagline' ] ), - 'icon' => 'AppsIcon', - ], - ]; - - if ( Utils::is_elementor_active() ) { - $config['quickLinks']['site_colors'] = [ - 'title' => __( 'Site Colors', 'hello-elementor' ), - 'link' => $this->get_open_homepage_with_tab( $elementor_page_id, 'global-colors' ), - 'icon' => 'BrushIcon', - ]; - - $config['quickLinks']['site_fonts'] = [ - 'title' => __( 'Site Fonts', 'hello-elementor' ), - 'link' => $this->get_open_homepage_with_tab( $elementor_page_id, 'global-typography' ), - 'icon' => 'UnderlineIcon', - ]; - } - - return $config; - } - public function get_welcome_box_config( array $config ): array { $is_elementor_installed = Utils::is_elementor_installed(); $is_elementor_active = Utils::is_elementor_active(); diff --git a/modules/admin-home/rest/promotions.php b/modules/admin-home/rest/promotions.php deleted file mode 100644 index 4da6130a..00000000 --- a/modules/admin-home/rest/promotions.php +++ /dev/null @@ -1,97 +0,0 @@ - 'go-pro', - 'image' => HELLO_THEME_IMAGES_URL . 'go-pro.svg', - 'url' => 'https://go.elementor.com/hello-upgrade-epro/', - 'alt' => __( 'Elementor Pro', 'hello-elementor' ), - 'title' => __( 'Bring your vision to life', 'hello-elementor' ), - 'messages' => [ - __( 'Get complete design flexibility for your website with Elementor Pro’s advanced tools and premium features.', 'hello-elementor' ), - ], - 'button' => __( 'Upgrade Now', 'hello-elementor' ), - 'upgrade' => true, - 'features' => [ - __( 'Popup Builder', 'hello-elementor' ), - __( 'Custom Code & CSS', 'hello-elementor' ), - __( 'E-commerce Features', 'hello-elementor' ), - __( 'Collaborative Notes', 'hello-elementor' ), - __( 'Form Submission', 'hello-elementor' ), - __( 'Form Integrations', 'hello-elementor' ), - __( 'Customs Attribute', 'hello-elementor' ), - __( 'Role Manager', 'hello-elementor' ), - ], - ]; - } - - if ( - ! defined( 'ELEMENTOR_IMAGE_OPTIMIZER_VERSION' ) && - ! defined( 'IMAGE_OPTIMIZATION_VERSION' ) - ) { - $action_links_data[] = [ - 'type' => 'go-image-optimizer', - 'image' => HELLO_THEME_IMAGES_URL . 'image-optimizer.svg', - 'url' => Utils::get_plugin_install_url( 'image-optimization' ), - 'alt' => __( 'Elementor Image Optimizer', 'hello-elementor' ), - 'title' => '', - 'messages' => [ - __( 'Optimize Images.', 'hello-elementor' ), - __( 'Reduce Size.', 'hello-elementor' ), - __( 'Improve Speed.', 'hello-elementor' ), - __( 'Try Image Optimizer for free', 'hello-elementor' ), - ], - 'button' => __( 'Install', 'hello-elementor' ), - 'width' => 72, - 'height' => 'auto', - 'target' => '_self', - 'backgroundImage' => HELLO_THEME_IMAGES_URL . 'image-optimization-bg.svg', - ]; - } - - if ( - ! defined( 'ELEMENTOR_AI_VERSION' ) && - Utils::is_elementor_installed() - ) { - $action_links_data[] = [ - 'type' => 'go-ai', - 'image' => HELLO_THEME_IMAGES_URL . 'ai.png', - 'url' => 'https://go.elementor.com/hello-site-planner', - 'alt' => __( 'Elementor AI', 'hello-elementor' ), - 'title' => __( 'Elementor AI', 'hello-elementor' ), - 'messages' => [ - __( 'Boost creativity with Elementor AI. Craft & enhance copy, create custom CSS & Code, and generate images to elevate your website.', 'hello-elementor' ), - ], - 'button' => __( 'Let\'s Go', 'hello-elementor' ), - ]; - } - - return rest_ensure_response( [ 'links' => $action_links_data ] ); - } - - public function register_routes() { - register_rest_route( - self::ROUTE_NAMESPACE, - '/promotions', - [ - 'methods' => WP_REST_Server::READABLE, - 'callback' => [ $this, 'get_promotions' ], - 'permission_callback' => [ $this, 'permission_callback' ], - ] - ); - } -} diff --git a/tests/playwright/tests/admin/hello-theme-admin-home.test.ts b/tests/playwright/tests/admin/hello-theme-admin-home.test.ts deleted file mode 100644 index fa268797..00000000 --- a/tests/playwright/tests/admin/hello-theme-admin-home.test.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { parallelTest as test } from '../../parallelTest.ts'; -import { expect } from '@playwright/test'; - -test.describe('Hello Theme Admin Home Page', () => { - test.beforeEach(async ({ page }) => { - await page.goto('/wp-admin/admin.php?page=hello-elementor'); - }); - - test('should display Welcome to Hello Theme message and take screenshot', async ({ - page, - }) => { - const welcomeSection = page - .locator('text=Go Pro, Go Limitless') - .locator('..') - .locator('..'); - await expect.soft(welcomeSection).toHaveScreenshot('welcome-section.png'); - }); - - test('should display Quick Links section', async ({ page }) => { - const quickLinksHeading = page.locator('h6:has-text("Quick Links")'); - await expect(quickLinksHeading).toBeVisible(); - await expect(quickLinksHeading).toContainText('Quick Links'); - const quickLinksSection = page - .locator('text=Quick Links') - .locator('..') - .locator('..'); - await expect(quickLinksSection).toContainText( - 'These quick actions will get your site airborne in a flash.', - ); - const expectedQuickLinks = [ - 'Site Name', - 'Site Logo', - 'Site Favicon', - 'Site Colors', - 'Site Fonts', - ]; - for (const linkText of expectedQuickLinks) { - const linkElement = page.locator(`h6:has-text("${linkText}")`); - await expect(linkElement).toBeVisible(); - } - }); - - test.skip('should navigate to correct pages from Quick Links', async ({ - page, - }) => { - const quickLinksTests = [ - { - linkText: 'Site Name', - expectedUrlPattern: - /post\.php\?post=\d+&action=elementor.*active-tab=settings-site-identity.*active-document=\d+/, - expectedPageSection: - '.elementor-control-section_settings-site-identity', - }, - { - linkText: 'Site Logo', - expectedUrlPattern: - /post\.php\?post=\d+&action=elementor.*active-tab=settings-site-identity.*active-document=\d+/, - expectedPageSection: - '.elementor-control-section_settings-site-identity', - }, - { - linkText: 'Site Favicon', - expectedUrlPattern: - /post\.php\?post=\d+&action=elementor.*active-tab=settings-site-identity.*active-document=\d+/, - expectedPageSection: - '.elementor-control-section_settings-site-identity', - }, - { - linkText: 'Site Colors', - expectedUrlPattern: - /post\.php\?post=\d+&action=elementor.*active-tab=global-colors.*active-document=\d+/, - expectedPageSection: '.elementor-control-section_global_colors', - }, - { - linkText: 'Site Fonts', - expectedUrlPattern: - /post\.php\?post=\d+&action=elementor.*active-tab=global-typography.*active-document=\d+/, - expectedPageSection: '.elementor-control-section_text_style', - }, - ]; - - for (const linkTest of quickLinksTests) { - await test.step(linkTest.linkText, async () => { - await page.goto('/wp-admin/admin.php?page=hello-elementor'); - const linkElement = page.locator( - `h6:has-text("${linkTest.linkText}") a`, - ); - await expect(linkElement).toBeVisible(); - - await Promise.all([ - page.waitForURL(linkTest.expectedUrlPattern), - linkElement.click(), - ]); - - expect(page.url()).toMatch(linkTest.expectedUrlPattern); - await page.waitForSelector('#elementor-kit-panel'); - const location = page.locator(linkTest.expectedPageSection); - await expect(location).toBeVisible(); - }); - } - }); -}); diff --git a/tests/playwright/tests/theme-settings.test.ts b/tests/playwright/tests/theme-settings.test.ts index b32539a8..09211f62 100644 --- a/tests/playwright/tests/theme-settings.test.ts +++ b/tests/playwright/tests/theme-settings.test.ts @@ -7,20 +7,37 @@ test.describe('Admin Menu', () => { page, apiRequests, }, testInfo) => { - // Arrange const wpAdmin = new WpAdminPage(page, testInfo, apiRequests); - // Navigate to dashboard await wpAdmin.gotoDashboard(); - // Get the Hello Elementor menu element const helloElementorMenu = page.locator('#toplevel_page_hello-elementor'); - // Verify the menu exists await expect(helloElementorMenu).toBeVisible(); - // Verify the menu has the correct title "Hello Elementor" const menuTitle = helloElementorMenu.locator('.wp-menu-name'); await expect(menuTitle).toHaveText('Hello'); }); + + test('redirects hello-elementor page to settings', async ({ page }) => { + await page.goto('/wp-admin/admin.php?page=hello-elementor'); + + await expect(page).toHaveURL(/page=hello-elementor-settings/); + }); + + test('does not show Home submenu', async ({ + page, + apiRequests, + }, testInfo) => { + const wpAdmin = new WpAdminPage(page, testInfo, apiRequests); + + await wpAdmin.gotoDashboard(); + + const helloMenu = page.locator('#toplevel_page_hello-elementor'); + await helloMenu.hover(); + + await expect( + page.locator('#toplevel_page_hello-elementor .wp-submenu'), + ).not.toContainText('Home'); + }); }); diff --git a/webpack.config.js b/webpack.config.js index db25b865..419b7d4e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -36,11 +36,6 @@ const entryPoints = { './dev/js/frontend', 'hello-frontend.js', ), - 'js/hello-home-app': path.resolve( - modulesDir, - 'admin-home/assets/js', - 'hello-elementor-admin.js', - ), 'js/hello-elementor-settings': path.resolve( modulesDir, 'admin-home/assets/js',