浏览代码

Merge 66ef5a72f61e6966eb9f8bf1c8760220c37e932e into 9616d902e0af089bb6faf0fb67a96ccf7bcabc17

Arnold Daniels 11 年之前
父节点
当前提交
5ac41ede71
共有 2 个文件被更改,包括 10 次插入2 次删除
  1. 4 1
      lib/pico.php
  2. 6 1
      plugins/pico_plugin.php

+ 4 - 1
lib/pico.php

@@ -58,8 +58,11 @@ class Pico {
 
 		$meta = $this->read_file_meta($content);
 		$this->run_hooks('file_meta', array(&$meta));
+                
+		$this->run_hooks('before_parse_content', array(&$content));
 		$content = $this->parse_content($content);
-		$this->run_hooks('content_parsed', array(&$content));
+		$this->run_hooks('after_parse_content', array(&$content));
+		$this->run_hooks('content_parsed', array(&$content)); // Backwards compatibility
 		
 		// Get all the pages
 		$pages = $this->get_pages($settings['base_url'], $settings['pages_order_by'], $settings['pages_order'], $settings['excerpt_length']);

+ 6 - 1
plugins/pico_plugin.php

@@ -54,7 +54,12 @@ class Pico_Plugin {
 		
 	}
 	
-	public function content_parsed(&$content)
+	public function before_parse_content(&$content)
+	{
+		
+	}
+	
+	public function after_parse_content(&$content)
 	{
 		
 	}