Skip to content

Latest commit

 

History

History
49 lines (29 loc) · 2.26 KB

README.md

File metadata and controls

49 lines (29 loc) · 2.26 KB

WP Comment Preview

Build Status Scrutinizer Code Quality Code Coverage

This plugin will show real comment preview to the users, it's also supporting jetpack's markdown.

PHPCS Standard used: WordPress-Extra


Steps to configure this plugin in your site:

Activate jetpack's markdown module.

Activate Jetpack's markdown module

Activate jetpack markdown for comments settings.

Activate jetpack markdown for comments settings

Activate comment preview plugin now.

Activate comment preview plugin

Comment's form and preview of comment.

Comment's form and preview of comment


Support for Custom Post Type?

Yes, this plugin is giving support for custom post types, for that you can use below filter.

  • wp_comment_preview_allowed_post_types: Returning array of post types will support those post types.

NOTE: This plugin works with WordPress's default comment form only.

Available Endpoint

Convert Markdown comment to readable format ( POST request )

  • https://example.com/wp-json/wp_comment_preview/v1/preview
    • Params:
      • comment - Comment text.
      • format - Whether to preview markdown or plain text - Two values it will take plain OR markdown.
      • author - For non-logged in user you can send author's name here, logged-in users will automatically get their name in that comment.