mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
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:
@@ -32,8 +32,7 @@ export class Wordpress implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Wordpress',
|
||||
name: 'wordpress',
|
||||
// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg
|
||||
icon: 'file:wordpress.png',
|
||||
icon: 'file:wordpress.svg',
|
||||
group: ['output'],
|
||||
version: 1,
|
||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||
@@ -170,6 +169,9 @@ export class Wordpress implements INodeType {
|
||||
if (additionalFields.sticky) {
|
||||
body.sticky = additionalFields.sticky as boolean;
|
||||
}
|
||||
if (additionalFields.postTemplate) {
|
||||
body.template = this.getNodeParameter('additionalFields.postTemplate.values.template', i, '') as string;
|
||||
}
|
||||
if (additionalFields.categories) {
|
||||
body.categories = additionalFields.categories as number[];
|
||||
}
|
||||
@@ -215,6 +217,9 @@ export class Wordpress implements INodeType {
|
||||
if (updateFields.sticky) {
|
||||
body.sticky = updateFields.sticky as boolean;
|
||||
}
|
||||
if (updateFields.postTemplate) {
|
||||
body.template = this.getNodeParameter('updateFields.postTemplate.values.template', i, '') as string;
|
||||
}
|
||||
if (updateFields.categories) {
|
||||
body.categories = updateFields.categories as number[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user