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: blocks.js
function filterElementBlockSupports(blockSupports, name, element) {
[9000] Fix | Delete
return blockSupports.filter(support => {
[9001] Fix | Delete
if (support === 'fontSize' && element === 'heading') {
[9002] Fix | Delete
return false;
[9003] Fix | Delete
}
[9004] Fix | Delete
[9005] Fix | Delete
// This is only available for links
[9006] Fix | Delete
if (support === 'textDecoration' && !name && element !== 'link') {
[9007] Fix | Delete
return false;
[9008] Fix | Delete
}
[9009] Fix | Delete
[9010] Fix | Delete
// This is only available for heading, button, caption and text
[9011] Fix | Delete
if (support === 'textTransform' && !name && !(['heading', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(element) || element === 'button' || element === 'caption' || element === 'text')) {
[9012] Fix | Delete
return false;
[9013] Fix | Delete
}
[9014] Fix | Delete
[9015] Fix | Delete
// This is only available for heading, button, caption and text
[9016] Fix | Delete
if (support === 'letterSpacing' && !name && !(['heading', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(element) || element === 'button' || element === 'caption' || element === 'text')) {
[9017] Fix | Delete
return false;
[9018] Fix | Delete
}
[9019] Fix | Delete
[9020] Fix | Delete
// Text columns is only available for blocks.
[9021] Fix | Delete
if (support === 'textColumns' && !name) {
[9022] Fix | Delete
return false;
[9023] Fix | Delete
}
[9024] Fix | Delete
return true;
[9025] Fix | Delete
});
[9026] Fix | Delete
}
[9027] Fix | Delete
[9028] Fix | Delete
/**
[9029] Fix | Delete
* Returns the list of supported styles for a given block name and element.
[9030] Fix | Delete
*/
[9031] Fix | Delete
const getSupportedStyles = (0,external_wp_data_namespaceObject.createSelector)((state, name, element) => {
[9032] Fix | Delete
if (!name) {
[9033] Fix | Delete
return filterElementBlockSupports(ROOT_BLOCK_SUPPORTS, name, element);
[9034] Fix | Delete
}
[9035] Fix | Delete
const blockType = selectors_getBlockType(state, name);
[9036] Fix | Delete
if (!blockType) {
[9037] Fix | Delete
return [];
[9038] Fix | Delete
}
[9039] Fix | Delete
const supportKeys = [];
[9040] Fix | Delete
[9041] Fix | Delete
// Check for blockGap support.
[9042] Fix | Delete
// Block spacing support doesn't map directly to a single style property, so needs to be handled separately.
[9043] Fix | Delete
if (blockType?.supports?.spacing?.blockGap) {
[9044] Fix | Delete
supportKeys.push('blockGap');
[9045] Fix | Delete
}
[9046] Fix | Delete
[9047] Fix | Delete
// check for shadow support
[9048] Fix | Delete
if (blockType?.supports?.shadow) {
[9049] Fix | Delete
supportKeys.push('shadow');
[9050] Fix | Delete
}
[9051] Fix | Delete
Object.keys(__EXPERIMENTAL_STYLE_PROPERTY).forEach(styleName => {
[9052] Fix | Delete
if (!__EXPERIMENTAL_STYLE_PROPERTY[styleName].support) {
[9053] Fix | Delete
return;
[9054] Fix | Delete
}
[9055] Fix | Delete
[9056] Fix | Delete
// Opting out means that, for certain support keys like background color,
[9057] Fix | Delete
// blocks have to explicitly set the support value false. If the key is
[9058] Fix | Delete
// unset, we still enable it.
[9059] Fix | Delete
if (__EXPERIMENTAL_STYLE_PROPERTY[styleName].requiresOptOut) {
[9060] Fix | Delete
if (__EXPERIMENTAL_STYLE_PROPERTY[styleName].support[0] in blockType.supports && getValueFromObjectPath(blockType.supports, __EXPERIMENTAL_STYLE_PROPERTY[styleName].support) !== false) {
[9061] Fix | Delete
supportKeys.push(styleName);
[9062] Fix | Delete
return;
[9063] Fix | Delete
}
[9064] Fix | Delete
}
[9065] Fix | Delete
if (getValueFromObjectPath(blockType.supports, __EXPERIMENTAL_STYLE_PROPERTY[styleName].support, false)) {
[9066] Fix | Delete
supportKeys.push(styleName);
[9067] Fix | Delete
}
[9068] Fix | Delete
});
[9069] Fix | Delete
return filterElementBlockSupports(supportKeys, name, element);
[9070] Fix | Delete
}, (state, name) => [state.blockTypes[name]]);
[9071] Fix | Delete
[9072] Fix | Delete
/**
[9073] Fix | Delete
* Returns the bootstrapped block type metadata for a give block name.
[9074] Fix | Delete
*
[9075] Fix | Delete
* @param {Object} state Data state.
[9076] Fix | Delete
* @param {string} name Block name.
[9077] Fix | Delete
*
[9078] Fix | Delete
* @return {Object} Bootstrapped block type metadata for a block.
[9079] Fix | Delete
*/
[9080] Fix | Delete
function getBootstrappedBlockType(state, name) {
[9081] Fix | Delete
return state.bootstrappedBlockTypes[name];
[9082] Fix | Delete
}
[9083] Fix | Delete
[9084] Fix | Delete
/**
[9085] Fix | Delete
* Returns all the unprocessed (before applying the `registerBlockType` filter)
[9086] Fix | Delete
* block type settings as passed during block registration.
[9087] Fix | Delete
*
[9088] Fix | Delete
* @param {Object} state Data state.
[9089] Fix | Delete
*
[9090] Fix | Delete
* @return {Array} Unprocessed block type settings for all blocks.
[9091] Fix | Delete
*/
[9092] Fix | Delete
function getUnprocessedBlockTypes(state) {
[9093] Fix | Delete
return state.unprocessedBlockTypes;
[9094] Fix | Delete
}
[9095] Fix | Delete
[9096] Fix | Delete
/**
[9097] Fix | Delete
* Returns all the block bindings sources registered.
[9098] Fix | Delete
*
[9099] Fix | Delete
* @param {Object} state Data state.
[9100] Fix | Delete
*
[9101] Fix | Delete
* @return {Object} All the registered sources and their properties.
[9102] Fix | Delete
*/
[9103] Fix | Delete
function getAllBlockBindingsSources(state) {
[9104] Fix | Delete
return state.blockBindingsSources;
[9105] Fix | Delete
}
[9106] Fix | Delete
[9107] Fix | Delete
/**
[9108] Fix | Delete
* Returns a specific block bindings source.
[9109] Fix | Delete
*
[9110] Fix | Delete
* @param {Object} state Data state.
[9111] Fix | Delete
* @param {string} sourceName Name of the source to get.
[9112] Fix | Delete
*
[9113] Fix | Delete
* @return {Object} The specific block binding source and its properties.
[9114] Fix | Delete
*/
[9115] Fix | Delete
function getBlockBindingsSource(state, sourceName) {
[9116] Fix | Delete
return state.blockBindingsSources[sourceName];
[9117] Fix | Delete
}
[9118] Fix | Delete
[9119] Fix | Delete
;// CONCATENATED MODULE: external ["wp","deprecated"]
[9120] Fix | Delete
const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
[9121] Fix | Delete
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
[9122] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/is-plain-object/dist/is-plain-object.mjs
[9123] Fix | Delete
/*!
[9124] Fix | Delete
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
[9125] Fix | Delete
*
[9126] Fix | Delete
* Copyright (c) 2014-2017, Jon Schlinkert.
[9127] Fix | Delete
* Released under the MIT License.
[9128] Fix | Delete
*/
[9129] Fix | Delete
[9130] Fix | Delete
function is_plain_object_isObject(o) {
[9131] Fix | Delete
return Object.prototype.toString.call(o) === '[object Object]';
[9132] Fix | Delete
}
[9133] Fix | Delete
[9134] Fix | Delete
function isPlainObject(o) {
[9135] Fix | Delete
var ctor,prot;
[9136] Fix | Delete
[9137] Fix | Delete
if (is_plain_object_isObject(o) === false) return false;
[9138] Fix | Delete
[9139] Fix | Delete
// If has modified constructor
[9140] Fix | Delete
ctor = o.constructor;
[9141] Fix | Delete
if (ctor === undefined) return true;
[9142] Fix | Delete
[9143] Fix | Delete
// If has modified prototype
[9144] Fix | Delete
prot = ctor.prototype;
[9145] Fix | Delete
if (is_plain_object_isObject(prot) === false) return false;
[9146] Fix | Delete
[9147] Fix | Delete
// If constructor does not have an Object-specific method
[9148] Fix | Delete
if (prot.hasOwnProperty('isPrototypeOf') === false) {
[9149] Fix | Delete
return false;
[9150] Fix | Delete
}
[9151] Fix | Delete
[9152] Fix | Delete
// Most likely a plain Object
[9153] Fix | Delete
return true;
[9154] Fix | Delete
}
[9155] Fix | Delete
[9156] Fix | Delete
[9157] Fix | Delete
[9158] Fix | Delete
// EXTERNAL MODULE: ./node_modules/react-is/index.js
[9159] Fix | Delete
var react_is = __webpack_require__(8529);
[9160] Fix | Delete
;// CONCATENATED MODULE: external ["wp","hooks"]
[9161] Fix | Delete
const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
[9162] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/process-block-type.js
[9163] Fix | Delete
/**
[9164] Fix | Delete
* External dependencies
[9165] Fix | Delete
*/
[9166] Fix | Delete
[9167] Fix | Delete
[9168] Fix | Delete
[9169] Fix | Delete
/**
[9170] Fix | Delete
* WordPress dependencies
[9171] Fix | Delete
*/
[9172] Fix | Delete
[9173] Fix | Delete
[9174] Fix | Delete
[9175] Fix | Delete
/**
[9176] Fix | Delete
* Internal dependencies
[9177] Fix | Delete
*/
[9178] Fix | Delete
[9179] Fix | Delete
[9180] Fix | Delete
[9181] Fix | Delete
/** @typedef {import('../api/registration').WPBlockType} WPBlockType */
[9182] Fix | Delete
[9183] Fix | Delete
const error = (...args) => window?.console?.error?.(...args);
[9184] Fix | Delete
const warn = (...args) => window?.console?.warn?.(...args);
[9185] Fix | Delete
[9186] Fix | Delete
/**
[9187] Fix | Delete
* Mapping of legacy category slugs to their latest normal values, used to
[9188] Fix | Delete
* accommodate updates of the default set of block categories.
[9189] Fix | Delete
*
[9190] Fix | Delete
* @type {Record<string,string>}
[9191] Fix | Delete
*/
[9192] Fix | Delete
const LEGACY_CATEGORY_MAPPING = {
[9193] Fix | Delete
common: 'text',
[9194] Fix | Delete
formatting: 'text',
[9195] Fix | Delete
layout: 'design'
[9196] Fix | Delete
};
[9197] Fix | Delete
[9198] Fix | Delete
/**
[9199] Fix | Delete
* Merge block variations bootstrapped from the server and client.
[9200] Fix | Delete
*
[9201] Fix | Delete
* When a variation is registered in both places, its properties are merged.
[9202] Fix | Delete
*
[9203] Fix | Delete
* @param {Array} bootstrappedVariations - A block type variations from the server.
[9204] Fix | Delete
* @param {Array} clientVariations - A block type variations from the client.
[9205] Fix | Delete
* @return {Array} The merged array of block variations.
[9206] Fix | Delete
*/
[9207] Fix | Delete
function mergeBlockVariations(bootstrappedVariations = [], clientVariations = []) {
[9208] Fix | Delete
const result = [...bootstrappedVariations];
[9209] Fix | Delete
clientVariations.forEach(clientVariation => {
[9210] Fix | Delete
const index = result.findIndex(bootstrappedVariation => bootstrappedVariation.name === clientVariation.name);
[9211] Fix | Delete
if (index !== -1) {
[9212] Fix | Delete
result[index] = {
[9213] Fix | Delete
...result[index],
[9214] Fix | Delete
...clientVariation
[9215] Fix | Delete
};
[9216] Fix | Delete
} else {
[9217] Fix | Delete
result.push(clientVariation);
[9218] Fix | Delete
}
[9219] Fix | Delete
});
[9220] Fix | Delete
return result;
[9221] Fix | Delete
}
[9222] Fix | Delete
[9223] Fix | Delete
/**
[9224] Fix | Delete
* Takes the unprocessed block type settings, merges them with block type metadata
[9225] Fix | Delete
* and applies all the existing filters for the registered block type.
[9226] Fix | Delete
* Next, it validates all the settings and performs additional processing to the block type definition.
[9227] Fix | Delete
*
[9228] Fix | Delete
* @param {string} name Block name.
[9229] Fix | Delete
* @param {WPBlockType} blockSettings Unprocessed block type settings.
[9230] Fix | Delete
*
[9231] Fix | Delete
* @return {WPBlockType | undefined} The block, if it has been processed and can be registered; otherwise `undefined`.
[9232] Fix | Delete
*/
[9233] Fix | Delete
const processBlockType = (name, blockSettings) => ({
[9234] Fix | Delete
select
[9235] Fix | Delete
}) => {
[9236] Fix | Delete
const bootstrappedBlockType = select.getBootstrappedBlockType(name);
[9237] Fix | Delete
const blockType = {
[9238] Fix | Delete
name,
[9239] Fix | Delete
icon: BLOCK_ICON_DEFAULT,
[9240] Fix | Delete
keywords: [],
[9241] Fix | Delete
attributes: {},
[9242] Fix | Delete
providesContext: {},
[9243] Fix | Delete
usesContext: [],
[9244] Fix | Delete
selectors: {},
[9245] Fix | Delete
supports: {},
[9246] Fix | Delete
styles: [],
[9247] Fix | Delete
blockHooks: {},
[9248] Fix | Delete
save: () => null,
[9249] Fix | Delete
...bootstrappedBlockType,
[9250] Fix | Delete
...blockSettings,
[9251] Fix | Delete
variations: mergeBlockVariations(bootstrappedBlockType?.variations, blockSettings?.variations)
[9252] Fix | Delete
};
[9253] Fix | Delete
const settings = (0,external_wp_hooks_namespaceObject.applyFilters)('blocks.registerBlockType', blockType, name, null);
[9254] Fix | Delete
if (settings.description && typeof settings.description !== 'string') {
[9255] Fix | Delete
external_wp_deprecated_default()('Declaring non-string block descriptions', {
[9256] Fix | Delete
since: '6.2'
[9257] Fix | Delete
});
[9258] Fix | Delete
}
[9259] Fix | Delete
if (settings.deprecated) {
[9260] Fix | Delete
settings.deprecated = settings.deprecated.map(deprecation => Object.fromEntries(Object.entries(
[9261] Fix | Delete
// Only keep valid deprecation keys.
[9262] Fix | Delete
(0,external_wp_hooks_namespaceObject.applyFilters)('blocks.registerBlockType',
[9263] Fix | Delete
// Merge deprecation keys with pre-filter settings
[9264] Fix | Delete
// so that filters that depend on specific keys being
[9265] Fix | Delete
// present don't fail.
[9266] Fix | Delete
{
[9267] Fix | Delete
// Omit deprecation keys here so that deprecations
[9268] Fix | Delete
// can opt out of specific keys like "supports".
[9269] Fix | Delete
...omit(blockType, DEPRECATED_ENTRY_KEYS),
[9270] Fix | Delete
...deprecation
[9271] Fix | Delete
}, blockType.name, deprecation)).filter(([key]) => DEPRECATED_ENTRY_KEYS.includes(key))));
[9272] Fix | Delete
}
[9273] Fix | Delete
if (!isPlainObject(settings)) {
[9274] Fix | Delete
error('Block settings must be a valid object.');
[9275] Fix | Delete
return;
[9276] Fix | Delete
}
[9277] Fix | Delete
if (typeof settings.save !== 'function') {
[9278] Fix | Delete
error('The "save" property must be a valid function.');
[9279] Fix | Delete
return;
[9280] Fix | Delete
}
[9281] Fix | Delete
if ('edit' in settings && !(0,react_is.isValidElementType)(settings.edit)) {
[9282] Fix | Delete
error('The "edit" property must be a valid component.');
[9283] Fix | Delete
return;
[9284] Fix | Delete
}
[9285] Fix | Delete
[9286] Fix | Delete
// Canonicalize legacy categories to equivalent fallback.
[9287] Fix | Delete
if (LEGACY_CATEGORY_MAPPING.hasOwnProperty(settings.category)) {
[9288] Fix | Delete
settings.category = LEGACY_CATEGORY_MAPPING[settings.category];
[9289] Fix | Delete
}
[9290] Fix | Delete
if ('category' in settings && !select.getCategories().some(({
[9291] Fix | Delete
slug
[9292] Fix | Delete
}) => slug === settings.category)) {
[9293] Fix | Delete
warn('The block "' + name + '" is registered with an invalid category "' + settings.category + '".');
[9294] Fix | Delete
delete settings.category;
[9295] Fix | Delete
}
[9296] Fix | Delete
if (!('title' in settings) || settings.title === '') {
[9297] Fix | Delete
error('The block "' + name + '" must have a title.');
[9298] Fix | Delete
return;
[9299] Fix | Delete
}
[9300] Fix | Delete
if (typeof settings.title !== 'string') {
[9301] Fix | Delete
error('Block titles must be strings.');
[9302] Fix | Delete
return;
[9303] Fix | Delete
}
[9304] Fix | Delete
settings.icon = normalizeIconObject(settings.icon);
[9305] Fix | Delete
if (!isValidIcon(settings.icon.src)) {
[9306] Fix | Delete
error('The icon passed is invalid. ' + 'The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional');
[9307] Fix | Delete
return;
[9308] Fix | Delete
}
[9309] Fix | Delete
return settings;
[9310] Fix | Delete
};
[9311] Fix | Delete
[9312] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/actions.js
[9313] Fix | Delete
/**
[9314] Fix | Delete
* WordPress dependencies
[9315] Fix | Delete
*/
[9316] Fix | Delete
[9317] Fix | Delete
[9318] Fix | Delete
/**
[9319] Fix | Delete
* Internal dependencies
[9320] Fix | Delete
*/
[9321] Fix | Delete
[9322] Fix | Delete
[9323] Fix | Delete
/** @typedef {import('../api/registration').WPBlockVariation} WPBlockVariation */
[9324] Fix | Delete
/** @typedef {import('../api/registration').WPBlockType} WPBlockType */
[9325] Fix | Delete
/** @typedef {import('./reducer').WPBlockCategory} WPBlockCategory */
[9326] Fix | Delete
[9327] Fix | Delete
/**
[9328] Fix | Delete
* Returns an action object used in signalling that block types have been added.
[9329] Fix | Delete
* Ignored from documentation as the recommended usage for this action through registerBlockType from @wordpress/blocks.
[9330] Fix | Delete
*
[9331] Fix | Delete
* @ignore
[9332] Fix | Delete
*
[9333] Fix | Delete
* @param {WPBlockType|WPBlockType[]} blockTypes Object or array of objects representing blocks to added.
[9334] Fix | Delete
*
[9335] Fix | Delete
*
[9336] Fix | Delete
* @return {Object} Action object.
[9337] Fix | Delete
*/
[9338] Fix | Delete
function addBlockTypes(blockTypes) {
[9339] Fix | Delete
return {
[9340] Fix | Delete
type: 'ADD_BLOCK_TYPES',
[9341] Fix | Delete
blockTypes: Array.isArray(blockTypes) ? blockTypes : [blockTypes]
[9342] Fix | Delete
};
[9343] Fix | Delete
}
[9344] Fix | Delete
[9345] Fix | Delete
/**
[9346] Fix | Delete
* Signals that all block types should be computed again.
[9347] Fix | Delete
* It uses stored unprocessed block types and all the most recent list of registered filters.
[9348] Fix | Delete
*
[9349] Fix | Delete
* It addresses the issue where third party block filters get registered after third party blocks. A sample sequence:
[9350] Fix | Delete
* 1. Filter A.
[9351] Fix | Delete
* 2. Block B.
[9352] Fix | Delete
* 3. Block C.
[9353] Fix | Delete
* 4. Filter D.
[9354] Fix | Delete
* 5. Filter E.
[9355] Fix | Delete
* 6. Block F.
[9356] Fix | Delete
* 7. Filter G.
[9357] Fix | Delete
* In this scenario some filters would not get applied for all blocks because they are registered too late.
[9358] Fix | Delete
*/
[9359] Fix | Delete
function reapplyBlockTypeFilters() {
[9360] Fix | Delete
return ({
[9361] Fix | Delete
dispatch,
[9362] Fix | Delete
select
[9363] Fix | Delete
}) => {
[9364] Fix | Delete
const processedBlockTypes = [];
[9365] Fix | Delete
for (const [name, settings] of Object.entries(select.getUnprocessedBlockTypes())) {
[9366] Fix | Delete
const result = dispatch(processBlockType(name, settings));
[9367] Fix | Delete
if (result) {
[9368] Fix | Delete
processedBlockTypes.push(result);
[9369] Fix | Delete
}
[9370] Fix | Delete
}
[9371] Fix | Delete
if (!processedBlockTypes.length) {
[9372] Fix | Delete
return;
[9373] Fix | Delete
}
[9374] Fix | Delete
dispatch.addBlockTypes(processedBlockTypes);
[9375] Fix | Delete
};
[9376] Fix | Delete
}
[9377] Fix | Delete
function __experimentalReapplyBlockFilters() {
[9378] Fix | Delete
external_wp_deprecated_default()('wp.data.dispatch( "core/blocks" ).__experimentalReapplyBlockFilters', {
[9379] Fix | Delete
since: '6.4',
[9380] Fix | Delete
alternative: 'reapplyBlockFilters'
[9381] Fix | Delete
});
[9382] Fix | Delete
return reapplyBlockTypeFilters();
[9383] Fix | Delete
}
[9384] Fix | Delete
[9385] Fix | Delete
/**
[9386] Fix | Delete
* Returns an action object used to remove a registered block type.
[9387] Fix | Delete
* Ignored from documentation as the recommended usage for this action through unregisterBlockType from @wordpress/blocks.
[9388] Fix | Delete
*
[9389] Fix | Delete
* @ignore
[9390] Fix | Delete
*
[9391] Fix | Delete
* @param {string|string[]} names Block name or array of block names to be removed.
[9392] Fix | Delete
*
[9393] Fix | Delete
*
[9394] Fix | Delete
* @return {Object} Action object.
[9395] Fix | Delete
*/
[9396] Fix | Delete
function removeBlockTypes(names) {
[9397] Fix | Delete
return {
[9398] Fix | Delete
type: 'REMOVE_BLOCK_TYPES',
[9399] Fix | Delete
names: Array.isArray(names) ? names : [names]
[9400] Fix | Delete
};
[9401] Fix | Delete
}
[9402] Fix | Delete
[9403] Fix | Delete
/**
[9404] Fix | Delete
* Returns an action object used in signalling that new block styles have been added.
[9405] Fix | Delete
* Ignored from documentation as the recommended usage for this action through registerBlockStyle from @wordpress/blocks.
[9406] Fix | Delete
*
[9407] Fix | Delete
* @param {string|Array} blockNames Block names to register new styles for.
[9408] Fix | Delete
* @param {Array|Object} styles Block style object or array of block style objects.
[9409] Fix | Delete
*
[9410] Fix | Delete
* @ignore
[9411] Fix | Delete
*
[9412] Fix | Delete
* @return {Object} Action object.
[9413] Fix | Delete
*/
[9414] Fix | Delete
function addBlockStyles(blockNames, styles) {
[9415] Fix | Delete
return {
[9416] Fix | Delete
type: 'ADD_BLOCK_STYLES',
[9417] Fix | Delete
styles: Array.isArray(styles) ? styles : [styles],
[9418] Fix | Delete
blockNames: Array.isArray(blockNames) ? blockNames : [blockNames]
[9419] Fix | Delete
};
[9420] Fix | Delete
}
[9421] Fix | Delete
[9422] Fix | Delete
/**
[9423] Fix | Delete
* Returns an action object used in signalling that block styles have been removed.
[9424] Fix | Delete
* Ignored from documentation as the recommended usage for this action through unregisterBlockStyle from @wordpress/blocks.
[9425] Fix | Delete
*
[9426] Fix | Delete
* @ignore
[9427] Fix | Delete
*
[9428] Fix | Delete
* @param {string} blockName Block name.
[9429] Fix | Delete
* @param {Array|string} styleNames Block style names or array of block style names.
[9430] Fix | Delete
*
[9431] Fix | Delete
* @return {Object} Action object.
[9432] Fix | Delete
*/
[9433] Fix | Delete
function removeBlockStyles(blockName, styleNames) {
[9434] Fix | Delete
return {
[9435] Fix | Delete
type: 'REMOVE_BLOCK_STYLES',
[9436] Fix | Delete
styleNames: Array.isArray(styleNames) ? styleNames : [styleNames],
[9437] Fix | Delete
blockName
[9438] Fix | Delete
};
[9439] Fix | Delete
}
[9440] Fix | Delete
[9441] Fix | Delete
/**
[9442] Fix | Delete
* Returns an action object used in signalling that new block variations have been added.
[9443] Fix | Delete
* Ignored from documentation as the recommended usage for this action through registerBlockVariation from @wordpress/blocks.
[9444] Fix | Delete
*
[9445] Fix | Delete
* @ignore
[9446] Fix | Delete
*
[9447] Fix | Delete
* @param {string} blockName Block name.
[9448] Fix | Delete
* @param {WPBlockVariation|WPBlockVariation[]} variations Block variations.
[9449] Fix | Delete
*
[9450] Fix | Delete
* @return {Object} Action object.
[9451] Fix | Delete
*/
[9452] Fix | Delete
function addBlockVariations(blockName, variations) {
[9453] Fix | Delete
return {
[9454] Fix | Delete
type: 'ADD_BLOCK_VARIATIONS',
[9455] Fix | Delete
variations: Array.isArray(variations) ? variations : [variations],
[9456] Fix | Delete
blockName
[9457] Fix | Delete
};
[9458] Fix | Delete
}
[9459] Fix | Delete
[9460] Fix | Delete
/**
[9461] Fix | Delete
* Returns an action object used in signalling that block variations have been removed.
[9462] Fix | Delete
* Ignored from documentation as the recommended usage for this action through unregisterBlockVariation from @wordpress/blocks.
[9463] Fix | Delete
*
[9464] Fix | Delete
* @ignore
[9465] Fix | Delete
*
[9466] Fix | Delete
* @param {string} blockName Block name.
[9467] Fix | Delete
* @param {string|string[]} variationNames Block variation names.
[9468] Fix | Delete
*
[9469] Fix | Delete
* @return {Object} Action object.
[9470] Fix | Delete
*/
[9471] Fix | Delete
function removeBlockVariations(blockName, variationNames) {
[9472] Fix | Delete
return {
[9473] Fix | Delete
type: 'REMOVE_BLOCK_VARIATIONS',
[9474] Fix | Delete
variationNames: Array.isArray(variationNames) ? variationNames : [variationNames],
[9475] Fix | Delete
blockName
[9476] Fix | Delete
};
[9477] Fix | Delete
}
[9478] Fix | Delete
[9479] Fix | Delete
/**
[9480] Fix | Delete
* Returns an action object used to set the default block name.
[9481] Fix | Delete
* Ignored from documentation as the recommended usage for this action through setDefaultBlockName from @wordpress/blocks.
[9482] Fix | Delete
*
[9483] Fix | Delete
* @ignore
[9484] Fix | Delete
*
[9485] Fix | Delete
* @param {string} name Block name.
[9486] Fix | Delete
*
[9487] Fix | Delete
* @return {Object} Action object.
[9488] Fix | Delete
*/
[9489] Fix | Delete
function actions_setDefaultBlockName(name) {
[9490] Fix | Delete
return {
[9491] Fix | Delete
type: 'SET_DEFAULT_BLOCK_NAME',
[9492] Fix | Delete
name
[9493] Fix | Delete
};
[9494] Fix | Delete
}
[9495] Fix | Delete
[9496] Fix | Delete
/**
[9497] Fix | Delete
* Returns an action object used to set the name of the block used as a fallback
[9498] Fix | Delete
* for non-block content.
[9499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function