Replace WP Rich Text package by our build with version 7.14.0
[MAILPOET-6387]
This commit is contained in:
committed by
Rostislav Wolný
parent
ea894e2917
commit
2f0cec5fde
@ -80,6 +80,19 @@ class EditorPageRenderer {
|
||||
$editorIntegrationAssetsParams['version']
|
||||
);
|
||||
|
||||
// Email editor rich text JS - Because we Personalization Tags depend on Gutenberg 19.8.0 and higher
|
||||
// the following code replaces used Rich Text for the version containing the necessary changes.
|
||||
$assetsParams = require Env::$assetsPath . '/dist/js/email-editor/rich-text.asset.php';
|
||||
$this->wp->wpDeregisterScript('wp-rich-text');
|
||||
$this->wp->wpEnqueueScript(
|
||||
'wp-rich-text',
|
||||
Env::$assetsUrl . '/dist/js/email-editor/rich-text.js',
|
||||
$assetsParams['dependencies'],
|
||||
$assetsParams['version'],
|
||||
true
|
||||
);
|
||||
// End of replacing Rich Text package.
|
||||
|
||||
$assetsParams = require Env::$assetsPath . '/dist/js/email-editor/email_editor.asset.php';
|
||||
|
||||
$this->wp->wpEnqueueScript(
|
||||
|
@ -529,6 +529,10 @@ class Functions {
|
||||
return wp_dequeue_script($handle);
|
||||
}
|
||||
|
||||
public function wpDeregisterScript($handle): void {
|
||||
wp_deregister_script($handle);
|
||||
}
|
||||
|
||||
public function wpDequeueStyle($handle) {
|
||||
return wp_dequeue_style($handle);
|
||||
}
|
||||
|
Reference in New Issue
Block a user