Skip to content

Commit

Permalink
fix(csm-mode): Fix wrong CSM mode make draft preview blank page.
Browse files Browse the repository at this point in the history
  • Loading branch information
daomapsieucap committed Sep 11, 2023
1 parent 9992f7a commit 1a403bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
== Changelog ==

= 3.1.2 =
*Release Date - xx September 2023*

* Fixed: Fix wrong CSM mode make draft preview blank page.

= 3.1.1 =
*Release Date - 05 September 2023*

Expand Down
4 changes: 3 additions & 1 deletion includes/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ function fiad_file_get_content($file_url){

if(!function_exists('fiad_is_preview')){
function fiad_is_preview(){
return sanitize_title(fiad_array_key_exists('preview', $_GET));
$id = intval(fiad_array_key_exists('id', $_GET));

return in_array($id, fiad_get_csm_pages()) && is_preview();
}
}

Expand Down

0 comments on commit 1a403bb

Please sign in to comment.