woocommerce/plugins/woocommerce-admin/bin/modified-editsite-lock-unlo...

24 lines
799 B
JavaScript

/**
* WordPress dependencies
*/
import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';
let consentString =
'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.';
if ( window.wcSettings && window.wcSettings.wpVersion ) {
// Parse the version string as a floating-point number
const wpVersion = parseFloat( window.wcSettings.wpVersion );
if ( ! isNaN( wpVersion ) && wpVersion >= 6.4 ) {
consentString =
'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.';
}
}
export const { lock, unlock } =
__dangerousOptInToUnstableAPIsOnlyForCoreModules(
consentString,
'@wordpress/edit-site'
);
//# sourceMappingURL=lock-unlock.js.map