Skip to content

Commit

Permalink
Merge pull request #725 from boxuk/BWP-116
Browse files Browse the repository at this point in the history
[BWP-116] Update example patched plugins
  • Loading branch information
jdamner authored Jan 15, 2025
2 parents 8e41ea2 + f80328b commit 138c06d
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 10 deletions.
12 changes: 12 additions & 0 deletions patched-plugins/example/0001.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/patched-plugins/example/example.php b/patched-plugins/example/example.php
index 481bdb4e..dc5cc499 100644
--- a/patched-plugins/example/example.php
+++ b/patched-plugins/example/example.php
@@ -1,4 +1,4 @@
<?php
/*
Plugin Name: Example
-Version: 1.0
+Version: 1.1
Description: An example plugin.
*/
6 changes: 1 addition & 5 deletions patched-plugins/example/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@
"require": {
"composer/installers": "~1.0"
},
"extra": {
"branch-alias": {
"dev-main": "1.0.0"
}
}
"version": "1.1.0"
}
10 changes: 10 additions & 0 deletions patched-plugins/example/example.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
/**
* Plugin Name: Example
* Version: 1.0
* Description: An example plugin.
*/

function example(): void {
echo 'Hello, World!';
}
22 changes: 22 additions & 0 deletions patched-plugins/how-to.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patched Plugins

Any plugins saved locally that have a patch should the patch saved with them. This allows for updating the core plugin and re-applying the patch.

## How to generate patches with git?

Stage any changes, then generate the patch:

```sh
git add patched-plugins/example
git diff > patched-plugins/example-001.patch
```

## How to apply patches with git

Simply:

```sh
git apply /path/to/some-changes.patch
```

And that’s it! The changes are now re-applied.
6 changes: 1 addition & 5 deletions premium-plugins/example/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@
"require": {
"composer/installers": "~1.0"
},
"extra": {
"branch-alias": {
"dev-main": "1.0.0"
}
}
"version": "1.0.0"
}

0 comments on commit 138c06d

Please sign in to comment.