diff --git a/var/Widget/Contents/Page/Edit.php b/var/Widget/Contents/Page/Edit.php index 9b641f0a..490b5552 100644 --- a/var/Widget/Contents/Page/Edit.php +++ b/var/Widget/Contents/Page/Edit.php @@ -20,6 +20,14 @@ */ class Widget_Contents_Page_Edit extends Widget_Contents_Post_Edit implements Widget_Interface_Do { + /** + * 自定义字段的hook名称 + * + * @var string + * @access protected + */ + protected $themeCustomFieldsHook = 'themePageFields'; + /** * 执行函数 * diff --git a/var/Widget/Contents/Post/Edit.php b/var/Widget/Contents/Post/Edit.php index 9d2d2aeb..04117c5c 100644 --- a/var/Widget/Contents/Post/Edit.php +++ b/var/Widget/Contents/Post/Edit.php @@ -20,6 +20,14 @@ */ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widget_Interface_Do { + /** + * 自定义字段的hook名称 + * + * @var string + * @access protected + */ + protected $themeCustomFieldsHook = 'themePostFields'; + /** * 将tags取出 * @@ -489,6 +497,10 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg if (function_exists('themeFields')) { themeFields($layout); } + + if (function_exists($this->themeCustomFieldsHook)) { + call_user_func($this->themeCustomFieldsHook, $layout); + } } $items = $layout->getItems();