* Resolves the postType config value to the WordPress API type parameter.
(postType?: string)
| 87 | * Resolves the postType config value to the WordPress API type parameter. |
| 88 | */ |
| 89 | function resolvePostType(postType?: string): string { |
| 90 | switch (postType) { |
| 91 | case 'Posts': |
| 92 | return 'post' |
| 93 | case 'Pages': |
| 94 | return 'page' |
| 95 | default: |
| 96 | return 'any' |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | export const wordpressConnector: ConnectorConfig = { |
| 101 | ...wordpressConnectorMeta, |