You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just discovered this issue this morning and from the Yoast documentation have put this together which I've put in admin.js instead of the content recommend by this plugin. You can actually just enqueue some admin Javascript yourself and remove the plugin completely with this solution.
This code is my fix. Please note that I give every Carbon Field Gutenberg block wrapper a class of .cf-blocks which is what I've used to grab all the content and feed it into Yoast.
`/* global YoastSEO */
class MyCustomDataPlugin {
constructor() {
// Ensure YoastSEO.js is present and can access the necessary features.
if (
typeof YoastSEO === "undefined" ||
typeof YoastSEO.analysis === "undefined" ||
typeof YoastSEO.analysis.worker === "undefined"
) {
return;
}
// Ensure that the additional data is being seen as a modification to the content.
YoastSEO.app.registerModification(
"content",
callback,
"MyCustomDataPlugin",
10,
);
}
/**
Adds to the content to be analyzed by the analyzer.
No errors in console connected with it
The text was updated successfully, but these errors were encountered: