-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #725 from boxuk/BWP-116
[BWP-116] Update example patched plugins
- Loading branch information
Showing
5 changed files
with
46 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters