Title: date_query enabler
Author: arikogan
Published: <strong>Ẹrẹ́nà 1, 2016</strong>
Last modified: Èrèlé  28, 2016

---

Ṣàwárí àwọn plugin

Plugin yìí **kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress**.
Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu
nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

![](https://s.w.org/plugins/geopattern-icon/date-query-enabler.svg)

# date_query enabler

 Láti ọwọ́ [arikogan](https://profiles.wordpress.org/arikogan/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/date-query-enabler.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/date-query-enabler/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/date-query-enabler/#reviews)
 *  [Ìgbéwọlẹ̀](https://yor.wordpress.org/plugins/date-query-enabler/#installation)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/date-query-enabler/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/date-query-enabler/)

## Àpèjúwe

[WP REST API](http://v2.wp-api.org/) plugin provides the ability to interact with
a WordPress installation through a REST API. When retrieving posts, a use case would
be to filter them based on they publish date by before/after a certain date. In 
WordPress this can be achieved using the [date_query](https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters)
parameter. However, the parameter is not part of the whitelisted parameters of WP
REST API. A workaround is to add it ourselves as discussed [here](https://github.com/WP-API/WP-API/issues/389).
This plugin adds the date_query param to the whitelist not modifying the theme of
WordPress but by using a very small and simple plugin. This allows to change and
upgrade themes freely and still keep the whitelisting of the parameter.

After installing WP REST API and this plugin, you should be able to run queries 
like the below,

    ```
    /wp-json/wp/v2/posts?filter[date_query][after]=2016-02-26T12:38:36
    /wp-json/wp/v2/posts?filter[date_query][before]=2016-02-27T14:28:15
    ```

## Ìgbéwọlẹ̀

 1. Upload the plugin files to the `/wp-content/plugins/date_query` directory, or install
    the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress

## Àwọn àgbéyẹ̀wò

![](https://secure.gravatar.com/avatar/0dbd5f9c2161eb9f3b830ee8db4cbf3398ecaaface509004fe2f7a98e0e109c6?
s=60&d=retro&r=g)

### 󠀁[Clean](https://wordpress.org/support/topic/clean-22/)󠁿

 [VenomVendor](https://profiles.wordpress.org/venomvendor/) Ọwẹ́wẹ̀ 3, 2016

Just as needed.

![](https://secure.gravatar.com/avatar/a47a032bb1464f31882baa5bc2d4948efe26f2079a21e34a6119ec517d66ea98?
s=60&d=retro&r=g)

### 󠀁[As is](https://wordpress.org/support/topic/as-is/)󠁿

 [emreerdogan](https://profiles.wordpress.org/emreerdogan/) Ọwẹ́wẹ̀ 3, 2016

This is what I was expecting. Thanks.

 [ Ka gbogbo àwọn àgbéyẹ̀wò 2 ](https://wordpress.org/support/plugin/date-query-enabler/reviews/)

## Àwọn Olùkópa & Olùgbéejáde

“date_query enabler” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe
ìkópa sí plugin yìí.

Àwọn Olùkópa

 *   [ arikogan ](https://profiles.wordpress.org/arikogan/)

[Túmọ̀ “date_query enabler” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/date-query-enabler)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/date-query-enabler/), 
ṣàyẹ̀wò [ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/date-query-enabler/),
tàbí ṣe àgbékalẹ̀ sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/date-query-enabler/)
nípasẹ̀ [RSS](https://plugins.trac.wordpress.org/log/date-query-enabler/?limit=100&mode=stop_on_copy&format=rss).

## Àkọsílẹ̀ àwọn àyípadà

#### 0.1

 * First version.

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **0.1**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **ọdún 11 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **10+**
 *  Dánwò dé **4.3.34**
 *  Èdè
 * [English (US)](https://wordpress.org/plugins/date-query-enabler/)
 * Àwọn àmì
 * [api](https://yor.wordpress.org/plugins/tags/api/)[rest](https://yor.wordpress.org/plugins/tags/rest/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/date-query-enabler/advanced/)

## Àwọn ìbò

 5 lára àwọn ìràwọ̀ 5.

 *  [  2 5-star reviews     ](https://wordpress.org/support/plugin/date-query-enabler/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/date-query-enabler/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/date-query-enabler/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/date-query-enabler/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/date-query-enabler/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/date-query-enabler/reviews/#new-post)

[Wo gbogbo àwọn àgbéyẹ̀wò](https://wordpress.org/support/plugin/date-query-enabler/reviews/)

## Àwọn Olùkópa

 *   [ arikogan ](https://profiles.wordpress.org/arikogan/)

## Ìrànlọ́wọ́

Nǹkan wà tí o fẹ́ sọ? Ṣé o nílò ìrànlọ́wọ́?

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/date-query-enabler/)