Quick Adsense Issue With the WordPress Business Directory Plugin

Over at My Gluten Free Girlfriend, we’ve been testing out the WordPress Business Directory Plugin. It seems to be doing a pretty good job overall, but we did run into a few things we didn’t like and changes need to be made.

We’ve been using the Quick Adsense Plugin for a while now and it does the job. When we viewed the Business Directory Listings  though, we noticed no ads were showing up. After digging around and experimenting a bit, I found the cause was the Business Directory Plugin.

On line 676 of wp-content/plugins/business-directory-plugin/wpbusdirman.php I found a handle_broken_filters() function. This function has a list (an array) of various plugins that are disabled when the directory loads.

In case you’re interested, those plugins include:

Note: I do not know why these plugins are removed and do not feel like creating a forum thread to ask (that’s the only support options available). All I know, is I need things to work and that’s what I do.

Removing the filter was easy enough, although it may not survive an upgrade and would need to be done again. On line 722 of the same file – wp-content/plugins/business-directory-plugin/wpbusdirman.php you will see the following line.

1
remove_filter( $filter, is_array( $callback_info ) ? $callback_info[0] : $callback_info, is_array( $callback_info ) ? $callback_info[1] : 10 );
remove_filter( $filter, is_array( $callback_info ) ? $callback_info[0] : $callback_info, is_array( $callback_info ) ? $callback_info[1] : 10 );

Commenting out this line so that it reads:

1
//remove_filter( $filter, is_array( $callback_info ) ? $callback_info[0] : $callback_info, is_array( $callback_info ) ? $callback_info[1] : 10 );
//remove_filter( $filter, is_array( $callback_info ) ? $callback_info[0] : $callback_info, is_array( $callback_info ) ? $callback_info[1] : 10 );

Will disable the filter, thus allowing all of the plugins to work. Whether or not this will cause issue, I do not know. In that list I only use Quick Adsense and, sometimes, Simple Facebook Connect. i have not yet noticed and issues with the directory with my configuration.

Updates

The author has been in contact, the communication is included below.

I’m the owner of BD. We specifically disable those plugins because they have been the cause of conflicts with BD in the past. They use unrecommended hook practices or use the WordPress API in ways that don’t play well with others. When we put something on that list, it’s because we’ve checked their plugin code and found it to be non-compliant with WordPress guidelines.
We wouldn’t disable them if we didn’t have to. By disabling those hooks, it allows BD to output its content properly and avoid the issues they cause. Just so you’re aware of why this was done.

To which I replied:

Hi Dave, thanks for commenting!

I did not see in the code any mention of what the issue is with each of the plug-ins, do you have that documented somewhere?

Interestingly, I was in contact with the author of Simple Facebook Connect a while back in this thread, where he stated:

This is an issue with those other plugins doing-it-wrong when modifying the content. SFC has to process the_content filter in order to build the metadata, and the other plugins are not using filters correctly.

This will not be fixed by SFC.

SFC is listed as having a conflict in your forums (http://businessdirectoryplugin.com/support-forum/faq/known-plugin-and-theme-conflicts/). Have any of the plug-in authors been in contact with each other to attempt to work out issues, or is filtering out plug-ins that do not work with yours just become the standard solution?

Thanks again for commenting, I look forward to hearing back.

About 

I'm Alan Cook and I am Southside Studios. Together with my girlfriend, Laurie, we run a network of websites, including managing the sites of several clients.

When we're not working, we are making a reality out of our full time RV nomad lifestyle.

Leave a Reply

Your email address will not be published. Required fields are marked *