Comment on Display Widgets SEO Plus Plugin by SEO Dave.
For the record up until a few days ago (early November 2016) I’d not used the WPML language plugin: I can barely understand my native language (English), so don’t have multiple language sites :-) Since I wanted to conserve as many of the Display Widget version 2.05 features I downloaded a nulled version of the WPML language plugin version 3.5.1.1 (current version is 3.5.3.1) for localhost testing.
So consider I’ve not rigorously tested the WPML language plugin features under multiple environments : I develop WordPress Plugins/Themes in the latest version of WordPress (version 4.6.1 currently) in a localhost environment running PHP 7.0.11 (one of the latest PHP versions). Before public release I also do basic localhost testing in PHP versions PHP 5.3, PHP 5.4 and PHP 5.6.
I then test on live servers with real domains: this is where it tends to go wrong if it’s going to go wrong :-) Since I don’t have any domains running the WPML language plugin my testing is going to be on the minimal side: I’ve started the process of setting up a WPML demo site under the WPML Go-Global Program, so should have a WPML language test site soon. If the Widget Display SEO Plus plugin doesn’t work with WPML exactly how it does for me in localhost you know why. If something doesn’t work I’ll need as much detail as possible, I’m not an expert user of WPML, so not sure how users use it in the real world.
In my WPML testing I did notice a few quirks related to the WPML plugin. For example the WPML language categories were not available in the “Categories +/-” section, so they can’t be selected: not ideal, meant widgets couldn’t be filtered via specific language categories! The issue was WPML hooks into the WordPress core get_categories() function and excludes categories not in the default language. There’s a WPML remove_filter for “terms_clauses”, so when the WPML plugin is active, the Display Widgets SEO Plus Plugin has to remove the filter, run the get_categories() function, re-add the filter:
if ( class_exists( 'SitePress' ) ) {
if ( empty( $this->cats ) ) {
global $sitepress;
remove_filter( 'terms_clauses', array( $sitepress, 'terms_clauses' ) );
$this->cats = get_categories( array(
'hide_empty' => false,
) );
add_filter( 'terms_clauses', array( $sitepress, 'terms_clauses' ) );
}
} else {
if ( empty( $this->cats ) ) {
$this->cats = get_categories( array(
'hide_empty' => false,
) );
}
}
During my tests this works most of the time, but occasionally the language categories aren’t available (don’t know why). Also couldn’t get it to work with WordPress transients, transients are a way to temporarily cache the output of “expensive” functions like get_categories() which don’t change very often.
I expect there’s going to be other quirks with WPML, this is to be expected with highly customized uses of WordPress: WordPress wasn’t designed to work the way the WPML plugin organizes categories etc…
David Law
More Comments by SEO Dave
Display Widgets WordPress SEO Plugin
Future Display Widgets Plugin Development
I’ve updated the main article with new information, also pasted below:
Because of the hacking mess related to the Display Widgets Plugin v2.6.* (see my Display Widgets Plugin Review) I’m developing/supporting two Display Widgets Plugins:
Display Widgets Plugin v4.* (free) – security …
Continue Reading Display Widgets WordPress Plugin
Display Widgets WordPress SEO Plugin
Display Widgets WordPress SEO Plugin v3.0.0 is Still Safe to Use
I removed it (and my other plugins) from the WordPress plugin repository as I was moderated for asking a valid question about what the Display Widgets plugin developer (the developer of another plugin which he’d recently purchased) was doing with …
Continue Reading Display Widgets WordPress Plugin
Display Widgets WordPress SEO Plugin
WPML Plugin Widget Logic Bug Fix
In the first release of the Display Widgets SEO Plus Plugin (v1.0.0) there was an issue with the WPML Plugin Widget Logic support (was a code bug).
The WPML plugin overrides the default WordPress get_categories() function (and other functions) so when …
Continue Reading Display Widgets WordPress Plugin
Display Widgets WordPress SEO Plugin
WordPress bbPress and BuddyPress Widget Logic Support
In the Display Widgets SEO Plus Plugin update version 1.1.0 (release is imminent) I’ve added bbPress plugin and BuddyPress plugin widget logic support.
Also fixed a couple of code bugs in the “All Archives…) settings under “Content Types +/-” (those option …
Continue Reading Display Widgets WordPress Plugin