Skip to content

Commit ad1f9f2

Browse files
committed
optimize
1 parent 299e81a commit ad1f9f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static function deactivate()
4545
public static function config(Typecho_Widget_Helper_Form $form)
4646
{
4747

48-
$description = new Typecho_Widget_Helper_Form_Element_Textarea('description', NULL, NULL, _t('随机副标题,一行一个'), _t('留空取当前副标题'));
48+
$description = new Typecho_Widget_Helper_Form_Element_Textarea('description', NULL, Helper::options()->description, _t('需要变化的文本,一行一个'), _t('留空取当前站点描述'));
4949
$form->addInput($description);
5050

5151
$last_string = new Typecho_Widget_Helper_Form_Element_Hidden('last_string', NULL, NULL);
@@ -79,7 +79,7 @@ public static function change_description($class)
7979
public static function get_random_string(){
8080
$config = Helper::options()->plugin('RandomDescription');
8181
if(empty($config->description)){
82-
return Helper::options()->description;
82+
return Helper::options()->description;
8383
}
8484
if(time() - $config->last_time > $config->interval){
8585
$string = self::gen_string_from($config->description);

0 commit comments

Comments
 (0)