• 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細

このWikiはいつでも誰でも編集できます

「リビジョン管理」の版間の差分

提供: WordPress Codex 日本語版
移動先: 案内検索
(en:Revision Management 13:15, September 27, 2008 MichaelH 版を翻訳用にコピー、言語間リンク・差分リンク挿入)
 
(未翻訳・改名テンプレ追加、カテゴリ名日本語化ほか微調整)
1行目: 1行目:
<div style="border: solid 1px #00c; background-color: #eef; text-align: center; padding: 1em; margin: 1em 0;">
+
{{draft}}
This article is a [[Category:Drafts|ROUGH DRAFT]]. The content within this article may not yet be verified or valid.  This information is subject to change.
+
{{NeedTrans}}
</div>
+
{{Rename}}
  
 
Based on Michael Adams wp-testers email list post
 
Based on Michael Adams wp-testers email list post
  
 +
<div id="Autosaves">
 
==Autosaves==
 
==Autosaves==
 +
</div>
  
 
There is only ever a maximum of one autosave for any given post.  New autosaves overwrite old autosaves.  This means that no, your tables do not grow by one row every 60 seconds.
 
There is only ever a maximum of one autosave for any given post.  New autosaves overwrite old autosaves.  This means that no, your tables do not grow by one row every 60 seconds.
11行目: 13行目:
 
Autosaves are enabled for all posts and pages but do not overwrite published content.  Autosaves are stored as a special type of revision; they do not overwrite the actual post.  In fact, if your browser does crash, when you go to edit that post, WP will toss up a warning that says something like "This post has an autosave which is more recent that the post itself.  Would you like to see it?"  With a link to the revision page from where it can be restored/ignored.
 
Autosaves are enabled for all posts and pages but do not overwrite published content.  Autosaves are stored as a special type of revision; they do not overwrite the actual post.  In fact, if your browser does crash, when you go to edit that post, WP will toss up a warning that says something like "This post has an autosave which is more recent that the post itself.  Would you like to see it?"  With a link to the revision page from where it can be restored/ignored.
  
 +
<div id="Revision_Options">
 
==Revision Options==
 
==Revision Options==
 +
</div>
  
 
There are options, but they are hidden well :)  There is a constant (not even filterable) that can be set by a plugin or in your wp-config.php file:
 
There are options, but they are hidden well :)  There is a constant (not even filterable) that can be set by a plugin or in your wp-config.php file:
20行目: 24行目:
 
* (int) > 0: store that many revisions (+1 autosave) per post.  Old revisions are automatically deleted.
 
* (int) > 0: store that many revisions (+1 autosave) per post.  Old revisions are automatically deleted.
  
 +
<div id="Revision_Storage_Method">
 
==Revision Storage Method==
 
==Revision Storage Method==
 +
</div>
 +
 
Revisions are stored in the posts table.  I don't yet know what kind of impact that will have on post queries.  We're going to turn the switch to "on" on WordPress.com sometime soonish and we'll have a better idea about what kind of damage, if any, it does.
 
Revisions are stored in the posts table.  I don't yet know what kind of impact that will have on post queries.  We're going to turn the switch to "on" on WordPress.com sometime soonish and we'll have a better idea about what kind of damage, if any, it does.
  
27行目: 34行目:
 
Plugins can customize what fields (within limits) are versioned.  By default, WP keeps track of the changes to title, author, content, excerpt.
 
Plugins can customize what fields (within limits) are versioned.  By default, WP keeps track of the changes to title, author, content, excerpt.
  
 +
<div id="Revision_Management">
 
==Revision Management==
 
==Revision Management==
 +
</div>
  
 
Deleting: There is an API function to delete revisions, but there is no UI. That can certainly change.
 
Deleting: There is an API function to delete revisions, but there is no UI. That can certainly change.
41行目: 50行目:
 
If it is truly useful to our user base, we can certainly make it happen for core.  I'm sure we'll get feedback from "real users" at WordPress.com when it gets turned on.
 
If it is truly useful to our user base, we can certainly make it happen for core.  I'm sure we'll get feedback from "real users" at WordPress.com when it gets turned on.
  
 +
<div id="Displaying_Rendered_Revisions">
 
==Displaying Rendered Revisions==
 
==Displaying Rendered Revisions==
 +
</div>
  
 
Andrew mentioned the possibility of showing revisions in "raw" or "rendered" form.  That seems like a good idea to me.
 
Andrew mentioned the possibility of showing revisions in "raw" or "rendered" form.  That seems like a good idea to me.
  
 
We had also discussed the possibility of showing old revisions and diffs on the blog itself.  That certainly wouldn't appeal to everyone.  I think that can be left to themers/plugin writers.  All the pieces for it are already in core.
 
We had also discussed the possibility of showing old revisions and diffs on the blog itself.  That certainly wouldn't appeal to everyone.  I think that can be left to themers/plugin writers.  All the pieces for it are already in core.
 +
 +
== 変更履歴 ==
 +
* [[Version 2.6|2.6]] :
 +
* [[Version 2.5|2.5]] :
  
 
{{原文|Revision Management|61798}}<!-- 13:15, September 27, 2008 MichaelH 版 -->
 
{{原文|Revision Management|61798}}<!-- 13:15, September 27, 2008 MichaelH 版 -->
  
[[Category:New page created]]
+
[[Category:上級トピック]]
[[Category:Advanced_Topics]]
+
[[Category:WordPress ヘルプ]]
[[Category:WordPress Help]]
+
[[Category:wp2.6]]
  
 
[[en:Revision Management]]
 
[[en:Revision Management]]

2008年11月11日 (火) 16:01時点における版

このページはラフドラフトで、まだ内容の検証が済んでいません。情報が間違っていたり書き直されることがあります。
執筆中のため、執筆者の許可なく編集しないでください

このページ「リビジョン管理」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています

ページ名検討中: このページ名「リビジョン管理」について改名が提案されています。ご意見をお寄せください。

Based on Michael Adams wp-testers email list post

There is only ever a maximum of one autosave for any given post. New autosaves overwrite old autosaves. This means that no, your tables do not grow by one row every 60 seconds.

Autosaves are enabled for all posts and pages but do not overwrite published content. Autosaves are stored as a special type of revision; they do not overwrite the actual post. In fact, if your browser does crash, when you go to edit that post, WP will toss up a warning that says something like "This post has an autosave which is more recent that the post itself. Would you like to see it?" With a link to the revision page from where it can be restored/ignored.

Revision Options

There are options, but they are hidden well :) There is a constant (not even filterable) that can be set by a plugin or in your wp-config.php file:

WP_POST_REVISIONS:

  • true (default), -1: store every revision
  • false, 0: do not store any revisions (except the one autosave per post)
  • (int) > 0: store that many revisions (+1 autosave) per post. Old revisions are automatically deleted.

Revision Storage Method

Revisions are stored in the posts table. I don't yet know what kind of impact that will have on post queries. We're going to turn the switch to "on" on WordPress.com sometime soonish and we'll have a better idea about what kind of damage, if any, it does.

Revisions are stored as children of their associated post (the same thing we do for attachments). They are given a post_status of 'inherit', a post_type of 'revision', and a post_name of {parent ID}- revision(-#) for regular revisions and {parent ID}-autosave for autosaves.

Plugins can customize what fields (within limits) are versioned. By default, WP keeps track of the changes to title, author, content, excerpt.

Revision Management

Deleting: There is an API function to delete revisions, but there is no UI. That can certainly change.

Andrew proposed a delete button in the actions column. A column of checkboxes and some action buttons at the top would be more in keeping with the current WP UI (like the Manage -> Posts page), but that would be totally confusing with the column of radio buttons and the "Compare" button we currently have. Andrew's suggestion is clean and simple. If any one wants to rethink that whole UI, please go ahead. Send some mockups to the list.

Re-editing by Contributer: I have no idea what happens in WP 2.5 when a Contributor edits an already published post (by that user or by another) :)

I can say, though, that nothing fancy happens with revisions in that scenario (unless the good will of some unforeseen bug rears its serendipitous head).

Creating new not-yet-to-be-published revisions for a currently published post / pinning an old revision: No. I honestly haven't a clue how many users would use this feature. Maybe everybody, maybe nobody. I don't think the code would be too hard to implement as a plugin given the new revisions API functions. The UI sounds difficult to me to get right.

If it is truly useful to our user base, we can certainly make it happen for core. I'm sure we'll get feedback from "real users" at WordPress.com when it gets turned on.

Displaying Rendered Revisions

Andrew mentioned the possibility of showing revisions in "raw" or "rendered" form. That seems like a good idea to me.

We had also discussed the possibility of showing old revisions and diffs on the blog itself. That certainly wouldn't appeal to everyone. I think that can be left to themers/plugin writers. All the pieces for it are already in core.

変更履歴

最新英語版: WordPress Codex » Revision Management最新版との差分