Title: [Plugin: Flexo Archives Widget] default sql query filters
Last modified: August 19, 2016

---

# [Plugin: Flexo Archives Widget] default sql query filters

 *  Resolved [Christian Feldbauer](https://wordpress.org/support/users/christian_feldbauer/)
 * (@christian_feldbauer)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-flexo-archives-widget-default-sql-query-filters/)
 * Hi Heath,
    Great plugin, nice work. There are some issues though. I discovered
   that you don’t allow any sql query filters (‘getarchives_where’ and ‘getarchives_join’)
   which may break other plugins (in my case it is WPML for multi-lingual support).
 * Maybe you could add those filters in an upcoming release.
 * Cheers,
    Christian
 * [http://wordpress.org/extend/plugins/flexo-archives-widget/](http://wordpress.org/extend/plugins/flexo-archives-widget/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Heath Harrelson](https://wordpress.org/support/users/heathharrelson/)
 * (@heathharrelson)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-flexo-archives-widget-default-sql-query-filters/#post-1913601)
 * To save me from rummaging around in the source code for hours, can you explain
   why exactly I need to support these things and how not supporting them might 
   break other plugins? I don’t understand how my code could get called from anywhere
   else within WordPress.
 *  Thread Starter [Christian Feldbauer](https://wordpress.org/support/users/christian_feldbauer/)
 * (@christian_feldbauer)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-flexo-archives-widget-default-sql-query-filters/#post-1913602)
 * Hi Heath,
    Most plugins rely on WordPress’ action hooks and filters in order 
   to extend its features. The default archive widget uses those filters I have 
   mentioned above (it calls ‘apply_filters(‘filter_name’,…)’). As an example, the
   multi-lingual plugin ‘WPML’ needs those to get posts only of the active language(
   and not all languages) by joining its own SQL table for the db query.
 * >> …why exactly I need to support these things…?
 * You don’t need to. Since you share your code I assume you’d like other people
   to use it. By writing it in a way to play along with other plugins, more people
   may use it. I find your plugin great.
 * cheers,
    Christian
 *  Plugin Author [Heath Harrelson](https://wordpress.org/support/users/heathharrelson/)
 * (@heathharrelson)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-flexo-archives-widget-default-sql-query-filters/#post-1913604)
 * I wasn’t trying to be rude above. I want people to be able to use my software,
   but I only have limited time and knowledge. If you could give me a concrete example
   of how my plugin interferes with WPML, I would be happy to fix it.
 *  Thread Starter [Christian Feldbauer](https://wordpress.org/support/users/christian_feldbauer/)
 * (@christian_feldbauer)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-flexo-archives-widget-default-sql-query-filters/#post-1913606)
 * sure. try to build your query string similar as in the default widget (see wp-
   includes/general-template.php, function wp_get_archives() ).
 * use extra $join and $where variables and use
    $join = apply_filters(‘getarchives_join’,…)
   and $where = apply_filters(‘getarchives_where’, …) to build them. Then concatenate
   them properly before making the sql request. In this way also other plugins can
   hook in should be able to play along. Does this help you?
 * cheers,
    Christian
 *  Plugin Author [Heath Harrelson](https://wordpress.org/support/users/heathharrelson/)
 * (@heathharrelson)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-flexo-archives-widget-default-sql-query-filters/#post-1913610)
 * I see now. I’ll work up a fix tonight and include it in the next release.
 * Thanks for your help.
 *  Plugin Author [Heath Harrelson](https://wordpress.org/support/users/heathharrelson/)
 * (@heathharrelson)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-flexo-archives-widget-default-sql-query-filters/#post-1913618)
 * I have added these filters in version 2.1.0.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘[Plugin: Flexo Archives Widget] default sql query filters’ is closed 
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/flexo-archives-widget.svg)
 * [Flexo Archives](https://wordpress.org/plugins/flexo-archives-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/flexo-archives-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/flexo-archives-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/flexo-archives-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flexo-archives-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flexo-archives-widget/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Heath Harrelson](https://wordpress.org/support/users/heathharrelson/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-flexo-archives-widget-default-sql-query-filters/#post-1913618)
 * Status: resolved