From f29811307f3dcec74fc9e668206eaae73076c266 Mon Sep 17 00:00:00 2001 From: ADTC Date: Wed, 26 Apr 2017 16:45:36 +0800 Subject: [PATCH] Add unique identifier as hidden field in edit post/page This ensures the ID does not change when the post or page is edited. Signed-off-by: ADTC --- bl-kernel/admin/views/edit-page.php | 6 ++++++ bl-kernel/admin/views/edit-post.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/bl-kernel/admin/views/edit-page.php b/bl-kernel/admin/views/edit-page.php index de2429b0..8c78516c 100644 --- a/bl-kernel/admin/views/edit-page.php +++ b/bl-kernel/admin/views/edit-page.php @@ -16,6 +16,12 @@ HTML::formOpen(array('class'=>'uk-form-stacked')); 'value'=>$_Page->key() )); + // Unique identifier + HTML::formInputHidden(array( + 'name'=>'uniqueId', + 'value'=>$_Page->uniqueId() + )); + // LEFT SIDE // -------------------------------------------------------------------- echo '
'; diff --git a/bl-kernel/admin/views/edit-post.php b/bl-kernel/admin/views/edit-post.php index 94e78311..241696a5 100644 --- a/bl-kernel/admin/views/edit-post.php +++ b/bl-kernel/admin/views/edit-post.php @@ -16,6 +16,12 @@ HTML::formOpen(array('class'=>'uk-form-stacked')); 'value'=>$_Post->key() )); + // Unique identifier + HTML::formInputHidden(array( + 'name'=>'uniqueId', + 'value'=>$_Post->uniqueId() + )); + // LEFT SIDE // -------------------------------------------------------------------- echo '
';