]*\bclass=("|\')[^"\']*\bwpwand-mce-loading\b[^"\']*\1[^>]*>.*?

\s*#is', '', $content ); return is_string($cleaned) ? $cleaned : $content; } public function disable_legacy(): void { remove_action('admin_head', 'wpwand_ai_buttons'); } /** * @param array $plugins * @return array */ public function register_plugin(array $plugins): array { if (is_readable(WPWAND_NEW_DIR . 'build/classic.js')) { $plugins['wpwandeditor'] = WPWAND_NEW_URL . 'build/classic.js?ver=' . $this->version(); } return $plugins; } /** * @param string[] $buttons * @return string[] */ public function register_button(array $buttons): array { $buttons[] = 'wpwandeditor'; return $buttons; } public function print_config(): void { if (!current_user_can('edit_posts')) { return; } $data = [ 'root' => esc_url_raw(rest_url()), 'nonce' => wp_create_nonce('wp_rest'), 'prompts' => EditorPrompts::all(), 'brand' => Brand::resolve(), 'upgrade' => 'https://wpwand.com/pro-plugin', ]; echo ''; // The Pro pill and the menu width used to be printed here as a