preview_post_link WordPress Filter Hook
The preview_post_link Wordpress hook allows you to create a link to a post that will allow you to preview the post before it is published. This is useful if you want to make sure that the post looks the way you want it to before you publish it.
apply_filters( 'preview_post_link', string $preview_link , WP_Post $post ) #
Filters the URL used for a post preview.
Parameters
- $preview_link
(string)URL used for the post preview.
- $post
(WP_Post)Post object.
Source
Changelog
Version | Description |
---|---|
4.0.0 | Added the $post parameter. |
2.0.5 | Introduced. |