Skip to content

Commit 6346a41

Browse files
committed
expand readme, include license
1 parent bc2f91a commit 6346a41

File tree

2 files changed

+74
-10
lines changed

2 files changed

+74
-10
lines changed

LICENSE

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The MIT License (MIT)
2+
Copyright (c) 2016 Kailey Lampert
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5+
6+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7+
8+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

readme.md

+66-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,70 @@
1-
Revisions CLI
2-
=============
1+
# Revisions CLI
32

4-
Requires [wp-cli](http://wp-cli.org).
3+
WP CLI command for managing revisions
54

6-
Install this as a normal plugin, then run `wp help revisions`
5+
## Installation
76

7+
### as standard plugin
8+
9+
```
10+
wp plugin install https://github.com/trepmal/wp-revisions-cli/archive/master.zip --activate
11+
```
12+
13+
### as wp-cli package (coming soooooooon, hopefully)
14+
15+
```
16+
# wp package install trepmal/wp-revisions-cli
817
```
9-
clean Clean out old revisions
10-
dump Dump all revisions
11-
generate Generate revisions
12-
list List all revisions
13-
status Get revision status
14-
```
18+
19+
## Usage
20+
21+
22+
For a rundown of all commands at any time, run `wp help revisions`
23+
24+
25+
### `wp revisions clean [<keep>]`
26+
27+
`<keep>` is an integer, defaults to value of `WP_POST_REVISIONS`
28+
29+
For all posts, keep only the last *keep* revisions for all posts.
30+
31+
- `--post_type=<post_type>` Clean revisions for given post type
32+
- `--post_id=<post_id>` Clean revisions for given post. (Does not yet accept lists)
33+
- `--hard` use `wp_delete_post_revision()` when deleting, this picks up any potential related data such as meta or comments.
34+
35+
### `wp revisions dump`
36+
37+
Dump all revisions for all posts. Equivalent to `wp revisions clean -1`
38+
39+
- `--hard` use `wp_delete_post_revision()` when deleting, this picks up any potential related data such as meta or comments.
40+
- `--yes` answer 'yes' to confirmation message
41+
42+
### `wp revisions generate [<count>]`
43+
44+
`<count>` *integer* Number of revisions to generate per post. Default 15
45+
46+
Generate revisions for posts.
47+
48+
- `--post_type=<post_type>` Generate revisions for given post type
49+
- `--post_id=<post_id>` Generate revisions for given post. (Does not yet accept lists)
50+
51+
### `wp revisions list`
52+
53+
List revisions.
54+
55+
- `--post_type=<post_type>` Generate revisions for given post type
56+
- `--post_id=<post_id>` Generate revisions for given post. (Does not yet accept lists)
57+
- `--yes` answer 'yes' to confirmation message
58+
59+
### `wp revisions status`
60+
61+
Get revisions status. Namely, the value of `WP_POST_REVISIONS`
62+
63+
64+
## Credits
65+
66+
## License
67+
68+
The MIT License (MIT)
69+
Copyright (c) 2016 Kailey Lampert
70+
[Full text license](LICENSE)

0 commit comments

Comments
 (0)