Skip to content

Commit e982b14

Browse files
authored
Merge pull request #577 from wp-cli/regenerate-readme
Regenerate README file
2 parents 7400871 + 9426c6b commit e982b14

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed

README.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2947,6 +2947,116 @@ wp post meta update <id> <key> [<value>] [--format=<format>]
29472947

29482948

29492949

2950+
### wp post revision
2951+
2952+
Manages post revisions.
2953+
2954+
~~~
2955+
wp post revision
2956+
~~~
2957+
2958+
**EXAMPLES**
2959+
2960+
# Restore a post revision
2961+
$ wp post revision restore 123
2962+
Success: Restored revision 123.
2963+
2964+
# Show diff between two revisions
2965+
$ wp post revision diff 123 456
2966+
2967+
2968+
2969+
2970+
2971+
### wp post revision diff
2972+
2973+
Shows the difference between two revisions.
2974+
2975+
~~~
2976+
wp post revision diff <from> [<to>] [--field=<field>]
2977+
~~~
2978+
2979+
**OPTIONS**
2980+
2981+
<from>
2982+
The 'from' revision ID or post ID.
2983+
2984+
[<to>]
2985+
The 'to' revision ID or post ID. If not provided, compares with the current post.
2986+
2987+
[--field=<field>]
2988+
Compare specific field(s). Default: post_content
2989+
2990+
**EXAMPLES**
2991+
2992+
# Show diff between two revisions
2993+
$ wp post revision diff 123 456
2994+
2995+
# Show diff between a revision and the current post
2996+
$ wp post revision diff 123
2997+
2998+
2999+
3000+
### wp post revision prune
3001+
3002+
Deletes old post revisions.
3003+
3004+
~~~
3005+
wp post revision prune [<post-id>...] [--latest=<limit>] [--earliest=<limit>] [--yes]
3006+
~~~
3007+
3008+
**OPTIONS**
3009+
3010+
[<post-id>...]
3011+
One or more post IDs to prune revisions for. If not provided, prunes revisions for all posts.
3012+
3013+
[--latest=<limit>]
3014+
Keep only the latest N revisions per post. Older revisions will be deleted.
3015+
3016+
[--earliest=<limit>]
3017+
Keep only the earliest N revisions per post. Newer revisions will be deleted.
3018+
3019+
[--yes]
3020+
Skip confirmation prompt.
3021+
3022+
**EXAMPLES**
3023+
3024+
# Delete all but the latest 5 revisions for post 123
3025+
$ wp post revision prune 123 --latest=5
3026+
Success: Deleted 3 revisions for post 123.
3027+
3028+
# Delete all but the latest 5 revisions for all posts
3029+
$ wp post revision prune --latest=5
3030+
Success: Deleted 150 revisions across 30 posts.
3031+
3032+
# Delete all but the earliest 2 revisions for posts 123 and 456
3033+
$ wp post revision prune 123 456 --earliest=2
3034+
Success: Deleted 5 revisions for post 123.
3035+
Success: Deleted 3 revisions for post 456.
3036+
3037+
3038+
3039+
### wp post revision restore
3040+
3041+
Restores a post revision.
3042+
3043+
~~~
3044+
wp post revision restore <revision_id>
3045+
~~~
3046+
3047+
**OPTIONS**
3048+
3049+
<revision_id>
3050+
The revision ID to restore.
3051+
3052+
**EXAMPLES**
3053+
3054+
# Restore a post revision
3055+
$ wp post revision restore 123
3056+
Success: Restored revision 123.
3057+
3058+
3059+
29503060
### wp post term
29513061

29523062
Adds, updates, removes, and lists post terms.

0 commit comments

Comments
 (0)