added comments shortcode and form for it

This commit is contained in:
2026-03-11 20:21:28 +01:00
parent fc871dcd75
commit c7b5d52197
5 changed files with 87 additions and 5 deletions

View File

@@ -42,6 +42,7 @@ class Partnerexpo_Core_Public {
$this->version = $version;
add_shortcode( 'partnerexpo_searchbox', [ $this, 'searchbox_shortcode' ] );
add_shortcode( 'partnerexpo_comment_section', [ $this, 'comments_shortcode' ] );
}
public function searchbox_shortcode() {
@@ -55,6 +56,17 @@ class Partnerexpo_Core_Public {
return ob_get_clean();
}
public function comments_shortcode() {
wp_enqueue_style( $this->plugin_name . '-comments-css' );
wp_enqueue_script( $this->plugin_name . '-comments-js' );
// wp_enqueue_style( $this->plugin_name . '-multiselect-css' );
// wp_enqueue_script( $this->plugin_name . '-multiselect-js' );
ob_start();
include plugin_dir_path( __FILE__ ) . 'partials/partnerexpo-core-public-comments.php';
return ob_get_clean();
}
public function register_endpoint() {
register_rest_route('pexpo/v1', '/query', [
'methods' => 'GET',