diff --git a/docs/reference-guides/data/data-core-editor.md b/docs/reference-guides/data/data-core-editor.md index 43fba216c4ce08..3191956f8d99b0 100644 --- a/docs/reference-guides/data/data-core-editor.md +++ b/docs/reference-guides/data/data-core-editor.md @@ -218,7 +218,7 @@ _Parameters_ _Returns_ -- `?number`: ID of current post. +- `?(number|string)`: The current post ID (number) or template slug (string). ### getCurrentPostLastRevisionId diff --git a/packages/editor/src/store/selectors.js b/packages/editor/src/store/selectors.js index 7f2f22d2978b4b..435eab23f0b878 100644 --- a/packages/editor/src/store/selectors.js +++ b/packages/editor/src/store/selectors.js @@ -195,7 +195,7 @@ export function getCurrentPostType( state ) { * * @param {Object} state Global application state. * - * @return {?number} ID of current post. + * @return {?(number|string)} The current post ID (number) or template slug (string). */ export function getCurrentPostId( state ) { return state.postId;