Sfoglia il codice sorgente

:bug: processing some special characters on the frontend | #152

tags/0.9.0
J 4 anni fa
parent
commit
864d8890df

+ 7
- 0
plugins/cia-endpoints/cia-end-points.php Vedi File

@@ -18,6 +18,7 @@ if ( ! defined( 'WPINC' ) ) { die; }
18 18
 
19 19
 require_once('includes/all-types.php');
20 20
 require_once('includes/class.make-endpoint.php');
21
+require_once('includes/class.make-terms.php');
21 22
 require_once('includes/class.make-sticky.php');
22 23
 require_once('includes/class.make-sortby.php');
23 24
 
@@ -50,6 +51,12 @@ add_action( 'rest_api_init', function () {
50 51
      */
51 52
     $sticky_controller = new Make_Sticky_Endpoint();
52 53
     $sticky_controller->register_custom_route('sticky');
54
+    
55
+    /**
56
+     * Terms endpoint
57
+     */
58
+    $terms_controller = new Make_Terms_Endpoint();
59
+    $terms_controller->register_custom_route('terms');
53 60
 
54 61
     /**
55 62
      * Craft in America custom sort_types

+ 1
- 0
plugins/cia-endpoints/includes/class.make-endpoint.php Vedi File

@@ -115,6 +115,7 @@ class Make_Endpoint_For extends WP_REST_Controller {
115 115
             $formatted = default_post_format( $post, false );
116 116
             $formatted[sticky] = get_post_meta( $post->ID, 'is_sticky', true );
117 117
             if($post->post_type == 'page') $formatted[content] = $post->post_content;
118
+            
118 119
             array_push($collection, $formatted);
119 120
         }
120 121
         wp_reset_postdata();

+ 1
- 1
vue-theme/src/components/card.vue Vedi File

@@ -21,7 +21,7 @@
21 21
                 h1.t-up.t-cntr.t-b {{ content.title }}
22 22
             p(v-if="content.end && type == 'event'" class="datetime") {{ dateFrom(content.start, type=='event') }} – {{ dateFrom(content.end, type=='event').split(',')[1] }}
23 23
             p(v-else-if="content.end" class="datetime") {{ dateFrom(content.start, type=='event') }} – {{ dateFrom(content.end, type=='event') }}
24
-            p.excerpt {{ content.excerpt }}
24
+            p(v-html="content.excerpt").excerpt
25 25
             router-link(v-if="type == 'post'" :to="`/blog/${content.slug}`")
26 26
                 p.read-more read more
27 27
             router-link(v-else :to="`/${type}/${content.slug}`")

Loading…
Annulla
Salva