1
0
Fork 0
mirror of https://github.com/elementor/hello-theme.git synced 2026-08-01 16:00:20 +08:00
hello-theme/modules/admin-home/assets/js/components/settings/structure.js
Rami Yushuvaev aa9eed2933
Some checks failed
Build / Build theme (push) Failing after 1s
Lint / ESLint (push) Failing after 0s
PHPUnit / File Diff (push) Failing after 1s
Lint / PHPCS (push) Failing after 41s
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - Test Results (push) Successful in 2s
Internal: Setup prettier and fix all lint/format issues [TMZ-1051] (#671)
* Setup prettier

* Fix lint/format issues
2026-07-01 00:41:16 -07:00

62 lines
1.9 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Stack from '@elementor/ui/Stack';
import Typography from '@elementor/ui/Typography';
import { __ } from '@wordpress/i18n';
import { Setting } from './setting';
import { useSettingsContext } from './use-settings-context';
import { Spinner } from '@wordpress/components';
export const Structure = () => {
const {
themeSettings: { HEADER_FOOTER: headerFooter, PAGE_TITLE: pageTitle },
updateSetting,
isLoading,
} = useSettingsContext();
if (isLoading) {
return <Spinner />;
}
return (
<Stack gap={2}>
<Typography variant="subtitle2">
{__(
'These settings relate to the structure of your pages.',
'hello-elementor',
)}
</Typography>
<Setting
value={headerFooter}
label={__('Disable theme header and footer', 'hello-elementor')}
onSwitchClick={() => updateSetting('HEADER_FOOTER', !headerFooter)}
description={__(
'What it does: Removes the themes default header and footer sections from every page, along with their associated CSS/JS files.',
'hello-elementor',
)}
code={
'<header id="site-header" class="site-header"> ... </header>\n' +
'<footer id="site-footer" class="site-footer"> ... </footer>'
}
tip={__(
'Tip: If you use a plugin like Elementor Pro for your headers and footers, disable the theme header and footer to improve performance.',
'hello-elementor',
)}
/>
<Setting
value={pageTitle}
label={__('Hide page title', 'hello-elementor')}
onSwitchClick={() => updateSetting('PAGE_TITLE', !pageTitle)}
description={__(
'What it does: Removes the main page title above your page content.',
'hello-elementor',
)}
code={
'<div class="page-header"><h1 class="entry-title">Post title</h1></div>'
}
tip={__(
'Tip: If you do not want to display page titles or are using Elementor widgets to display your page titles, hide the page title.',
'hello-elementor',
)}
/>
</Stack>
);
};