Skip to content

Commit

Permalink
resolve bug where clicking 'view' in wp-admin leads to a broken redir…
Browse files Browse the repository at this point in the history
…ect (#165)
  • Loading branch information
kylehotchkiss authored Oct 5, 2021
1 parent 81e95b8 commit d4641aa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function headless_redirect(){
global $headless_domain;

$post_type = get_post_type(get_the_ID());
$slug = str_replace(home_url(), '', get_permalink(get_the_ID()));
$slug = ltrim(str_replace(home_url(), '', get_permalink(get_the_ID())), '/');
$redirect = '';
// check if preview and user has edit ability.
// if so, redirect to preview path
Expand Down

0 comments on commit d4641aa

Please sign in to comment.