Skip to content

Commit 8ec45d1

Browse files
committed
feat(Release): Initial Release
0 parents  commit 8ec45d1

File tree

12 files changed

+4773
-0
lines changed

12 files changed

+4773
-0
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
build:
9+
if: "!contains(github.event.head_commit.message, 'skip ci')"
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Use Node.js (14.18.0)
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: "14.18.0"
18+
19+
- name: Install Packages
20+
run: npm ci
21+
22+
- name: Run Semantic Release
23+
env:
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
26+
run: npx semantic-release

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Coverage directory used by tools like istanbul
9+
coverage
10+
11+
# Compiled binary addons (https://nodejs.org/api/addons.html)
12+
build/Release
13+
14+
# Dependency directories
15+
node_modules/
16+
17+
# Optional npm cache directory
18+
.npm
19+
20+
# Optional eslint cache
21+
.eslintcache
22+
23+
# Output of 'npm pack'
24+
*.tgz
25+
26+
# dotenv environment variables file
27+
.env

.releaserc.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"branches": "master",
3+
"repositoryUrl": "https://github.com/eric-mathison/wpforms-honeypot",
4+
"debug": "true",
5+
"plugins": [
6+
"@semantic-release/commit-analyzer",
7+
"@semantic-release/release-notes-generator",
8+
"@semantic-release/github",
9+
[
10+
"@semantic-release/changelog",
11+
{
12+
"changelogFile": "CHANGELOG.md"
13+
}
14+
],
15+
[
16+
"semantic-release-plugin-update-version-in-files",
17+
{
18+
"files": ["wpforms-honeypot.php"],
19+
"placeholder": "0.0.0-development"
20+
}
21+
],
22+
[
23+
"@semantic-release/git",
24+
{
25+
"assets": [
26+
"package.json",
27+
"package-lock.json",
28+
"CHANGELOG.md",
29+
"wpforms-honeypot.php"
30+
],
31+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
32+
}
33+
]
34+
]
35+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"conventionalCommits.scopes": ["Release"]
3+
}

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# WPForms Honeypot
2+
3+
Allows you to add a custom honeypot field to WPForms to help combat spam.
4+
5+
## Description
6+
7+
This plugin helps combat spam entries made through WPForms by preventing form submissions made commonly by bots.
8+
9+
## Installation
10+
11+
1. Upload the plugin files to the `/wp-content/plugins/wpforms-honeypot` directory, or install the plugin through the WordPress plugins screen directly.
12+
2. Activate the plugin through the 'Plugins' screen in WordPress
13+
14+
## Setup
15+
16+
After creating a form with WPForms, insert a SINGLE LINE TEXT field.
17+
Under the Advanced Tab, add the CSS Class 'wpfhp-field'.
18+
Save and publish the form.
19+
20+
## Changelog
21+
22+
see CHANGELOG.md

gruntfile.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = function (grunt) {
2+
require("load-grunt-tasks")(grunt);
3+
4+
grunt.initConfig({
5+
pkg: grunt.file.readJSON("package.json"),
6+
7+
makepot: {
8+
options: {
9+
exclude: ["node_modules/.*"],
10+
domainPath: "/languages",
11+
type: "wp-plugin",
12+
potHeaders: {
13+
"report-msgid-bugs-to":
14+
"https://github.com/eric-mathison/wpforms-honeypot/issues",
15+
poedit: true,
16+
"x-poedit-keywordslist": true,
17+
},
18+
},
19+
files: {
20+
src: ["**/*.php", "src/*.js"],
21+
},
22+
},
23+
24+
addtextdomain: {
25+
options: {
26+
textdomain: "wpforms-honeypot",
27+
updateDomains: true,
28+
},
29+
php: {
30+
files: {
31+
src: ["**/*.php", "!node_modules/**/*.php"],
32+
},
33+
},
34+
},
35+
});
36+
37+
grunt.registerTask("build", ["addtextdomain", "makepot"]);
38+
};

includes/css/wpforms-honeypot.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.wpforms-container .wpfhp-field {
2+
display: none;
3+
}

languages/wpforms-honeypot.pot

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (C) 2022 Eric Mathison
2+
# This file is distributed under the GPL-2.0-or-later.
3+
msgid ""
4+
msgstr ""
5+
"Project-Id-Version: WPForms Honeypot 0.0.0-development\n"
6+
"Report-Msgid-Bugs-To: "
7+
"https://github.com/eric-mathison/wpforms-honeypot/issues\n"
8+
"POT-Creation-Date: 2022-02-26 21:39:12+00:00\n"
9+
"MIME-Version: 1.0\n"
10+
"Content-Type: text/plain; charset=utf-8\n"
11+
"Content-Transfer-Encoding: 8bit\n"
12+
"PO-Revision-Date: 2022-MO-DA HO:MI+ZONE\n"
13+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14+
"Language-Team: LANGUAGE <[email protected]>\n"
15+
"Language: en\n"
16+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
17+
"X-Poedit-Country: United States\n"
18+
"X-Poedit-SourceCharset: UTF-8\n"
19+
"X-Poedit-KeywordsList: "
20+
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
21+
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
22+
"X-Poedit-Basepath: ../\n"
23+
"X-Poedit-SearchPath-0: .\n"
24+
"X-Poedit-Bookmarks: \n"
25+
"X-Textdomain-Support: yes\n"
26+
"X-Generator: grunt-wp-i18n 1.0.3\n"
27+
28+
#. Plugin Name of the plugin/theme
29+
msgid "WPForms Honeypot"
30+
msgstr ""
31+
32+
#. Plugin URI of the plugin/theme
33+
msgid "eric-mathison/wpforms-honeypot"
34+
msgstr ""
35+
36+
#. Description of the plugin/theme
37+
msgid "Adds a custom honeypot field to WPForms to help combat spam."
38+
msgstr ""
39+
40+
#. Author of the plugin/theme
41+
msgid "Eric Mathison"
42+
msgstr ""

0 commit comments

Comments
 (0)