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: edit-widgets.js
const useLastSelectedWidgetArea = () => (0,external_wp_data_namespaceObject.useSelect)(select => {
[3000] Fix | Delete
const {
[3001] Fix | Delete
getBlockSelectionEnd,
[3002] Fix | Delete
getBlockName
[3003] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[3004] Fix | Delete
const selectionEndClientId = getBlockSelectionEnd();
[3005] Fix | Delete
[3006] Fix | Delete
// If the selected block is a widget area, return its clientId.
[3007] Fix | Delete
if (getBlockName(selectionEndClientId) === 'core/widget-area') {
[3008] Fix | Delete
return selectionEndClientId;
[3009] Fix | Delete
}
[3010] Fix | Delete
const {
[3011] Fix | Delete
getParentWidgetAreaBlock
[3012] Fix | Delete
} = select(store_store);
[3013] Fix | Delete
const widgetAreaBlock = getParentWidgetAreaBlock(selectionEndClientId);
[3014] Fix | Delete
const widgetAreaBlockClientId = widgetAreaBlock?.clientId;
[3015] Fix | Delete
if (widgetAreaBlockClientId) {
[3016] Fix | Delete
return widgetAreaBlockClientId;
[3017] Fix | Delete
}
[3018] Fix | Delete
[3019] Fix | Delete
// If no widget area has been selected, return the clientId of the first
[3020] Fix | Delete
// area.
[3021] Fix | Delete
const {
[3022] Fix | Delete
getEntityRecord
[3023] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[3024] Fix | Delete
const widgetAreasPost = getEntityRecord(KIND, POST_TYPE, buildWidgetAreasPostId());
[3025] Fix | Delete
return widgetAreasPost?.blocks[0]?.clientId;
[3026] Fix | Delete
}, []);
[3027] Fix | Delete
/* harmony default export */ const use_last_selected_widget_area = (useLastSelectedWidgetArea);
[3028] Fix | Delete
[3029] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/constants.js
[3030] Fix | Delete
const ALLOW_REUSABLE_BLOCKS = false;
[3031] Fix | Delete
const ENABLE_EXPERIMENTAL_FSE_BLOCKS = false;
[3032] Fix | Delete
[3033] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/widget-areas-block-editor-provider/index.js
[3034] Fix | Delete
/**
[3035] Fix | Delete
* WordPress dependencies
[3036] Fix | Delete
*/
[3037] Fix | Delete
[3038] Fix | Delete
[3039] Fix | Delete
[3040] Fix | Delete
[3041] Fix | Delete
[3042] Fix | Delete
[3043] Fix | Delete
[3044] Fix | Delete
[3045] Fix | Delete
[3046] Fix | Delete
[3047] Fix | Delete
[3048] Fix | Delete
/**
[3049] Fix | Delete
* Internal dependencies
[3050] Fix | Delete
*/
[3051] Fix | Delete
[3052] Fix | Delete
[3053] Fix | Delete
[3054] Fix | Delete
[3055] Fix | Delete
[3056] Fix | Delete
[3057] Fix | Delete
[3058] Fix | Delete
[3059] Fix | Delete
const {
[3060] Fix | Delete
ExperimentalBlockEditorProvider
[3061] Fix | Delete
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
[3062] Fix | Delete
const {
[3063] Fix | Delete
PatternsMenuItems
[3064] Fix | Delete
} = unlock(external_wp_patterns_namespaceObject.privateApis);
[3065] Fix | Delete
const {
[3066] Fix | Delete
BlockKeyboardShortcuts
[3067] Fix | Delete
} = unlock(external_wp_blockLibrary_namespaceObject.privateApis);
[3068] Fix | Delete
function WidgetAreasBlockEditorProvider({
[3069] Fix | Delete
blockEditorSettings,
[3070] Fix | Delete
children,
[3071] Fix | Delete
...props
[3072] Fix | Delete
}) {
[3073] Fix | Delete
const mediaPermissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)('media');
[3074] Fix | Delete
const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
[3075] Fix | Delete
const {
[3076] Fix | Delete
reusableBlocks,
[3077] Fix | Delete
isFixedToolbarActive,
[3078] Fix | Delete
keepCaretInsideBlock,
[3079] Fix | Delete
pageOnFront,
[3080] Fix | Delete
pageForPosts
[3081] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[3082] Fix | Delete
const {
[3083] Fix | Delete
canUser,
[3084] Fix | Delete
getEntityRecord,
[3085] Fix | Delete
getEntityRecords
[3086] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[3087] Fix | Delete
const siteSettings = canUser('read', 'settings') ? getEntityRecord('root', 'site') : undefined;
[3088] Fix | Delete
return {
[3089] Fix | Delete
widgetAreas: select(store_store).getWidgetAreas(),
[3090] Fix | Delete
widgets: select(store_store).getWidgets(),
[3091] Fix | Delete
reusableBlocks: ALLOW_REUSABLE_BLOCKS ? getEntityRecords('postType', 'wp_block') : [],
[3092] Fix | Delete
isFixedToolbarActive: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'fixedToolbar'),
[3093] Fix | Delete
keepCaretInsideBlock: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'keepCaretInsideBlock'),
[3094] Fix | Delete
pageOnFront: siteSettings?.page_on_front,
[3095] Fix | Delete
pageForPosts: siteSettings?.page_for_posts
[3096] Fix | Delete
};
[3097] Fix | Delete
}, []);
[3098] Fix | Delete
const {
[3099] Fix | Delete
setIsInserterOpened
[3100] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
[3101] Fix | Delete
const settings = (0,external_wp_element_namespaceObject.useMemo)(() => {
[3102] Fix | Delete
let mediaUploadBlockEditor;
[3103] Fix | Delete
if (mediaPermissions.canCreate) {
[3104] Fix | Delete
mediaUploadBlockEditor = ({
[3105] Fix | Delete
onError,
[3106] Fix | Delete
...argumentsObject
[3107] Fix | Delete
}) => {
[3108] Fix | Delete
(0,external_wp_mediaUtils_namespaceObject.uploadMedia)({
[3109] Fix | Delete
wpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,
[3110] Fix | Delete
onError: ({
[3111] Fix | Delete
message
[3112] Fix | Delete
}) => onError(message),
[3113] Fix | Delete
...argumentsObject
[3114] Fix | Delete
});
[3115] Fix | Delete
};
[3116] Fix | Delete
}
[3117] Fix | Delete
return {
[3118] Fix | Delete
...blockEditorSettings,
[3119] Fix | Delete
__experimentalReusableBlocks: reusableBlocks,
[3120] Fix | Delete
hasFixedToolbar: isFixedToolbarActive || !isLargeViewport,
[3121] Fix | Delete
keepCaretInsideBlock,
[3122] Fix | Delete
mediaUpload: mediaUploadBlockEditor,
[3123] Fix | Delete
templateLock: 'all',
[3124] Fix | Delete
__experimentalSetIsInserterOpened: setIsInserterOpened,
[3125] Fix | Delete
pageOnFront,
[3126] Fix | Delete
pageForPosts
[3127] Fix | Delete
};
[3128] Fix | Delete
}, [blockEditorSettings, isFixedToolbarActive, isLargeViewport, keepCaretInsideBlock, mediaPermissions.canCreate, reusableBlocks, setIsInserterOpened, pageOnFront, pageForPosts]);
[3129] Fix | Delete
const widgetAreaId = use_last_selected_widget_area();
[3130] Fix | Delete
const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)(KIND, POST_TYPE, {
[3131] Fix | Delete
id: buildWidgetAreasPostId()
[3132] Fix | Delete
});
[3133] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SlotFillProvider, {
[3134] 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)(ExperimentalBlockEditorProvider, {
[3135] Fix | Delete
value: blocks,
[3136] Fix | Delete
onInput: onInput,
[3137] Fix | Delete
onChange: onChange,
[3138] Fix | Delete
settings: settings,
[3139] Fix | Delete
useSubRegistry: false,
[3140] Fix | Delete
...props,
[3141] Fix | Delete
children: [children, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PatternsMenuItems, {
[3142] Fix | Delete
rootClientId: widgetAreaId
[3143] Fix | Delete
})]
[3144] Fix | Delete
})]
[3145] Fix | Delete
});
[3146] Fix | Delete
}
[3147] Fix | Delete
[3148] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drawer-left.js
[3149] Fix | Delete
/**
[3150] Fix | Delete
* WordPress dependencies
[3151] Fix | Delete
*/
[3152] Fix | Delete
[3153] Fix | Delete
[3154] Fix | Delete
const drawerLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[3155] Fix | Delete
width: "24",
[3156] Fix | Delete
height: "24",
[3157] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[3158] Fix | Delete
viewBox: "0 0 24 24",
[3159] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[3160] Fix | Delete
fillRule: "evenodd",
[3161] Fix | Delete
clipRule: "evenodd",
[3162] Fix | Delete
d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"
[3163] Fix | Delete
})
[3164] Fix | Delete
});
[3165] Fix | Delete
/* harmony default export */ const drawer_left = (drawerLeft);
[3166] Fix | Delete
[3167] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drawer-right.js
[3168] Fix | Delete
/**
[3169] Fix | Delete
* WordPress dependencies
[3170] Fix | Delete
*/
[3171] Fix | Delete
[3172] Fix | Delete
[3173] Fix | Delete
const drawerRight = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[3174] Fix | Delete
width: "24",
[3175] Fix | Delete
height: "24",
[3176] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[3177] Fix | Delete
viewBox: "0 0 24 24",
[3178] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[3179] Fix | Delete
fillRule: "evenodd",
[3180] Fix | Delete
clipRule: "evenodd",
[3181] Fix | Delete
d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"
[3182] Fix | Delete
})
[3183] Fix | Delete
});
[3184] Fix | Delete
/* harmony default export */ const drawer_right = (drawerRight);
[3185] Fix | Delete
[3186] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
[3187] Fix | Delete
/**
[3188] Fix | Delete
* WordPress dependencies
[3189] Fix | Delete
*/
[3190] Fix | Delete
[3191] Fix | Delete
[3192] Fix | Delete
const blockDefault = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[3193] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[3194] Fix | Delete
viewBox: "0 0 24 24",
[3195] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[3196] Fix | Delete
d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"
[3197] Fix | Delete
})
[3198] Fix | Delete
});
[3199] Fix | Delete
/* harmony default export */ const block_default = (blockDefault);
[3200] Fix | Delete
[3201] Fix | Delete
;// CONCATENATED MODULE: external ["wp","url"]
[3202] Fix | Delete
const external_wp_url_namespaceObject = window["wp"]["url"];
[3203] Fix | Delete
;// CONCATENATED MODULE: external ["wp","dom"]
[3204] Fix | Delete
const external_wp_dom_namespaceObject = window["wp"]["dom"];
[3205] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/sidebar/widget-areas.js
[3206] Fix | Delete
/**
[3207] Fix | Delete
* WordPress dependencies
[3208] Fix | Delete
*/
[3209] Fix | Delete
[3210] Fix | Delete
[3211] Fix | Delete
[3212] Fix | Delete
[3213] Fix | Delete
[3214] Fix | Delete
[3215] Fix | Delete
[3216] Fix | Delete
[3217] Fix | Delete
[3218] Fix | Delete
/**
[3219] Fix | Delete
* Internal dependencies
[3220] Fix | Delete
*/
[3221] Fix | Delete
[3222] Fix | Delete
[3223] Fix | Delete
[3224] Fix | Delete
function WidgetAreas({
[3225] Fix | Delete
selectedWidgetAreaId
[3226] Fix | Delete
}) {
[3227] Fix | Delete
const widgetAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getWidgetAreas(), []);
[3228] Fix | Delete
const selectedWidgetArea = (0,external_wp_element_namespaceObject.useMemo)(() => selectedWidgetAreaId && widgetAreas?.find(widgetArea => widgetArea.id === selectedWidgetAreaId), [selectedWidgetAreaId, widgetAreas]);
[3229] Fix | Delete
let description;
[3230] Fix | Delete
if (!selectedWidgetArea) {
[3231] Fix | Delete
description = (0,external_wp_i18n_namespaceObject.__)('Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.');
[3232] Fix | Delete
} else if (selectedWidgetAreaId === 'wp_inactive_widgets') {
[3233] Fix | Delete
description = (0,external_wp_i18n_namespaceObject.__)('Blocks in this Widget Area will not be displayed in your site.');
[3234] Fix | Delete
} else {
[3235] Fix | Delete
description = selectedWidgetArea.description;
[3236] Fix | Delete
}
[3237] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[3238] Fix | Delete
className: "edit-widgets-widget-areas",
[3239] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[3240] Fix | Delete
className: "edit-widgets-widget-areas__top-container",
[3241] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
[3242] Fix | Delete
icon: block_default
[3243] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[3244] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
[3245] Fix | Delete
// Use `dangerouslySetInnerHTML` to keep backwards
[3246] Fix | Delete
// compatibility. Basic markup in the description is an
[3247] Fix | Delete
// established feature of WordPress.
[3248] Fix | Delete
// @see https://github.com/WordPress/gutenberg/issues/33106
[3249] Fix | Delete
dangerouslySetInnerHTML: {
[3250] Fix | Delete
__html: (0,external_wp_dom_namespaceObject.safeHTML)(description)
[3251] Fix | Delete
}
[3252] Fix | Delete
}), widgetAreas?.length === 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
[3253] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Your theme does not contain any Widget Areas.')
[3254] Fix | Delete
}), !selectedWidgetArea && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[3255] Fix | Delete
href: (0,external_wp_url_namespaceObject.addQueryArgs)('customize.php', {
[3256] Fix | Delete
'autofocus[panel]': 'widgets',
[3257] Fix | Delete
return: window.location.pathname
[3258] Fix | Delete
}),
[3259] Fix | Delete
variant: "tertiary",
[3260] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Manage with live preview')
[3261] Fix | Delete
})]
[3262] Fix | Delete
})]
[3263] Fix | Delete
})
[3264] Fix | Delete
});
[3265] Fix | Delete
}
[3266] Fix | Delete
[3267] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/sidebar/index.js
[3268] Fix | Delete
/**
[3269] Fix | Delete
* WordPress dependencies
[3270] Fix | Delete
*/
[3271] Fix | Delete
[3272] Fix | Delete
[3273] Fix | Delete
[3274] Fix | Delete
[3275] Fix | Delete
[3276] Fix | Delete
[3277] Fix | Delete
[3278] Fix | Delete
const SIDEBAR_ACTIVE_BY_DEFAULT = external_wp_element_namespaceObject.Platform.select({
[3279] Fix | Delete
web: true,
[3280] Fix | Delete
native: false
[3281] Fix | Delete
});
[3282] Fix | Delete
const BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector';
[3283] Fix | Delete
[3284] Fix | Delete
// Widget areas were one called block areas, so use 'edit-widgets/block-areas'
[3285] Fix | Delete
// for backwards compatibility.
[3286] Fix | Delete
const WIDGET_AREAS_IDENTIFIER = 'edit-widgets/block-areas';
[3287] Fix | Delete
[3288] Fix | Delete
/**
[3289] Fix | Delete
* Internal dependencies
[3290] Fix | Delete
*/
[3291] Fix | Delete
[3292] Fix | Delete
[3293] Fix | Delete
[3294] Fix | Delete
[3295] Fix | Delete
[3296] Fix | Delete
const {
[3297] Fix | Delete
Tabs
[3298] Fix | Delete
} = unlock(external_wp_components_namespaceObject.privateApis);
[3299] Fix | Delete
function SidebarHeader({
[3300] Fix | Delete
selectedWidgetAreaBlock
[3301] Fix | Delete
}) {
[3302] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tabs.TabList, {
[3303] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.Tab, {
[3304] Fix | Delete
tabId: WIDGET_AREAS_IDENTIFIER,
[3305] Fix | Delete
children: selectedWidgetAreaBlock ? selectedWidgetAreaBlock.attributes.name : (0,external_wp_i18n_namespaceObject.__)('Widget Areas')
[3306] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.Tab, {
[3307] Fix | Delete
tabId: BLOCK_INSPECTOR_IDENTIFIER,
[3308] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Block')
[3309] Fix | Delete
})]
[3310] Fix | Delete
});
[3311] Fix | Delete
}
[3312] Fix | Delete
function SidebarContent({
[3313] Fix | Delete
hasSelectedNonAreaBlock,
[3314] Fix | Delete
currentArea,
[3315] Fix | Delete
isGeneralSidebarOpen,
[3316] Fix | Delete
selectedWidgetAreaBlock
[3317] Fix | Delete
}) {
[3318] Fix | Delete
const {
[3319] Fix | Delete
enableComplementaryArea
[3320] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[3321] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[3322] Fix | Delete
if (hasSelectedNonAreaBlock && currentArea === WIDGET_AREAS_IDENTIFIER && isGeneralSidebarOpen) {
[3323] Fix | Delete
enableComplementaryArea('core/edit-widgets', BLOCK_INSPECTOR_IDENTIFIER);
[3324] Fix | Delete
}
[3325] Fix | Delete
if (!hasSelectedNonAreaBlock && currentArea === BLOCK_INSPECTOR_IDENTIFIER && isGeneralSidebarOpen) {
[3326] Fix | Delete
enableComplementaryArea('core/edit-widgets', WIDGET_AREAS_IDENTIFIER);
[3327] Fix | Delete
}
[3328] Fix | Delete
// We're intentionally leaving `currentArea` and `isGeneralSidebarOpen`
[3329] Fix | Delete
// out of the dep array because we want this effect to run based on
[3330] Fix | Delete
// block selection changes, not sidebar state changes.
[3331] Fix | Delete
// eslint-disable-next-line react-hooks/exhaustive-deps
[3332] Fix | Delete
}, [hasSelectedNonAreaBlock, enableComplementaryArea]);
[3333] Fix | Delete
const tabsContextValue = (0,external_wp_element_namespaceObject.useContext)(Tabs.Context);
[3334] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area, {
[3335] Fix | Delete
className: "edit-widgets-sidebar",
[3336] Fix | Delete
header: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.Context.Provider, {
[3337] Fix | Delete
value: tabsContextValue,
[3338] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarHeader, {
[3339] Fix | Delete
selectedWidgetAreaBlock: selectedWidgetAreaBlock
[3340] Fix | Delete
})
[3341] Fix | Delete
}),
[3342] Fix | Delete
headerClassName: "edit-widgets-sidebar__panel-tabs"
[3343] Fix | Delete
/* translators: button label text should, if possible, be under 16 characters. */,
[3344] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
[3345] Fix | Delete
closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close Settings'),
[3346] Fix | Delete
scope: "core/edit-widgets",
[3347] Fix | Delete
identifier: currentArea,
[3348] Fix | Delete
icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? drawer_left : drawer_right,
[3349] Fix | Delete
isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT,
[3350] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tabs.Context.Provider, {
[3351] Fix | Delete
value: tabsContextValue,
[3352] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.TabPanel, {
[3353] Fix | Delete
tabId: WIDGET_AREAS_IDENTIFIER,
[3354] Fix | Delete
focusable: false,
[3355] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WidgetAreas, {
[3356] Fix | Delete
selectedWidgetAreaId: selectedWidgetAreaBlock?.attributes.id
[3357] Fix | Delete
})
[3358] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.TabPanel, {
[3359] Fix | Delete
tabId: BLOCK_INSPECTOR_IDENTIFIER,
[3360] Fix | Delete
focusable: false,
[3361] Fix | Delete
children: hasSelectedNonAreaBlock ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockInspector, {}) :
[3362] Fix | Delete
/*#__PURE__*/
[3363] Fix | Delete
// Pretend that Widget Areas are part of the UI by not
[3364] Fix | Delete
// showing the Block Inspector when one is selected.
[3365] Fix | Delete
(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[3366] Fix | Delete
className: "block-editor-block-inspector__no-blocks",
[3367] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('No block selected.')
[3368] Fix | Delete
})
[3369] Fix | Delete
})]
[3370] Fix | Delete
})
[3371] Fix | Delete
});
[3372] Fix | Delete
}
[3373] Fix | Delete
function Sidebar() {
[3374] Fix | Delete
const {
[3375] Fix | Delete
currentArea,
[3376] Fix | Delete
hasSelectedNonAreaBlock,
[3377] Fix | Delete
isGeneralSidebarOpen,
[3378] Fix | Delete
selectedWidgetAreaBlock
[3379] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[3380] Fix | Delete
const {
[3381] Fix | Delete
getSelectedBlock,
[3382] Fix | Delete
getBlock,
[3383] Fix | Delete
getBlockParentsByBlockName
[3384] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[3385] Fix | Delete
const {
[3386] Fix | Delete
getActiveComplementaryArea
[3387] Fix | Delete
} = select(store);
[3388] Fix | Delete
const selectedBlock = getSelectedBlock();
[3389] Fix | Delete
const activeArea = getActiveComplementaryArea(store_store.name);
[3390] Fix | Delete
let currentSelection = activeArea;
[3391] Fix | Delete
if (!currentSelection) {
[3392] Fix | Delete
if (selectedBlock) {
[3393] Fix | Delete
currentSelection = BLOCK_INSPECTOR_IDENTIFIER;
[3394] Fix | Delete
} else {
[3395] Fix | Delete
currentSelection = WIDGET_AREAS_IDENTIFIER;
[3396] Fix | Delete
}
[3397] Fix | Delete
}
[3398] Fix | Delete
let widgetAreaBlock;
[3399] Fix | Delete
if (selectedBlock) {
[3400] Fix | Delete
if (selectedBlock.name === 'core/widget-area') {
[3401] Fix | Delete
widgetAreaBlock = selectedBlock;
[3402] Fix | Delete
} else {
[3403] Fix | Delete
widgetAreaBlock = getBlock(getBlockParentsByBlockName(selectedBlock.clientId, 'core/widget-area')[0]);
[3404] Fix | Delete
}
[3405] Fix | Delete
}
[3406] Fix | Delete
return {
[3407] Fix | Delete
currentArea: currentSelection,
[3408] Fix | Delete
hasSelectedNonAreaBlock: !!(selectedBlock && selectedBlock.name !== 'core/widget-area'),
[3409] Fix | Delete
isGeneralSidebarOpen: !!activeArea,
[3410] Fix | Delete
selectedWidgetAreaBlock: widgetAreaBlock
[3411] Fix | Delete
};
[3412] Fix | Delete
}, []);
[3413] Fix | Delete
const {
[3414] Fix | Delete
enableComplementaryArea
[3415] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[3416] Fix | Delete
[3417] Fix | Delete
// `newSelectedTabId` could technically be falsey if no tab is selected (i.e.
[3418] Fix | Delete
// the initial render) or when we don't want a tab displayed (i.e. the
[3419] Fix | Delete
// sidebar is closed). These cases should both be covered by the `!!` check
[3420] Fix | Delete
// below, so we shouldn't need any additional falsey handling.
[3421] Fix | Delete
const onTabSelect = (0,external_wp_element_namespaceObject.useCallback)(newSelectedTabId => {
[3422] Fix | Delete
if (!!newSelectedTabId) {
[3423] Fix | Delete
enableComplementaryArea(store_store.name, newSelectedTabId);
[3424] Fix | Delete
}
[3425] Fix | Delete
}, [enableComplementaryArea]);
[3426] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs
[3427] Fix | Delete
// Due to how this component is controlled (via a value from the
[3428] Fix | Delete
// `interfaceStore`), when the sidebar closes the currently selected
[3429] Fix | Delete
// tab can't be found. This causes the component to continuously reset
[3430] Fix | Delete
// the selection to `null` in an infinite loop. Proactively setting
[3431] Fix | Delete
// the selected tab to `null` avoids that.
[3432] Fix | Delete
, {
[3433] Fix | Delete
selectedTabId: isGeneralSidebarOpen ? currentArea : null,
[3434] Fix | Delete
onSelect: onTabSelect,
[3435] Fix | Delete
selectOnMove: false,
[3436] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarContent, {
[3437] Fix | Delete
hasSelectedNonAreaBlock: hasSelectedNonAreaBlock,
[3438] Fix | Delete
currentArea: currentArea,
[3439] Fix | Delete
isGeneralSidebarOpen: isGeneralSidebarOpen,
[3440] Fix | Delete
selectedWidgetAreaBlock: selectedWidgetAreaBlock
[3441] Fix | Delete
})
[3442] Fix | Delete
});
[3443] Fix | Delete
}
[3444] Fix | Delete
[3445] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
[3446] Fix | Delete
/**
[3447] Fix | Delete
* WordPress dependencies
[3448] Fix | Delete
*/
[3449] Fix | Delete
[3450] Fix | Delete
[3451] Fix | Delete
const plus = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[3452] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[3453] Fix | Delete
viewBox: "0 0 24 24",
[3454] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[3455] Fix | Delete
d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"
[3456] Fix | Delete
})
[3457] Fix | Delete
});
[3458] Fix | Delete
/* harmony default export */ const library_plus = (plus);
[3459] Fix | Delete
[3460] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/list-view.js
[3461] Fix | Delete
/**
[3462] Fix | Delete
* WordPress dependencies
[3463] Fix | Delete
*/
[3464] Fix | Delete
[3465] Fix | Delete
[3466] Fix | Delete
const listView = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[3467] Fix | Delete
viewBox: "0 0 24 24",
[3468] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[3469] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[3470] Fix | Delete
d: "M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"
[3471] Fix | Delete
})
[3472] Fix | Delete
});
[3473] Fix | Delete
/* harmony default export */ const list_view = (listView);
[3474] Fix | Delete
[3475] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
[3476] Fix | Delete
/**
[3477] Fix | Delete
* WordPress dependencies
[3478] Fix | Delete
*/
[3479] Fix | Delete
[3480] Fix | Delete
[3481] Fix | Delete
const undo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[3482] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[3483] Fix | Delete
viewBox: "0 0 24 24",
[3484] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[3485] Fix | Delete
d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
[3486] Fix | Delete
})
[3487] Fix | Delete
});
[3488] Fix | Delete
/* harmony default export */ const library_undo = (undo);
[3489] Fix | Delete
[3490] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
[3491] Fix | Delete
/**
[3492] Fix | Delete
* WordPress dependencies
[3493] Fix | Delete
*/
[3494] Fix | Delete
[3495] Fix | Delete
[3496] Fix | Delete
const redo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[3497] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[3498] Fix | Delete
viewBox: "0 0 24 24",
[3499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function