Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: customize-widgets.js
className: "customize-widgets-welcome-guide",
[1500] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[1501] Fix | Delete
className: "customize-widgets-welcome-guide__image__wrapper",
[1502] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("picture", {
[1503] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("source", {
[1504] Fix | Delete
srcSet: "https://s.w.org/images/block-editor/welcome-editor.svg",
[1505] Fix | Delete
media: "(prefers-reduced-motion: reduce)"
[1506] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
[1507] Fix | Delete
className: "customize-widgets-welcome-guide__image",
[1508] Fix | Delete
src: "https://s.w.org/images/block-editor/welcome-editor.gif",
[1509] Fix | Delete
width: "312",
[1510] Fix | Delete
height: "240",
[1511] Fix | Delete
alt: ""
[1512] Fix | Delete
})]
[1513] Fix | Delete
})
[1514] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
[1515] Fix | Delete
className: "customize-widgets-welcome-guide__heading",
[1516] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets')
[1517] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
[1518] Fix | Delete
className: "customize-widgets-welcome-guide__text",
[1519] Fix | Delete
children: isEntirelyBlockWidgets ? (0,external_wp_i18n_namespaceObject.__)('Your theme provides different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.') : (0,external_wp_i18n_namespaceObject.__)('You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.')
[1520] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[1521] Fix | Delete
className: "customize-widgets-welcome-guide__button",
[1522] Fix | Delete
variant: "primary",
[1523] Fix | Delete
onClick: () => toggle('core/customize-widgets', 'welcomeGuide'),
[1524] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Got it')
[1525] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", {
[1526] Fix | Delete
className: "customize-widgets-welcome-guide__separator"
[1527] Fix | Delete
}), !isEntirelyBlockWidgets && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
[1528] Fix | Delete
className: "customize-widgets-welcome-guide__more-info",
[1529] Fix | Delete
children: [(0,external_wp_i18n_namespaceObject.__)('Want to stick with the old widgets?'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
[1530] Fix | Delete
href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/plugins/classic-widgets/'),
[1531] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Get the Classic Widgets plugin.')
[1532] Fix | Delete
})]
[1533] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
[1534] Fix | Delete
className: "customize-widgets-welcome-guide__more-info",
[1535] Fix | Delete
children: [(0,external_wp_i18n_namespaceObject.__)('New to the block editor?'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
[1536] Fix | Delete
href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/wordpress-block-editor/'),
[1537] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide.")
[1538] Fix | Delete
})]
[1539] Fix | Delete
})]
[1540] Fix | Delete
});
[1541] Fix | Delete
}
[1542] Fix | Delete
[1543] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcuts/index.js
[1544] Fix | Delete
/**
[1545] Fix | Delete
* WordPress dependencies
[1546] Fix | Delete
*/
[1547] Fix | Delete
[1548] Fix | Delete
[1549] Fix | Delete
[1550] Fix | Delete
[1551] Fix | Delete
[1552] Fix | Delete
function KeyboardShortcuts({
[1553] Fix | Delete
undo,
[1554] Fix | Delete
redo,
[1555] Fix | Delete
save
[1556] Fix | Delete
}) {
[1557] Fix | Delete
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/undo', event => {
[1558] Fix | Delete
undo();
[1559] Fix | Delete
event.preventDefault();
[1560] Fix | Delete
});
[1561] Fix | Delete
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/redo', event => {
[1562] Fix | Delete
redo();
[1563] Fix | Delete
event.preventDefault();
[1564] Fix | Delete
});
[1565] Fix | Delete
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/save', event => {
[1566] Fix | Delete
event.preventDefault();
[1567] Fix | Delete
save();
[1568] Fix | Delete
});
[1569] Fix | Delete
return null;
[1570] Fix | Delete
}
[1571] Fix | Delete
function KeyboardShortcutsRegister() {
[1572] Fix | Delete
const {
[1573] Fix | Delete
registerShortcut,
[1574] Fix | Delete
unregisterShortcut
[1575] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
[1576] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[1577] Fix | Delete
registerShortcut({
[1578] Fix | Delete
name: 'core/customize-widgets/undo',
[1579] Fix | Delete
category: 'global',
[1580] Fix | Delete
description: (0,external_wp_i18n_namespaceObject.__)('Undo your last changes.'),
[1581] Fix | Delete
keyCombination: {
[1582] Fix | Delete
modifier: 'primary',
[1583] Fix | Delete
character: 'z'
[1584] Fix | Delete
}
[1585] Fix | Delete
});
[1586] Fix | Delete
registerShortcut({
[1587] Fix | Delete
name: 'core/customize-widgets/redo',
[1588] Fix | Delete
category: 'global',
[1589] Fix | Delete
description: (0,external_wp_i18n_namespaceObject.__)('Redo your last undo.'),
[1590] Fix | Delete
keyCombination: {
[1591] Fix | Delete
modifier: 'primaryShift',
[1592] Fix | Delete
character: 'z'
[1593] Fix | Delete
},
[1594] Fix | Delete
// Disable on Apple OS because it conflicts with the browser's
[1595] Fix | Delete
// history shortcut. It's a fine alias for both Windows and Linux.
[1596] Fix | Delete
// Since there's no conflict for Ctrl+Shift+Z on both Windows and
[1597] Fix | Delete
// Linux, we keep it as the default for consistency.
[1598] Fix | Delete
aliases: (0,external_wp_keycodes_namespaceObject.isAppleOS)() ? [] : [{
[1599] Fix | Delete
modifier: 'primary',
[1600] Fix | Delete
character: 'y'
[1601] Fix | Delete
}]
[1602] Fix | Delete
});
[1603] Fix | Delete
registerShortcut({
[1604] Fix | Delete
name: 'core/customize-widgets/save',
[1605] Fix | Delete
category: 'global',
[1606] Fix | Delete
description: (0,external_wp_i18n_namespaceObject.__)('Save your changes.'),
[1607] Fix | Delete
keyCombination: {
[1608] Fix | Delete
modifier: 'primary',
[1609] Fix | Delete
character: 's'
[1610] Fix | Delete
}
[1611] Fix | Delete
});
[1612] Fix | Delete
return () => {
[1613] Fix | Delete
unregisterShortcut('core/customize-widgets/undo');
[1614] Fix | Delete
unregisterShortcut('core/customize-widgets/redo');
[1615] Fix | Delete
unregisterShortcut('core/customize-widgets/save');
[1616] Fix | Delete
};
[1617] Fix | Delete
}, [registerShortcut]);
[1618] Fix | Delete
return null;
[1619] Fix | Delete
}
[1620] Fix | Delete
KeyboardShortcuts.Register = KeyboardShortcutsRegister;
[1621] Fix | Delete
/* harmony default export */ const keyboard_shortcuts = (KeyboardShortcuts);
[1622] Fix | Delete
[1623] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-appender/index.js
[1624] Fix | Delete
/**
[1625] Fix | Delete
* WordPress dependencies
[1626] Fix | Delete
*/
[1627] Fix | Delete
[1628] Fix | Delete
[1629] Fix | Delete
[1630] Fix | Delete
[1631] Fix | Delete
function BlockAppender(props) {
[1632] Fix | Delete
const ref = (0,external_wp_element_namespaceObject.useRef)();
[1633] Fix | Delete
const isBlocksListEmpty = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getBlockCount() === 0);
[1634] Fix | Delete
[1635] Fix | Delete
// Move the focus to the block appender to prevent focus from
[1636] Fix | Delete
// being lost when emptying the widget area.
[1637] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[1638] Fix | Delete
if (isBlocksListEmpty && ref.current) {
[1639] Fix | Delete
const {
[1640] Fix | Delete
ownerDocument
[1641] Fix | Delete
} = ref.current;
[1642] Fix | Delete
if (!ownerDocument.activeElement || ownerDocument.activeElement === ownerDocument.body) {
[1643] Fix | Delete
ref.current.focus();
[1644] Fix | Delete
}
[1645] Fix | Delete
}
[1646] Fix | Delete
}, [isBlocksListEmpty]);
[1647] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.ButtonBlockAppender, {
[1648] Fix | Delete
...props,
[1649] Fix | Delete
ref: ref
[1650] Fix | Delete
});
[1651] Fix | Delete
}
[1652] Fix | Delete
[1653] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/index.js
[1654] Fix | Delete
/**
[1655] Fix | Delete
* WordPress dependencies
[1656] Fix | Delete
*/
[1657] Fix | Delete
[1658] Fix | Delete
[1659] Fix | Delete
[1660] Fix | Delete
[1661] Fix | Delete
[1662] Fix | Delete
[1663] Fix | Delete
[1664] Fix | Delete
[1665] Fix | Delete
[1666] Fix | Delete
/**
[1667] Fix | Delete
* Internal dependencies
[1668] Fix | Delete
*/
[1669] Fix | Delete
[1670] Fix | Delete
[1671] Fix | Delete
[1672] Fix | Delete
[1673] Fix | Delete
[1674] Fix | Delete
[1675] Fix | Delete
[1676] Fix | Delete
[1677] Fix | Delete
[1678] Fix | Delete
[1679] Fix | Delete
[1680] Fix | Delete
const {
[1681] Fix | Delete
ExperimentalBlockCanvas: BlockCanvas
[1682] Fix | Delete
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
[1683] Fix | Delete
const {
[1684] Fix | Delete
BlockKeyboardShortcuts
[1685] Fix | Delete
} = unlock(external_wp_blockLibrary_namespaceObject.privateApis);
[1686] Fix | Delete
function SidebarBlockEditor({
[1687] Fix | Delete
blockEditorSettings,
[1688] Fix | Delete
sidebar,
[1689] Fix | Delete
inserter,
[1690] Fix | Delete
inspector
[1691] Fix | Delete
}) {
[1692] Fix | Delete
const [isInserterOpened, setIsInserterOpened] = useInserter(inserter);
[1693] Fix | Delete
const isMediumViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('small');
[1694] Fix | Delete
const {
[1695] Fix | Delete
hasUploadPermissions,
[1696] Fix | Delete
isFixedToolbarActive,
[1697] Fix | Delete
keepCaretInsideBlock,
[1698] Fix | Delete
isWelcomeGuideActive
[1699] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[1700] Fix | Delete
var _select$canUser;
[1701] Fix | Delete
const {
[1702] Fix | Delete
get
[1703] Fix | Delete
} = select(external_wp_preferences_namespaceObject.store);
[1704] Fix | Delete
return {
[1705] Fix | Delete
hasUploadPermissions: (_select$canUser = select(external_wp_coreData_namespaceObject.store).canUser('create', 'media')) !== null && _select$canUser !== void 0 ? _select$canUser : true,
[1706] Fix | Delete
isFixedToolbarActive: !!get('core/customize-widgets', 'fixedToolbar'),
[1707] Fix | Delete
keepCaretInsideBlock: !!get('core/customize-widgets', 'keepCaretInsideBlock'),
[1708] Fix | Delete
isWelcomeGuideActive: !!get('core/customize-widgets', 'welcomeGuide')
[1709] Fix | Delete
};
[1710] Fix | Delete
}, []);
[1711] Fix | Delete
const settings = (0,external_wp_element_namespaceObject.useMemo)(() => {
[1712] Fix | Delete
let mediaUploadBlockEditor;
[1713] Fix | Delete
if (hasUploadPermissions) {
[1714] Fix | Delete
mediaUploadBlockEditor = ({
[1715] Fix | Delete
onError,
[1716] Fix | Delete
...argumentsObject
[1717] Fix | Delete
}) => {
[1718] Fix | Delete
(0,external_wp_mediaUtils_namespaceObject.uploadMedia)({
[1719] Fix | Delete
wpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,
[1720] Fix | Delete
onError: ({
[1721] Fix | Delete
message
[1722] Fix | Delete
}) => onError(message),
[1723] Fix | Delete
...argumentsObject
[1724] Fix | Delete
});
[1725] Fix | Delete
};
[1726] Fix | Delete
}
[1727] Fix | Delete
return {
[1728] Fix | Delete
...blockEditorSettings,
[1729] Fix | Delete
__experimentalSetIsInserterOpened: setIsInserterOpened,
[1730] Fix | Delete
mediaUpload: mediaUploadBlockEditor,
[1731] Fix | Delete
hasFixedToolbar: isFixedToolbarActive || !isMediumViewport,
[1732] Fix | Delete
keepCaretInsideBlock,
[1733] Fix | Delete
__unstableHasCustomAppender: true
[1734] Fix | Delete
};
[1735] Fix | Delete
}, [hasUploadPermissions, blockEditorSettings, isFixedToolbarActive, isMediumViewport, keepCaretInsideBlock, setIsInserterOpened]);
[1736] Fix | Delete
if (isWelcomeGuideActive) {
[1737] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuide, {
[1738] Fix | Delete
sidebar: sidebar
[1739] Fix | Delete
});
[1740] Fix | Delete
}
[1741] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[1742] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts.Register, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockKeyboardShortcuts, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(SidebarEditorProvider, {
[1743] Fix | Delete
sidebar: sidebar,
[1744] Fix | Delete
settings: settings,
[1745] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts, {
[1746] Fix | Delete
undo: sidebar.undo,
[1747] Fix | Delete
redo: sidebar.redo,
[1748] Fix | Delete
save: sidebar.save
[1749] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
[1750] Fix | Delete
sidebar: sidebar,
[1751] Fix | Delete
inserter: inserter,
[1752] Fix | Delete
isInserterOpened: isInserterOpened,
[1753] Fix | Delete
setIsInserterOpened: setIsInserterOpened,
[1754] Fix | Delete
isFixedToolbarActive: isFixedToolbarActive || !isMediumViewport
[1755] Fix | Delete
}), (isFixedToolbarActive || !isMediumViewport) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockToolbar, {
[1756] Fix | Delete
hideDragHandle: true
[1757] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockCanvas, {
[1758] Fix | Delete
shouldIframe: false,
[1759] Fix | Delete
styles: settings.defaultEditorStyles,
[1760] Fix | Delete
height: "100%",
[1761] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockList, {
[1762] Fix | Delete
renderAppender: BlockAppender
[1763] Fix | Delete
})
[1764] Fix | Delete
}), (0,external_wp_element_namespaceObject.createPortal)(
[1765] Fix | Delete
/*#__PURE__*/
[1766] Fix | Delete
// This is a temporary hack to prevent button component inside <BlockInspector>
[1767] Fix | Delete
// from submitting form when type="button" is not specified.
[1768] Fix | Delete
(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
[1769] Fix | Delete
onSubmit: event => event.preventDefault(),
[1770] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockInspector, {})
[1771] Fix | Delete
}), inspector.contentContainer[0])]
[1772] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableBlockSettingsMenuFirstItem, {
[1773] Fix | Delete
children: ({
[1774] Fix | Delete
onClose
[1775] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_inspector_button, {
[1776] Fix | Delete
inspector: inspector,
[1777] Fix | Delete
closeMenu: onClose
[1778] Fix | Delete
})
[1779] Fix | Delete
})]
[1780] Fix | Delete
});
[1781] Fix | Delete
}
[1782] Fix | Delete
[1783] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-controls/index.js
[1784] Fix | Delete
/**
[1785] Fix | Delete
* WordPress dependencies
[1786] Fix | Delete
*/
[1787] Fix | Delete
[1788] Fix | Delete
[1789] Fix | Delete
const SidebarControlsContext = (0,external_wp_element_namespaceObject.createContext)();
[1790] Fix | Delete
function SidebarControls({
[1791] Fix | Delete
sidebarControls,
[1792] Fix | Delete
activeSidebarControl,
[1793] Fix | Delete
children
[1794] Fix | Delete
}) {
[1795] Fix | Delete
const context = (0,external_wp_element_namespaceObject.useMemo)(() => ({
[1796] Fix | Delete
sidebarControls,
[1797] Fix | Delete
activeSidebarControl
[1798] Fix | Delete
}), [sidebarControls, activeSidebarControl]);
[1799] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarControlsContext.Provider, {
[1800] Fix | Delete
value: context,
[1801] Fix | Delete
children: children
[1802] Fix | Delete
});
[1803] Fix | Delete
}
[1804] Fix | Delete
function useSidebarControls() {
[1805] Fix | Delete
const {
[1806] Fix | Delete
sidebarControls
[1807] Fix | Delete
} = (0,external_wp_element_namespaceObject.useContext)(SidebarControlsContext);
[1808] Fix | Delete
return sidebarControls;
[1809] Fix | Delete
}
[1810] Fix | Delete
function useActiveSidebarControl() {
[1811] Fix | Delete
const {
[1812] Fix | Delete
activeSidebarControl
[1813] Fix | Delete
} = (0,external_wp_element_namespaceObject.useContext)(SidebarControlsContext);
[1814] Fix | Delete
return activeSidebarControl;
[1815] Fix | Delete
}
[1816] Fix | Delete
[1817] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/use-clear-selected-block.js
[1818] Fix | Delete
/**
[1819] Fix | Delete
* WordPress dependencies
[1820] Fix | Delete
*/
[1821] Fix | Delete
[1822] Fix | Delete
[1823] Fix | Delete
[1824] Fix | Delete
[1825] Fix | Delete
/**
[1826] Fix | Delete
* We can't just use <BlockSelectionClearer> because the customizer has
[1827] Fix | Delete
* many root nodes rather than just one in the post editor.
[1828] Fix | Delete
* We need to listen to the focus events in all those roots, and also in
[1829] Fix | Delete
* the preview iframe.
[1830] Fix | Delete
* This hook will clear the selected block when focusing outside the editor,
[1831] Fix | Delete
* with a few exceptions:
[1832] Fix | Delete
* 1. Focusing on popovers.
[1833] Fix | Delete
* 2. Focusing on the inspector.
[1834] Fix | Delete
* 3. Focusing on any modals/dialogs.
[1835] Fix | Delete
* These cases are normally triggered by user interactions from the editor,
[1836] Fix | Delete
* not by explicitly focusing outside the editor, hence no need for clearing.
[1837] Fix | Delete
*
[1838] Fix | Delete
* @param {Object} sidebarControl The sidebar control instance.
[1839] Fix | Delete
* @param {Object} popoverRef The ref object of the popover node container.
[1840] Fix | Delete
*/
[1841] Fix | Delete
function useClearSelectedBlock(sidebarControl, popoverRef) {
[1842] Fix | Delete
const {
[1843] Fix | Delete
hasSelectedBlock,
[1844] Fix | Delete
hasMultiSelection
[1845] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
[1846] Fix | Delete
const {
[1847] Fix | Delete
clearSelectedBlock
[1848] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
[1849] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[1850] Fix | Delete
if (popoverRef.current && sidebarControl) {
[1851] Fix | Delete
const inspector = sidebarControl.inspector;
[1852] Fix | Delete
const container = sidebarControl.container[0];
[1853] Fix | Delete
const ownerDocument = container.ownerDocument;
[1854] Fix | Delete
const ownerWindow = ownerDocument.defaultView;
[1855] Fix | Delete
function handleClearSelectedBlock(element) {
[1856] Fix | Delete
if (
[1857] Fix | Delete
// 1. Make sure there are blocks being selected.
[1858] Fix | Delete
(hasSelectedBlock() || hasMultiSelection()) &&
[1859] Fix | Delete
// 2. The element should exist in the DOM (not deleted).
[1860] Fix | Delete
element && ownerDocument.contains(element) &&
[1861] Fix | Delete
// 3. It should also not exist in the container, the popover, nor the dialog.
[1862] Fix | Delete
!container.contains(element) && !popoverRef.current.contains(element) && !element.closest('[role="dialog"]') &&
[1863] Fix | Delete
// 4. The inspector should not be opened.
[1864] Fix | Delete
!inspector.expanded()) {
[1865] Fix | Delete
clearSelectedBlock();
[1866] Fix | Delete
}
[1867] Fix | Delete
}
[1868] Fix | Delete
[1869] Fix | Delete
// Handle mouse down in the same document.
[1870] Fix | Delete
function handleMouseDown(event) {
[1871] Fix | Delete
handleClearSelectedBlock(event.target);
[1872] Fix | Delete
}
[1873] Fix | Delete
// Handle focusing outside the current document, like to iframes.
[1874] Fix | Delete
function handleBlur() {
[1875] Fix | Delete
handleClearSelectedBlock(ownerDocument.activeElement);
[1876] Fix | Delete
}
[1877] Fix | Delete
ownerDocument.addEventListener('mousedown', handleMouseDown);
[1878] Fix | Delete
ownerWindow.addEventListener('blur', handleBlur);
[1879] Fix | Delete
return () => {
[1880] Fix | Delete
ownerDocument.removeEventListener('mousedown', handleMouseDown);
[1881] Fix | Delete
ownerWindow.removeEventListener('blur', handleBlur);
[1882] Fix | Delete
};
[1883] Fix | Delete
}
[1884] Fix | Delete
}, [popoverRef, sidebarControl, hasSelectedBlock, hasMultiSelection, clearSelectedBlock]);
[1885] Fix | Delete
}
[1886] Fix | Delete
[1887] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/index.js
[1888] Fix | Delete
/**
[1889] Fix | Delete
* WordPress dependencies
[1890] Fix | Delete
*/
[1891] Fix | Delete
[1892] Fix | Delete
[1893] Fix | Delete
[1894] Fix | Delete
/**
[1895] Fix | Delete
* Internal dependencies
[1896] Fix | Delete
*/
[1897] Fix | Delete
[1898] Fix | Delete
[1899] Fix | Delete
[1900] Fix | Delete
[1901] Fix | Delete
[1902] Fix | Delete
[1903] Fix | Delete
[1904] Fix | Delete
function CustomizeWidgets({
[1905] Fix | Delete
api,
[1906] Fix | Delete
sidebarControls,
[1907] Fix | Delete
blockEditorSettings
[1908] Fix | Delete
}) {
[1909] Fix | Delete
const [activeSidebarControl, setActiveSidebarControl] = (0,external_wp_element_namespaceObject.useState)(null);
[1910] Fix | Delete
const parentContainer = document.getElementById('customize-theme-controls');
[1911] Fix | Delete
const popoverRef = (0,external_wp_element_namespaceObject.useRef)();
[1912] Fix | Delete
useClearSelectedBlock(activeSidebarControl, popoverRef);
[1913] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[1914] Fix | Delete
const unsubscribers = sidebarControls.map(sidebarControl => sidebarControl.subscribe(expanded => {
[1915] Fix | Delete
if (expanded) {
[1916] Fix | Delete
setActiveSidebarControl(sidebarControl);
[1917] Fix | Delete
}
[1918] Fix | Delete
}));
[1919] Fix | Delete
return () => {
[1920] Fix | Delete
unsubscribers.forEach(unsubscriber => unsubscriber());
[1921] Fix | Delete
};
[1922] Fix | Delete
}, [sidebarControls]);
[1923] Fix | Delete
const activeSidebar = activeSidebarControl && (0,external_wp_element_namespaceObject.createPortal)( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorBoundary, {
[1924] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarBlockEditor, {
[1925] Fix | Delete
blockEditorSettings: blockEditorSettings,
[1926] Fix | Delete
sidebar: activeSidebarControl.sidebarAdapter,
[1927] Fix | Delete
inserter: activeSidebarControl.inserter,
[1928] Fix | Delete
inspector: activeSidebarControl.inspector
[1929] Fix | Delete
}, activeSidebarControl.id)
[1930] Fix | Delete
}), activeSidebarControl.container[0]);
[1931] Fix | Delete
[1932] Fix | Delete
// We have to portal this to the parent of both the editor and the inspector,
[1933] Fix | Delete
// so that the popovers will appear above both of them.
[1934] Fix | Delete
const popover = parentContainer && (0,external_wp_element_namespaceObject.createPortal)( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[1935] Fix | Delete
className: "customize-widgets-popover",
[1936] Fix | Delete
ref: popoverRef,
[1937] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Popover.Slot, {})
[1938] Fix | Delete
}), parentContainer);
[1939] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SlotFillProvider, {
[1940] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarControls, {
[1941] Fix | Delete
sidebarControls: sidebarControls,
[1942] Fix | Delete
activeSidebarControl: activeSidebarControl,
[1943] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(FocusControl, {
[1944] Fix | Delete
api: api,
[1945] Fix | Delete
sidebarControls: sidebarControls,
[1946] Fix | Delete
children: [activeSidebar, popover]
[1947] Fix | Delete
})
[1948] Fix | Delete
})
[1949] Fix | Delete
});
[1950] Fix | Delete
}
[1951] Fix | Delete
[1952] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/inspector-section.js
[1953] Fix | Delete
function getInspectorSection() {
[1954] Fix | Delete
const {
[1955] Fix | Delete
wp: {
[1956] Fix | Delete
customize
[1957] Fix | Delete
}
[1958] Fix | Delete
} = window;
[1959] Fix | Delete
return class InspectorSection extends customize.Section {
[1960] Fix | Delete
constructor(id, options) {
[1961] Fix | Delete
super(id, options);
[1962] Fix | Delete
this.parentSection = options.parentSection;
[1963] Fix | Delete
this.returnFocusWhenClose = null;
[1964] Fix | Delete
this._isOpen = false;
[1965] Fix | Delete
}
[1966] Fix | Delete
get isOpen() {
[1967] Fix | Delete
return this._isOpen;
[1968] Fix | Delete
}
[1969] Fix | Delete
set isOpen(value) {
[1970] Fix | Delete
this._isOpen = value;
[1971] Fix | Delete
this.triggerActiveCallbacks();
[1972] Fix | Delete
}
[1973] Fix | Delete
ready() {
[1974] Fix | Delete
this.contentContainer[0].classList.add('customize-widgets-layout__inspector');
[1975] Fix | Delete
}
[1976] Fix | Delete
isContextuallyActive() {
[1977] Fix | Delete
return this.isOpen;
[1978] Fix | Delete
}
[1979] Fix | Delete
onChangeExpanded(expanded, args) {
[1980] Fix | Delete
super.onChangeExpanded(expanded, args);
[1981] Fix | Delete
if (this.parentSection && !args.unchanged) {
[1982] Fix | Delete
if (expanded) {
[1983] Fix | Delete
this.parentSection.collapse({
[1984] Fix | Delete
manualTransition: true
[1985] Fix | Delete
});
[1986] Fix | Delete
} else {
[1987] Fix | Delete
this.parentSection.expand({
[1988] Fix | Delete
manualTransition: true,
[1989] Fix | Delete
completeCallback: () => {
[1990] Fix | Delete
// Return focus after finishing the transition.
[1991] Fix | Delete
if (this.returnFocusWhenClose && !this.contentContainer[0].contains(this.returnFocusWhenClose)) {
[1992] Fix | Delete
this.returnFocusWhenClose.focus();
[1993] Fix | Delete
}
[1994] Fix | Delete
}
[1995] Fix | Delete
});
[1996] Fix | Delete
}
[1997] Fix | Delete
}
[1998] Fix | Delete
}
[1999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function