This commit is contained in:
fen 2013-10-28 16:48:41 +08:00
commit f16ab0a337
2 changed files with 9 additions and 1 deletions

View File

@ -89,7 +89,7 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
<ul>
<?php if ($user->pass('editor', true)): ?>
<li><input id="publish" value="publish" name="visibility" type="radio"<?php if (($post->status == 'publish' && !$post->password) || !$post->status) { ?> checked="true"<?php } ?> /> <label for="publish"><?php _e('公开'); ?></label></li>
<li><input id="password" value="password" name="visibility" type="radio"<?php if ($post->password) { ?> checked="true"<?php } ?> /> <label for="password">密码保护 <input type="text" id="post-password" name="post-password" class="text-s" value="<?php $post->password(); ?>" size="16" /></label></li>
<li><input id="password" value="password" name="visibility" type="radio"<?php if ($post->password) { ?> checked="true"<?php } ?> /> <label for="password">密码保护 <input type="text" id="post-password" name="password" class="text-s" value="<?php $post->password(); ?>" size="16" /></label></li>
<li><input id="private" value="private" name="visibility" type="radio"<?php if ($post->status == 'private') { ?> checked="true"<?php } ?> /> <label for="private">私密</label></li>
<?php endif; ?>
<li><input id="waiting" value="waiting" name="visibility" type="radio"<?php if (!$user->pass('editor', true) || $post->status == 'waiting') { ?> checked="true"<?php } ?> /> <label for="waiting">待审核</label></li>

View File

@ -83,6 +83,10 @@ class Widget_Abstract_Contents extends Widget_Abstract
*/
protected function ___excerpt()
{
if ($this->hidden) {
return $this->text;
}
$content = $this->pluginHandle(__CLASS__)->trigger($plugged)->excerpt($this->text, $this);
if (!$plugged) {
if ($this->isMarkdown) {
@ -107,6 +111,10 @@ class Widget_Abstract_Contents extends Widget_Abstract
*/
protected function ___content()
{
if ($this->hidden) {
return $this->text;
}
$content = $this->pluginHandle(__CLASS__)->trigger($plugged)->content($this->text, $this);
if (!$plugged) {