From 5d9e7bc7524fd3584f8320e1fb06aab159ef7ab5 Mon Sep 17 00:00:00 2001 From: Jasper Frumau Date: Sat, 30 May 2026 11:38:33 +0700 Subject: [PATCH 1/2] docs: extract developer guide into CONTRIBUTING.md Move the Build from Source, Development, and Dependencies sections out of the README into a new root-level CONTRIBUTING.md, leaving a short Contributing pointer in the README and renumbering the Composer install method. Exclude CONTRIBUTING.md from the distributed plugin (.distignore) and Composer dists (.gitattributes), matching the other dev docs. --- .distignore | 1 + .gitattributes | 1 + CONTRIBUTING.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 39 +++++-------------------------------- 4 files changed, 58 insertions(+), 34 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/.distignore b/.distignore index b6b674d..45c2ffa 100644 --- a/.distignore +++ b/.distignore @@ -21,6 +21,7 @@ vendor/* .vibe/* AGENTS.md CLAUDE.md +CONTRIBUTING.md README.md dev.md docs/* diff --git a/.gitattributes b/.gitattributes index 88ef7df..87c0b2f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -23,6 +23,7 @@ docs export-ignore AGENTS.md export-ignore CLAUDE.md export-ignore +CONTRIBUTING.md export-ignore README.md export-ignore dev.md export-ignore diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b89a588 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,51 @@ +# Contributing to Warder Cookie Consent + +Thanks for your interest in improving Warder Cookie Consent! This guide covers how to +build the plugin from source, set up a development environment, and submit changes. + +For a deeper technical reference on how the plugin loads settings, blocks scripts, and +manages cookies, see [`docs/dev.md`](docs/dev.md). + +## Build from Source + +1. Clone this repository +2. Install dependencies: + ```bash + npm install + ``` +3. Build the plugin: + ```bash + npx webpack + ``` +4. Upload the plugin folder to your WordPress plugins directory + +## Development + +PHP 8.0+ is required. To set up the development environment: + +```bash +# Install dependencies +npm install + +# Build for production +npx webpack + +# Watch for changes +npx webpack --watch +``` + +The frontend bundle is built from `src/index.js` into `dist/cookieconsent.bundle.js`. +There are no automated tests. + +## Dependencies + +- [CookieConsent v3](https://github.com/orestbida/cookieconsent) - Core cookie consent functionality +- [webpack](https://webpack.js.org/) - For bundling assets +- [style-loader](https://webpack.js.org/loaders/style-loader/) - For loading CSS +- [css-loader](https://webpack.js.org/loaders/css-loader/) - For processing CSS + +## Submitting Changes + +1. Fork the repository and create a feature branch off `main`. +2. Make your changes and rebuild the bundle (`npx webpack`) if you touched anything under `src/`. +3. Open a pull request against `main` with a clear description of what changed and why. diff --git a/README.md b/README.md index 101e713..aaeb5b6 100644 --- a/README.md +++ b/README.md @@ -29,20 +29,7 @@ A lightweight plugin that implements GDPR-compliant cookie consent functionality 3. Upload the extracted folder to your `/wp-content/plugins/` directory 4. Activate the plugin through the WordPress admin panel -### Method 3: Build from Source - -1. Clone this repository -2. Install dependencies: - ```bash - npm install - ``` -3. Build the plugin: - ```bash - npx webpack - ``` -4. Upload the plugin folder to your WordPress plugins directory - -### Method 4: Using Composer +### Method 3: Using Composer You can also install the plugin using Composer: ```bash @@ -155,27 +142,11 @@ The plugin automatically handles third-party cookies by: For detailed implementation guides, see [`docs/dev.md`](docs/dev.md). -## Dependencies - -- [CookieConsent v3](https://github.com/orestbida/cookieconsent) - Core cookie consent functionality -- [webpack](https://webpack.js.org/) - For bundling assets -- [style-loader](https://webpack.js.org/loaders/style-loader/) - For loading CSS -- [css-loader](https://webpack.js.org/loaders/css-loader/) - For processing CSS - -## Development - -To set up the development environment: +## Contributing -```bash -# Install dependencies -npm install - -# Build for production -npx webpack - -# Watch for changes -npx webpack --watch -``` +Want to build from source, set up a development environment, or submit changes? See +[`CONTRIBUTING.md`](CONTRIBUTING.md). For a deeper technical reference, see +[`docs/dev.md`](docs/dev.md). ## License From 3f939d29b2f359f1b518e9e969b62252873997c8 Mon Sep 17 00:00:00 2001 From: Jasper Frumau Date: Sat, 30 May 2026 11:38:40 +0700 Subject: [PATCH 2/2] chore: bump version to 2.1.2 Documentation-only release. Update the Version header and WARDER_VERSION constant, package.json version, readme.txt Stable tag, and add Changelog and Upgrade Notice entries across CHANGELOG.md and readme.txt. --- CHANGELOG.md | 6 ++++++ package.json | 2 +- readme.txt | 11 ++++++++++- warder-cookie-consent.php | 4 ++-- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d83b608..5a6471d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to Warder Cookie Consent are documented here. +## [2.1.2] - 2026-05-30 + +### Documentation +- Added `CONTRIBUTING.md` at the repository root covering build-from-source, development setup, dependencies, and how to submit changes. +- Trimmed the developer-facing "Build from Source", "Development", and "Dependencies" sections out of the README and replaced them with a "Contributing" pointer to `CONTRIBUTING.md` and `docs/dev.md`. Renumbered the Composer install method accordingly. + ## [2.1.1] - 2026-05-30 ### Changed diff --git a/package.json b/package.json index 03ea0d5..8a6ba44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "imwz-cookie-consent", - "version": "2.1.1", + "version": "2.1.2", "main": "webpack.config.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/readme.txt b/readme.txt index 3cd94ba..d739f8c 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://imagewize.com Tags: cookie, consent, gdpr, privacy, compliance Requires at least: 5.0 Tested up to: 7.0 -Stable tag: 2.1.1 +Stable tag: 2.1.2 Requires PHP: 8.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -66,6 +66,12 @@ https://github.com/imagewize/warder-cookie-consent == Changelog == += 2.1.2 = +*2026-05-30* + +* Docs: added `CONTRIBUTING.md` at the repository root with build-from-source, development setup, dependencies, and contribution guidelines. +* Docs: moved the developer-facing build/development/dependencies sections out of the README into `CONTRIBUTING.md`, leaving a short "Contributing" pointer; renumbered the Composer install method. + = 2.1.1 = *2026-05-30* @@ -207,6 +213,9 @@ https://github.com/imagewize/warder-cookie-consent == Upgrade Notice == += 2.1.2 = +Documentation-only release: adds a `CONTRIBUTING.md` and slims the README to user-facing docs. No functional changes. + = 2.1.1 = Removes Slimstat from the default automatic script-blocking list (use the `warder_blocked_scripts` filter to add it back if needed). README updated to document WooCommerce cookie defaults and script-blocking examples. diff --git a/warder-cookie-consent.php b/warder-cookie-consent.php index 95662dc..e0fd39d 100644 --- a/warder-cookie-consent.php +++ b/warder-cookie-consent.php @@ -2,7 +2,7 @@ /** * Plugin Name: Warder Cookie Consent * Description: GDPR-compliant cookie consent banner with category management and floating preferences toggle. - * Version: 2.1.1 + * Version: 2.1.2 * Author: Jasper Frumau * Author URI: https://imagewize.com * Requires at least: 5.0 @@ -16,7 +16,7 @@ defined( 'ABSPATH' ) || exit; -define( 'WARDER_VERSION', '2.1.1' ); +define( 'WARDER_VERSION', '2.1.2' ); define( 'WARDER_PLUGIN_FILE', __FILE__ ); require_once plugin_dir_path( __FILE__ ) . 'inc/defaults.php';