Yoast SEO: Developer Beta
Today we’re releasing a developer beta for the upcoming release of Yoast SEO for WordPress, containing the long anticipated real time content analysis functionality. The release is provisionally scheduled for november 2nd and will include native support for shortcodes. At the same time we had to break backwards compatibility for multiple filters. That means we really need your help in making sure your integrations will still work!
Check your integrations!
Developers of themes and plugins that integrate with Yoast SEO are strongly advised to carefully read this blogpost and install the beta to check for possible compatibility issues. The beta is functionally complete. We will do more fine-tuning on UX and design in the upcoming weeks, especially for the snippet preview.
Download the beta here (this beta is no longer available)
“Bad” news first: filters removed
Here is a list of the filters that have been removed:
wpseo_pre_analysis_post_content
wpseo_linkdex_results
wpseo_snippet
wpseo_metadesc_length
wpseo_body_length_score
The reason we’ve removed these filters is that we’ve completely moved all of the content analysis to the client side. Also, the analysis needs to happen in “real time” and as fast as possible. Therefore we cannot afford to take a trip down the server for every run of the content analyzer. Not only would that give a bad user experience, it would also be very hard to keep data consistent and reliable throughout the process of editing and optimizing the content.
The good news: a client side alternative
We have devised a JavaScript API for integrating with our content analysis tool. It’s very easy to create a small JavaScript plugin for our content analysis tool which registers modifications for the content that is analyzed. The way that works is very similar to the way WordPress filters and actions work. Here’s a little example of what such a plugin would look like:
[code lang=”javascript”]
ExamplePlugin = function() {
YoastSEO.app.registerPlugin( ‘examplePlugin’, {status: ‘ready’} );
/**
* @param modification {string} The name of the filter
* @param callable {function} The callable
* @param pluginName {string} The plugin that is registering the modification.
* @param priority {number} (optional) Used to specify the order in which the callables
* associated with a particular filter are called. Lower numbers
* correspond with earlier execution.
*/
YoastSEO.app.registerModification( ‘content’, this.myContentModification, ‘examplePlugin’, 5 );
}
/**
* Adds some text to the data…
*
* @param data The data to modify
*/
ExamplePlugin.prototype.myContentModification = function(data) {
return data + ‘ some text to add’;
};
new ExamplePlugin();
[/code]
More documentation on our API can be found here. Please bear in mind that the analysis needs to always be instant and therefore synchronous. Any data needed should therefore be preloaded or loaded in the background before applied in the analysis. In the docs you’ll find more info on how to do this properly.
More good news: native shortcode support
One of the common reasons to use the wpseo_pre_analysis_post_content
filter, was to add support for a certain shortcode. We’ve now added native shortcode support to the content analysis itself. All shortcodes in the content are parsed before the content is analyzed. This means that in most cases, things will still just work as expected and you don’t need to do anything.
So go on: install the beta (this beta is no longer available), test it and fix your integrations. We would also really love to hear your feedback! Tell us what you think in the comment section below. If you find bugs, please create an issue on GitHub.
Coming up next!
-
Event
WordCamp Netherlands 2024
November 29 - 30, 2024 Team Yoast is at Sponsoring WordCamp Netherlands 2024! Click through to see who will be there, what we will do, and more! See where you can find us next » -
SEO webinar
The SEO update by Yoast - October & November 2024 Edition
26 November 2024 Get expert analysis on the latest SEO news developments with Carolyn Shelby and Alex Moss. Join our upcoming update! ?️ All Yoast SEO webinars »