Skip to content

Commit 8a17cd6

Browse files
committed
[Feat] New feature: TEMPLATES and METHODS
1 parent 1476bfe commit 8a17cd6

15 files changed

+841
-485
lines changed

CNAME

-1
This file was deleted.

CONTRIBUTING.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributing
2+
3+
Guidelines for working on the project.
4+
5+
## Commit
6+
7+
We standardize the way of writing commits. The goal is to create **messages that are more readable** and that easily pass the project's history.
8+
9+
* Be succinct.
10+
* Always write a title and if necessary a message explaining what was done.
11+
* Writing the reason about a change is better than what was done in the code.
12+
* Standardized language: **English**.
13+
14+
### Formatting
15+
16+
````
17+
[Tag] Relevant title
18+
19+
Commit message. Usually explaining what has changed,
20+
removed or added and possible implementation details
21+
that can be used by the team in future development.
22+
````
23+
24+
### Exemplo de Tags
25+
26+
* **Feat:** A new feature
27+
* **Fix:** Fixing a bug
28+
* **Style:** Change on writing the code
29+
* **Refact:** Refactoring stuff
30+
* **Docs:** Documentation
31+
* **Test:** About tests
32+
* **Build:** About building flow
33+
34+
## Coding Standards
35+
36+
WordPress Coding Standards, with spaces.
37+
38+
## Git
39+
40+
You should use `git rebase master` before merge.
41+
42+
It keeps the git timeline beautiful.
43+
44+
And please, create a Issue about your PR.
45+
46+
## Development
47+
48+
### Templates
49+
50+
Templates are Header / Body values.
51+
52+
To create new templates, just add ir to `docs/templates.json`:
53+
54+
```
55+
{
56+
"name": "Your App or Template Name",
57+
"headers": [ "x-example: custom-value", "x-example-2: custom-value-2" ]
58+
"body": "{ "example": "New message from [your-name] - [your-message]", "data": "__VALUES__" }"
59+
"docs": "https://wordpress.org/plugins/cf7-to-zapier/",
60+
"separator": " | "
61+
}
62+
```
63+
64+
* Name - Your template name.
65+
* Headers - Array of strings to be added to "Headers" options.
66+
* Body - The value to "Body" option In general, a JSON string.
67+
* Docs - A URL to documentation.
68+
* Separator - When using "__VALUES__" you can change the fields separator for your example.
69+
70+
Note: Only "Name" and "Body" are required.
71+
72+
As you don't know the fields from user, we use the "__VALUES__" placeholder.
73+
74+
The plugin you add all user fields separated by " | " by default (or using "separator" value).

README.md

+18-9
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ We will replace the value for last option (which is the free_text input) with th
129129

130130
This way your webhook will receive the free text value and other options if you allow it (like in checkbox).
131131

132+
### I don't see a template for my webhook. ###
133+
134+
Templates are created by community so we're constructing this together.
135+
136+
You still are able to add a custom header / body or you can open a ticket and propose a new template.
137+
132138
### Who is the developer? ###
133139

134140
[Mário Valney](https://mariovalney.com/me)
@@ -141,28 +147,28 @@ Yes! Visit [GitHub repository](https://github.com/mariovalney/cf7-to-zapier) or
141147

142148
## Screenshots ##
143149

144-
### 1. CF7 to Webhook configuration ###
145-
![1. CF7 to Webhook configuration](http://ps.w.org/cf7-to-webhook/assets/screenshot-1.png)
150+
### 1. Webhook configuration ###
151+
![1. Webhook configuration](http://ps.w.org/cf7-to-webhook/assets/screenshot-1.png)
146152

147-
### 2. Zapier Step 1 - Choosing you app trigger ###
148-
![2. Zapier Step 1 - Choosing you app trigger](http://ps.w.org/cf7-to-webhook/assets/screenshot-2.png)
153+
### 2. Using templates ###
154+
![2. Using templates](http://ps.w.org/cf7-to-webhook/assets/screenshot-2.png)
149155

150-
### 3. Zapier Step 2 - Choosing Catch Hook option ###
151-
![3. Zapier Step 2 - Choosing Catch Hook option](http://ps.w.org/cf7-to-webhook/assets/screenshot-3.png)
152-
153-
### 4. Zapier Step 3 - Webhook URL (waiting for first data) ###
154-
![4. Zapier Step 3 - Webhook URL (waiting for first data)](http://ps.w.org/cf7-to-webhook/assets/screenshot-4.png)
156+
### 3. All request methods ###
157+
![3. All request methods](http://ps.w.org/cf7-to-webhook/assets/screenshot-3.png)
155158

156159

157160
## Changelog ##
158161

159162
### 4.0.0 ###
160163

164+
* New feature: [TEMPLATES](https://wordpress.org/support/topic/how-templates-works).
161165
* New feature: advanced custom body.
162166
* New feature: error notification and status check.
163167
* New feature: send file content as base64 (props to @ozanerturk).
164168
* Settings UI renewed.
165169

170+
* New template: Slack Integration.
171+
166172
### 3.0.2 ###
167173

168174
* Avoid empty webhook URLs.
@@ -293,10 +299,13 @@ Props to @shoreline-chrism
293299
### 4.0.0 ###
294300

295301
We have a lot of new features and a new UI!
302+
The most cool new feature is templates! Take a look!
303+
296304
It's not a breaking change version, but we recommend to test your form after update (we have new settings: saving the form maybe help).
297305

298306
New options:
299307

308+
* Templates!
300309
* Advanced custom body.
301310
* Error notification and response status check.
302311
* Send file content as Base64 instead of create a link to download.

cf7-to-zapier.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Plugin Name: CF7 to Webhook
88
* Plugin URI: https://github.com/mariovalney/cf7-to-zapier
9-
* Description: Use Contact Form 7 as a trigger to any webhook like Zapier!
9+
* Description: Use Contact Form 7 as a trigger to any Webhook.
1010
* Version: 4.0.0
1111
* Author: Mário Valney
1212
* Author URI: http://mariovalney.com/me

0 commit comments

Comments
 (0)