Explorar o código

Update pico.php

Adding    				'description' => isset($page_meta['description']) ? $page_meta['description'] : '',
 to    $data=array  allows for use of the description meta in place of the excerpt.
Snip1 %!s(int64=11) %!d(string=hai) anos
pai
achega
395011c770
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      lib/pico.php

+ 3 - 0
lib/pico.php

@@ -247,6 +247,9 @@ class Pico {
 				'date_formatted' => isset($page_meta['date']) ? date($config['date_format'], strtotime($page_meta['date'])) : '',
 				'date_formatted' => isset($page_meta['date']) ? date($config['date_format'], strtotime($page_meta['date'])) : '',
 				'content' => $page_content,
 				'content' => $page_content,
 				'excerpt' => $this->limit_words(strip_tags($page_content), $excerpt_length)
 				'excerpt' => $this->limit_words(strip_tags($page_content), $excerpt_length)
+				//this addition allows the 'description' meta to be picked up in content areas... specifically to replace 'excerpt'
+				'description' => isset($page_meta['description']) ? $page_meta['description'] : '',
+
 			);
 			);
 
 
 			// Extend the data provided with each page by hooking into the data array
 			// Extend the data provided with each page by hooking into the data array