humanmade / post-cloner

Post Cloner plugin
3 stars 2 forks source link

Check whether to strip the suffix from preview permalink #35

Closed roborourke closed 3 years ago

roborourke commented 3 years ago

Not sure if this was intentionally missed so will wait for your input here.

I think in the strip_cloned() function signature we might need to remove the WP_Post type hint too because the result of get_post() or the post object passed to it might not always be a WP_Post object, it'd be better to do a check and avoid the potential fatal error.

roborourke commented 3 years ago

If this is needed then we should tag 1.4.1 with the update.

jazzsequence commented 3 years ago

I wasn't having issues with the preview when I tested locally because the preview has the post ID in the URL. Were you seeing something different?