Skip to content

Commit f15509e

Browse files
committed
Add explanatory code comments
1 parent e319c64 commit f15509e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import { __ } from '@wordpress/i18n';
77
import { registerPlugin } from '@wordpress/plugins';
88

99
const RevisionNotesField = () => {
10+
// Revision notes are entered to be saved, not to be edited,
11+
// so we use state instead of the actual meta for display value,
12+
// resetting it when a post save action happens.
1013
const [ revisionNote, setRevisionNote ] = useState('');
1114

1215
const { isSavingPost } = useSelect(

0 commit comments

Comments
 (0)