Explorar el Código

:fire: removed extra arg | #148

tags/0.9.0
J hace 4 años
padre
commit
1aedc01204
Se han modificado 1 ficheros con 4 adiciones y 8 borrados
  1. 4
    8
      plugins/cia-endpoints/includes/formats.php

+ 4
- 8
plugins/cia-endpoints/includes/formats.php Ver fichero

74
     return $filtered;
74
     return $filtered;
75
 }
75
 }
76
 
76
 
77
-function minimal_post_format( $item, $include_excerpt ) {
77
+function minimal_post_format( $item ) {
78
     $filtered = [];
78
     $filtered = [];
79
     $filtered[id] = $item->ID;
79
     $filtered[id] = $item->ID;
80
     $filtered[slug] = $item->post_name;
80
     $filtered[slug] = $item->post_name;
81
     $filtered[type] = $item->post_type;
81
     $filtered[type] = $item->post_type;
82
     $filtered[title] = $item->post_title;
82
     $filtered[title] = $item->post_title;
83
-    $filtered[date] = $item->post_date;
84
     
83
     
85
     $filtered[thumb] = get_the_post_thumbnail_url($item, 'medium');
84
     $filtered[thumb] = get_the_post_thumbnail_url($item, 'medium');
86
     if(!$filtered[thumb]) {
85
     if(!$filtered[thumb]) {
92
     // because they appear on the episode page
91
     // because they appear on the episode page
93
     $posts_with_excerpt = ['artist'];
92
     $posts_with_excerpt = ['artist'];
94
     if( in_array($item->post_type, $posts_with_excerpt) ) {
93
     if( in_array($item->post_type, $posts_with_excerpt) ) {
95
-        $filtered[excerpt] = $item->post_excerpt;
96
-        if(!$filtered[excerpt]) {
97
-            $excerpt = get_the_excerpt($item);
98
-            $filtered[excerpt] = wp_specialchars_decode($excerpt);
99
-        }
94
+        $excerpt = get_the_excerpt($item);
95
+        $filtered[excerpt] = wp_specialchars_decode($excerpt);
100
     }
96
     }
101
 
97
 
102
-    // Always include a date for date based types
98
+    // Always include a date for date based
103
     $posts_with_date = ['exhbition', 'event'];
99
     $posts_with_date = ['exhbition', 'event'];
104
     if( in_array($item->post_type, $posts_with_date) ) {
100
     if( in_array($item->post_type, $posts_with_date) ) {
105
         $filtered[start] = get_post_meta($item->ID, $item->post_type . '-start-time', true);
101
         $filtered[start] = get_post_meta($item->ID, $item->post_type . '-start-time', true);

Loading…
Cancelar
Guardar