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
* WordPress dependencies
[2500] Fix | Delete
*/
[2501] Fix | Delete
[2502] Fix | Delete
[2503] Fix | Delete
/**
[2504] Fix | Delete
* Internal dependencies
[2505] Fix | Delete
*/
[2506] Fix | Delete
[2507] Fix | Delete
[2508] Fix | Delete
[2509] Fix | Delete
const getInserterId = controlId => `widgets-inserter-${controlId}`;
[2510] Fix | Delete
function getSidebarControl() {
[2511] Fix | Delete
const {
[2512] Fix | Delete
wp: {
[2513] Fix | Delete
customize
[2514] Fix | Delete
}
[2515] Fix | Delete
} = window;
[2516] Fix | Delete
return class SidebarControl extends customize.Control {
[2517] Fix | Delete
constructor(...args) {
[2518] Fix | Delete
super(...args);
[2519] Fix | Delete
this.subscribers = new Set();
[2520] Fix | Delete
}
[2521] Fix | Delete
ready() {
[2522] Fix | Delete
const InserterOuterSection = getInserterOuterSection();
[2523] Fix | Delete
this.inserter = new InserterOuterSection(getInserterId(this.id), {});
[2524] Fix | Delete
customize.section.add(this.inserter);
[2525] Fix | Delete
this.sectionInstance = customize.section(this.section());
[2526] Fix | Delete
this.inspector = this.sectionInstance.inspector;
[2527] Fix | Delete
this.sidebarAdapter = new SidebarAdapter(this.setting, customize);
[2528] Fix | Delete
}
[2529] Fix | Delete
subscribe(callback) {
[2530] Fix | Delete
this.subscribers.add(callback);
[2531] Fix | Delete
return () => {
[2532] Fix | Delete
this.subscribers.delete(callback);
[2533] Fix | Delete
};
[2534] Fix | Delete
}
[2535] Fix | Delete
onChangeSectionExpanded(expanded, args) {
[2536] Fix | Delete
if (!args.unchanged) {
[2537] Fix | Delete
// Close the inserter when the section collapses.
[2538] Fix | Delete
if (!expanded) {
[2539] Fix | Delete
(0,external_wp_data_namespaceObject.dispatch)(store).setIsInserterOpened(false);
[2540] Fix | Delete
}
[2541] Fix | Delete
this.subscribers.forEach(subscriber => subscriber(expanded, args));
[2542] Fix | Delete
}
[2543] Fix | Delete
}
[2544] Fix | Delete
};
[2545] Fix | Delete
}
[2546] Fix | Delete
[2547] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/move-to-sidebar.js
[2548] Fix | Delete
/**
[2549] Fix | Delete
* WordPress dependencies
[2550] Fix | Delete
*/
[2551] Fix | Delete
[2552] Fix | Delete
[2553] Fix | Delete
[2554] Fix | Delete
[2555] Fix | Delete
[2556] Fix | Delete
[2557] Fix | Delete
/**
[2558] Fix | Delete
* Internal dependencies
[2559] Fix | Delete
*/
[2560] Fix | Delete
[2561] Fix | Delete
[2562] Fix | Delete
[2563] Fix | Delete
[2564] Fix | Delete
[2565] Fix | Delete
[2566] Fix | Delete
const withMoveToSidebarToolbarItem = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
[2567] Fix | Delete
let widgetId = (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(props);
[2568] Fix | Delete
const sidebarControls = useSidebarControls();
[2569] Fix | Delete
const activeSidebarControl = useActiveSidebarControl();
[2570] Fix | Delete
const hasMultipleSidebars = sidebarControls?.length > 1;
[2571] Fix | Delete
const blockName = props.name;
[2572] Fix | Delete
const clientId = props.clientId;
[2573] Fix | Delete
const canInsertBlockInSidebar = (0,external_wp_data_namespaceObject.useSelect)(select => {
[2574] Fix | Delete
// Use an empty string to represent the root block list, which
[2575] Fix | Delete
// in the customizer editor represents a sidebar/widget area.
[2576] Fix | Delete
return select(external_wp_blockEditor_namespaceObject.store).canInsertBlockType(blockName, '');
[2577] Fix | Delete
}, [blockName]);
[2578] Fix | Delete
const block = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId), [clientId]);
[2579] Fix | Delete
const {
[2580] Fix | Delete
removeBlock
[2581] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
[2582] Fix | Delete
const [, focusWidget] = useFocusControl();
[2583] Fix | Delete
function moveToSidebar(sidebarControlId) {
[2584] Fix | Delete
const newSidebarControl = sidebarControls.find(sidebarControl => sidebarControl.id === sidebarControlId);
[2585] Fix | Delete
if (widgetId) {
[2586] Fix | Delete
/**
[2587] Fix | Delete
* If there's a widgetId, move it to the other sidebar.
[2588] Fix | Delete
*/
[2589] Fix | Delete
const oldSetting = activeSidebarControl.setting;
[2590] Fix | Delete
const newSetting = newSidebarControl.setting;
[2591] Fix | Delete
oldSetting(oldSetting().filter(id => id !== widgetId));
[2592] Fix | Delete
newSetting([...newSetting(), widgetId]);
[2593] Fix | Delete
} else {
[2594] Fix | Delete
/**
[2595] Fix | Delete
* If there isn't a widgetId, it's most likely a inner block.
[2596] Fix | Delete
* First, remove the block in the original sidebar,
[2597] Fix | Delete
* then, create a new widget in the new sidebar and get back its widgetId.
[2598] Fix | Delete
*/
[2599] Fix | Delete
const sidebarAdapter = newSidebarControl.sidebarAdapter;
[2600] Fix | Delete
removeBlock(clientId);
[2601] Fix | Delete
const addedWidgetIds = sidebarAdapter.setWidgets([...sidebarAdapter.getWidgets(), blockToWidget(block)]);
[2602] Fix | Delete
// The last non-null id is the added widget's id.
[2603] Fix | Delete
widgetId = addedWidgetIds.reverse().find(id => !!id);
[2604] Fix | Delete
}
[2605] Fix | Delete
[2606] Fix | Delete
// Move focus to the moved widget and expand the sidebar.
[2607] Fix | Delete
focusWidget(widgetId);
[2608] Fix | Delete
}
[2609] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[2610] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockEdit, {
[2611] Fix | Delete
...props
[2612] Fix | Delete
}), hasMultipleSidebars && canInsertBlockInSidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
[2613] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_widgets_namespaceObject.MoveToWidgetArea, {
[2614] Fix | Delete
widgetAreas: sidebarControls.map(sidebarControl => ({
[2615] Fix | Delete
id: sidebarControl.id,
[2616] Fix | Delete
name: sidebarControl.params.label,
[2617] Fix | Delete
description: sidebarControl.params.description
[2618] Fix | Delete
})),
[2619] Fix | Delete
currentWidgetAreaId: activeSidebarControl?.id,
[2620] Fix | Delete
onSelect: moveToSidebar
[2621] Fix | Delete
})
[2622] Fix | Delete
})]
[2623] Fix | Delete
});
[2624] Fix | Delete
}, 'withMoveToSidebarToolbarItem');
[2625] Fix | Delete
(0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/customize-widgets/block-edit', withMoveToSidebarToolbarItem);
[2626] Fix | Delete
[2627] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/replace-media-upload.js
[2628] Fix | Delete
/**
[2629] Fix | Delete
* WordPress dependencies
[2630] Fix | Delete
*/
[2631] Fix | Delete
[2632] Fix | Delete
[2633] Fix | Delete
const replaceMediaUpload = () => external_wp_mediaUtils_namespaceObject.MediaUpload;
[2634] Fix | Delete
(0,external_wp_hooks_namespaceObject.addFilter)('editor.MediaUpload', 'core/edit-widgets/replace-media-upload', replaceMediaUpload);
[2635] Fix | Delete
[2636] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/wide-widget-display.js
[2637] Fix | Delete
/**
[2638] Fix | Delete
* WordPress dependencies
[2639] Fix | Delete
*/
[2640] Fix | Delete
[2641] Fix | Delete
[2642] Fix | Delete
[2643] Fix | Delete
const {
[2644] Fix | Delete
wp: wide_widget_display_wp
[2645] Fix | Delete
} = window;
[2646] Fix | Delete
const withWideWidgetDisplay = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
[2647] Fix | Delete
var _wp$customize$Widgets;
[2648] Fix | Delete
const {
[2649] Fix | Delete
idBase
[2650] Fix | Delete
} = props.attributes;
[2651] Fix | Delete
const isWide = (_wp$customize$Widgets = wide_widget_display_wp.customize.Widgets.data.availableWidgets.find(widget => widget.id_base === idBase)?.is_wide) !== null && _wp$customize$Widgets !== void 0 ? _wp$customize$Widgets : false;
[2652] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockEdit, {
[2653] Fix | Delete
...props,
[2654] Fix | Delete
isWide: isWide
[2655] Fix | Delete
});
[2656] Fix | Delete
}, 'withWideWidgetDisplay');
[2657] Fix | Delete
(0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/customize-widgets/wide-widget-display', withWideWidgetDisplay);
[2658] Fix | Delete
[2659] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/index.js
[2660] Fix | Delete
/**
[2661] Fix | Delete
* Internal dependencies
[2662] Fix | Delete
*/
[2663] Fix | Delete
[2664] Fix | Delete
[2665] Fix | Delete
[2666] Fix | Delete
[2667] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/index.js
[2668] Fix | Delete
/**
[2669] Fix | Delete
* WordPress dependencies
[2670] Fix | Delete
*/
[2671] Fix | Delete
[2672] Fix | Delete
[2673] Fix | Delete
[2674] Fix | Delete
[2675] Fix | Delete
[2676] Fix | Delete
[2677] Fix | Delete
[2678] Fix | Delete
/**
[2679] Fix | Delete
* Internal dependencies
[2680] Fix | Delete
*/
[2681] Fix | Delete
[2682] Fix | Delete
[2683] Fix | Delete
[2684] Fix | Delete
[2685] Fix | Delete
[2686] Fix | Delete
const {
[2687] Fix | Delete
wp: build_module_wp
[2688] Fix | Delete
} = window;
[2689] Fix | Delete
const DISABLED_BLOCKS = ['core/more', 'core/block', 'core/freeform', 'core/template-part'];
[2690] Fix | Delete
const ENABLE_EXPERIMENTAL_FSE_BLOCKS = false;
[2691] Fix | Delete
[2692] Fix | Delete
/**
[2693] Fix | Delete
* Initializes the widgets block editor in the customizer.
[2694] Fix | Delete
*
[2695] Fix | Delete
* @param {string} editorName The editor name.
[2696] Fix | Delete
* @param {Object} blockEditorSettings Block editor settings.
[2697] Fix | Delete
*/
[2698] Fix | Delete
function initialize(editorName, blockEditorSettings) {
[2699] Fix | Delete
(0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/customize-widgets', {
[2700] Fix | Delete
fixedToolbar: false,
[2701] Fix | Delete
welcomeGuide: true
[2702] Fix | Delete
});
[2703] Fix | Delete
(0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).reapplyBlockTypeFilters();
[2704] Fix | Delete
const coreBlocks = (0,external_wp_blockLibrary_namespaceObject.__experimentalGetCoreBlocks)().filter(block => {
[2705] Fix | Delete
return !(DISABLED_BLOCKS.includes(block.name) || block.name.startsWith('core/post') || block.name.startsWith('core/query') || block.name.startsWith('core/site') || block.name.startsWith('core/navigation'));
[2706] Fix | Delete
});
[2707] Fix | Delete
(0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)(coreBlocks);
[2708] Fix | Delete
(0,external_wp_widgets_namespaceObject.registerLegacyWidgetBlock)();
[2709] Fix | Delete
if (false) {}
[2710] Fix | Delete
(0,external_wp_widgets_namespaceObject.registerLegacyWidgetVariations)(blockEditorSettings);
[2711] Fix | Delete
(0,external_wp_widgets_namespaceObject.registerWidgetGroupBlock)();
[2712] Fix | Delete
[2713] Fix | Delete
// As we are unregistering `core/freeform` to avoid the Classic block, we must
[2714] Fix | Delete
// replace it with something as the default freeform content handler. Failure to
[2715] Fix | Delete
// do this will result in errors in the default block parser.
[2716] Fix | Delete
// see: https://github.com/WordPress/gutenberg/issues/33097
[2717] Fix | Delete
(0,external_wp_blocks_namespaceObject.setFreeformContentHandlerName)('core/html');
[2718] Fix | Delete
const SidebarControl = getSidebarControl(blockEditorSettings);
[2719] Fix | Delete
build_module_wp.customize.sectionConstructor.sidebar = getSidebarSection();
[2720] Fix | Delete
build_module_wp.customize.controlConstructor.sidebar_block_editor = SidebarControl;
[2721] Fix | Delete
const container = document.createElement('div');
[2722] Fix | Delete
document.body.appendChild(container);
[2723] Fix | Delete
build_module_wp.customize.bind('ready', () => {
[2724] Fix | Delete
const sidebarControls = [];
[2725] Fix | Delete
build_module_wp.customize.control.each(control => {
[2726] Fix | Delete
if (control instanceof SidebarControl) {
[2727] Fix | Delete
sidebarControls.push(control);
[2728] Fix | Delete
}
[2729] Fix | Delete
});
[2730] Fix | Delete
(0,external_wp_element_namespaceObject.createRoot)(container).render( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CustomizeWidgets, {
[2731] Fix | Delete
api: build_module_wp.customize,
[2732] Fix | Delete
sidebarControls: sidebarControls,
[2733] Fix | Delete
blockEditorSettings: blockEditorSettings
[2734] Fix | Delete
}));
[2735] Fix | Delete
});
[2736] Fix | Delete
}
[2737] Fix | Delete
[2738] Fix | Delete
[2739] Fix | Delete
})();
[2740] Fix | Delete
[2741] Fix | Delete
(window.wp = window.wp || {}).customizeWidgets = __webpack_exports__;
[2742] Fix | Delete
/******/ })()
[2743] Fix | Delete
;
[2744] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function