feat(Wordpress Node): Add post template option (#3139)

* Add wordpress post template option

* Fix: Add UI components and fix typo

* Add elementor template options

* Add Standard option

* 🔨 ability to use non elementor template, credential test, linter fixes

* 🔨 removed commented code

*  Improvements

Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
Zapfmeister
2022-07-04 09:39:56 +02:00
committed by GitHub
parent a8c16675d0
commit 02bc3da785
7 changed files with 161 additions and 7 deletions

View File

@@ -257,6 +257,72 @@ export const postFields: INodeProperties[] = [
default: [],
description: 'The terms assigned to the object in the post_tag taxonomy. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Template',
name: 'postTemplate',
type: 'fixedCollection',
default: {},
typeOptions: {
multipleValues: false,
},
options: [
{
displayName: 'Values',
name: 'values',
values: [
{
displayName: 'Elementor Template',
name: 'elementor',
type: 'boolean',
default: true,
description: 'Whether site uses elementor page builder',
},
{
displayName: 'Template',
name: 'template',
type: 'string',
default: '',
description: 'The theme file to use',
displayOptions: {
show: {
elementor: [ false ],
},
},
},
{
displayName: 'Template',
name: 'template',
type: 'options',
options: [
{
name: 'Standard',
value: '',
},
{
name: 'Elementor Canvas',
value: 'elementor_canvas',
},
{
name: 'Elementor Header Footer',
value: 'elementor_header_footer',
},
{
name: 'Elementor Theme',
value: 'elementor_theme',
},
],
default: '',
description: 'The Elementor template to use',
displayOptions: {
show: {
elementor: [ true ],
},
},
},
],
},
],
},
],
},
/* -------------------------------------------------------------------------- */
@@ -477,6 +543,72 @@ export const postFields: INodeProperties[] = [
default: [],
description: 'The terms assigned to the object in the post_tag taxonomy. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Template',
name: 'postTemplate',
type: 'fixedCollection',
default: {},
typeOptions: {
multipleValues: false,
},
options: [
{
displayName: 'Values',
name: 'values',
values: [
{
displayName: 'Elementor Template',
name: 'elementor',
type: 'boolean',
default: true,
description: 'Whether site uses elementor page builder',
},
{
displayName: 'Template',
name: 'template',
type: 'string',
default: '',
description: 'The theme file to use',
displayOptions: {
show: {
elementor: [ false ],
},
},
},
{
displayName: 'Template',
name: 'template',
type: 'options',
options: [
{
name: 'Standard',
value: '',
},
{
name: 'Elementor Canvas',
value: 'elementor_canvas',
},
{
name: 'Elementor Header Footer',
value: 'elementor_header_footer',
},
{
name: 'Elementor Theme',
value: 'elementor_theme',
},
],
default: '',
description: 'The Elementor template to use',
displayOptions: {
show: {
elementor: [ true ],
},
},
},
],
},
],
},
],
},
/* -------------------------------------------------------------------------- */