403Webshell
Server IP : 104.21.14.103  /  Your IP : 13.59.106.174
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/giankuin/www/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/settings/blocks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/giankuin/www/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/settings/blocks/feature-flags.js
/**
 * External dependencies
 */
import { registerBlockType } from '@wordpress/blocks';

/**
 * Internal dependencies
 */
import { WOOCOMMERCE_BLOCKS_PHASE } from './constants';

/**
 * Registers a new experimental block provided a unique name and an object defining its
 * behavior. Once registered, the block is made available as an option to any
 * editor interface where blocks are implemented.
 *
 * @param {string} name     Block name.
 * @param {Object} settings Block settings.
 *
 * @return {?Object} The block, if it has been successfully registered;
 *                    otherwise `undefined`.
 */
export const registerExperimentalBlockType = ( name, settings ) => {
	if ( WOOCOMMERCE_BLOCKS_PHASE > 2 ) {
		return registerBlockType( name, settings );
	}
};

/**
 * Registers a new feature plugin block provided a unique name and an object
 * defining its behavior. Once registered, the block is made available as an
 * option to any editor interface where blocks are implemented.
 *
 * @param {string} name     Block name.
 * @param {Object} settings Block settings.
 *
 * @return {?Object} The block, if it has been successfully registered;
 *                    otherwise `undefined`.
 */
export const registerFeaturePluginBlockType = ( name, settings ) => {
	if ( WOOCOMMERCE_BLOCKS_PHASE > 1 ) {
		return registerBlockType( name, settings );
	}
};

/**
 * Checks if we're executing the code in an experimental build mode.
 *
 * @return {boolean} True if this is an experimental build, false otherwise.
 */
export const isExperimentalBuild = () => WOOCOMMERCE_BLOCKS_PHASE > 2;

/**
 * Checks if we're executing the code in an feature plugin or experimental build mode.
 *
 * @return {boolean} True if this is an experimental or feature plugin build, false otherwise.
 */
export const isFeaturePluginBuild = () => WOOCOMMERCE_BLOCKS_PHASE > 1;

Youez - 2016 - github.com/yon3zu
LinuXploit