2023-10-19 21:52:01 +00:00
|
|
|
/**
|
|
|
|
* WordPress dependencies
|
|
|
|
*/
|
|
|
|
var consentString = 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.';
|
2023-10-20 00:14:40 +00:00
|
|
|
|
|
|
|
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 ) {
|
2023-10-19 21:52:01 +00:00
|
|
|
consentString = 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.';
|
2023-10-20 00:14:40 +00:00
|
|
|
}
|
|
|
|
}
|
2023-10-19 21:52:01 +00:00
|
|
|
|
|
|
|
import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';
|
|
|
|
export const {
|
|
|
|
lock,
|
|
|
|
unlock
|
|
|
|
} = __dangerousOptInToUnstableAPIsOnlyForCoreModules(consentString, '@wordpress/edit-site');
|
|
|
|
//# sourceMappingURL=lock-unlock.js.map
|