added comments shortcode and form for it
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user