mirror of
https://github.com/typecho/typecho.git
synced 2025-03-22 10:59:41 +01:00
给页面增加自定义字段
This commit is contained in:
parent
baa324c639
commit
ee9958def5
@ -1,7 +1,7 @@
|
||||
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<?php
|
||||
$fields = isset($post) ? $post->getFieldItems() : $page->getFieldItems();
|
||||
$defaultFields = isset($post) ? $post->getDefaultFieldItems() : $post->getDefaultFieldItems();
|
||||
$defaultFields = isset($post) ? $post->getDefaultFieldItems() : $page->getDefaultFieldItems();
|
||||
?>
|
||||
<section id="custom-field" class="typecho-post-option<?php if (empty($defaultFields) && empty($fields)): ?> fold<?php endif; ?>">
|
||||
<label id="custom-field-expand" class="typecho-label"><i class="i-caret-right"></i> <?php _e('自定义字段'); ?></label>
|
||||
|
@ -38,7 +38,7 @@ Typecho_Widget::widget('Widget_Contents_Page_Edit')->to($page);
|
||||
<textarea style="height: <?php $options->editorSize(); ?>px" autocomplete="off" id="text" name="text" class="w-100 mono"><?php echo htmlspecialchars($page->text); ?></textarea>
|
||||
</p>
|
||||
|
||||
<?php Typecho_Plugin::factory('admin/write-page.php')->content($page); ?>
|
||||
<?php include 'custom-fields.php'; ?>
|
||||
<p class="submit clearfix">
|
||||
<span class="right">
|
||||
<input type="hidden" name="cid" value="<?php $page->cid(); ?>" />
|
||||
@ -49,6 +49,8 @@ Typecho_Widget::widget('Widget_Contents_Page_Edit')->to($page);
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<?php Typecho_Plugin::factory('admin/write-page.php')->content($page); ?>
|
||||
</div>
|
||||
<div id="edit-secondary" class="col-mb-12 col-tb-3" role="complementary">
|
||||
<ul class="typecho-option-tabs clearfix">
|
||||
@ -141,6 +143,7 @@ if (!$plugged) {
|
||||
}
|
||||
|
||||
include 'file-upload-js.php';
|
||||
include 'custom-fields-js.php';
|
||||
Typecho_Plugin::factory('admin/write-page.php')->bottom($page);
|
||||
include 'footer.php';
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user