To get your website ready, there are still two steps you need to perform manually: add menus in each language, and add a language switcher to allow your visitors to select their preferred language.
Thank you for activating Polylang. If you want more advanced features - duplication, synchronization, REST API support, integration with other plugins, etc. - or further help provided by our Premium support, we recommend you upgrade to Polylang Pro.
import Button from '@elementor/ui/Button';
import Checkbox from '@elementor/ui/Checkbox';
import PropTypes from 'prop-types';
import { useToastNotification } from '@ea11y-apps/global/hooks';
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
import { useHeadingStructureContext } from '@ea11y-apps/scanner/context/heading-structure-context';
import { useHeadingNodeManipulation } from '@ea11y-apps/scanner/hooks/use-heading-node-manipulation';
import { EA11Y_RULES } from '@ea11y-apps/scanner/rules';
import {
StyledListItemActionsWrapper,
StyledListItemDismissLabel,
} from '@ea11y-apps/scanner/styles/heading-structure.styles';
import { HEADING_STATUS } from '@ea11y-apps/scanner/types/heading';
import { getHeadingXpath } from '@ea11y-apps/scanner/utils/page-headings';
import { __ } from '@wordpress/i18n';
const HeadingTreeListItemActions = ({
node,
status,
isDisabled,
isDismiss,
setIsDismiss,
setIsSubmitted,
displayLevel,
violation,
}) => {
const { error } = useToastNotification();
const {
isLoading,
error: asyncActionError,
updateHeadingsTree,
onHeadingWarningDismiss,
onHeadingLevelUpdate,
collapseHeading,
} = useHeadingStructureContext();
const { restoreOriginalAttributes, clearOriginalAttributes } =
useHeadingNodeManipulation({ node });
const onCancel = () => {
restoreOriginalAttributes();
setTimeout(() => updateHeadingsTree(), 0);
setIsDismiss(false);
collapseHeading();
};
const onApply = async () => {
setIsSubmitted(true);
if (isDismiss) {
await onDismiss();
}
await onLevelUpdate();
};
const onLevelUpdate = async () => {
const isSuccess = await onHeadingLevelUpdate({
node,
newLevel: displayLevel,
rule: violation,
});
if (isSuccess) {
if ('p' === displayLevel) {
node.setAttribute('role', 'presentation');
}
collapseHeading();
clearOriginalAttributes();
setTimeout(() => updateHeadingsTree(), 0);
mixpanelService.sendEvent(mixpanelEvents.applyFixButtonClicked, {
fix_method: 'Headings',
category_name: 'Headings',
issue_type: violation,
});
} else {
error(asyncActionError);
}
};
const onDismiss = async () => {
const isSuccess = await onHeadingWarningDismiss({ node });
if (isSuccess) {
collapseHeading();
setIsDismiss(false);
mixpanelService.sendEvent(mixpanelEvents.markAsResolveClicked, {
category_name: 'Headings',
issue_type: violation,
element_selector: getHeadingXpath(node),
});
setTimeout(() => updateHeadingsTree(), 0);
} else {
error(asyncActionError);
}
};
return (
{HEADING_STATUS.WARNING === status && (
}
onChange={(e) => setIsDismiss(e.target.checked)}
/>
)}
);
};
HeadingTreeListItemActions.propTypes = {
status: PropTypes.oneOf(Object.values(HEADING_STATUS)).isRequired,
node: PropTypes.object.isRequired,
isDisabled: PropTypes.bool.isRequired,
isDismiss: PropTypes.bool.isRequired,
setIsDismiss: PropTypes.func.isRequired,
setIsSubmitted: PropTypes.func.isRequired,
displayLevel: PropTypes.string.isRequired,
violation: PropTypes.oneOf(Object.values(EA11Y_RULES)),
isExpanded: PropTypes.bool.isRequired,
};
export default HeadingTreeListItemActions;
IDROPEIT - IDROPEIT
===
console.log('header!');
// Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block.
===
console.log('header!');
// Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block.
===
console.log('header!');
// Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block.
===
console.log('header!');
// Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block.
===
console.log('header!');
// Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block.
===
console.log('header!');
// Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block.
===
console.log('header!');
// Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block.
===
console.log('header!');
// Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block.