| 1 |
/** |
| 2 |
* WordPress dependencies. |
| 3 |
*/ |
| 4 |
import { createReduxStore, register, registerStore } from '@wordpress/data'; |
| 5 |
|
| 6 |
/** |
| 7 |
* Internal dependencies. |
| 8 |
*/ |
| 9 |
import options from './store'; |
| 10 |
|
| 11 |
/** |
| 12 |
* Register data store. |
| 13 |
*/ |
| 14 |
if (typeof createReduxStore === 'function') { |
| 15 |
const store = createReduxStore('elasticpress', options); |
| 16 |
|
| 17 |
register(store); |
| 18 |
} else { |
| 19 |
registerStore('elasticpress', options); |
| 20 |
} |
| 21 |
|