|
1 |
| -# WP Comment Preview - (In Progress) |
2 |
| -Plugin for WordPress Comment Preview |
| 1 | +# WP Comment Preview |
3 | 2 |
|
4 | 3 | [](https://app.travis-ci.com/vishalkakadiya/comment-preview)
|
5 | 4 | [](https://scrutinizer-ci.com/g/vishalkakadiya/comment-preview/?branch=main)
|
6 | 5 | [](https://scrutinizer-ci.com/g/vishalkakadiya/comment-preview/?branch=main)
|
| 6 | + |
| 7 | +This plugin will show real comment preview to the users, it's also supporting jetpack's markdown. |
| 8 | + |
| 9 | +#### Steps to configure this plugin in your site: |
| 10 | + |
| 11 | +- Activate jetpack's markdown module. |
| 12 | +-  |
| 13 | + |
| 14 | +- Activate jetpack markdown for comments settings. |
| 15 | +-  |
| 16 | + |
| 17 | +- Activate comment preview plugin now. |
| 18 | +-  |
| 19 | + |
| 20 | +- Comment's form and preview of comment. |
| 21 | +-  |
| 22 | + |
| 23 | +#### Support for Custom Post Type? |
| 24 | + |
| 25 | +Yes, this plugin is giving support for custom post types, for that you can use below filter. |
| 26 | +- `wp_comment_preview_allowed_post_types`: Returning array of post types will support those post types. |
| 27 | + |
| 28 | +**NOTE:** This plugin works with WordPress's default comment form only. |
| 29 | + |
| 30 | +#### Available Endpoint |
| 31 | + |
| 32 | +**Get single post ( POST request )** |
| 33 | +- http://example.com/wp-json/wp_comment_preview/v1/preview |
| 34 | + - Params: |
| 35 | + - `comment` - Comment text. |
| 36 | + - `format` - Whether to preview markdown or plain text - Two values it will take `plain` OR `markdown`. |
| 37 | + - `author` - For non-logged in user you can send author's name here, logged-in users will automatically get their name in that comment. |
0 commit comments