fix
fix Plugin name fix Class name fix version number Signed-off-by: Dylan Wu <i@dylanwu.space>
This commit is contained in:
12
Plugin.php
12
Plugin.php
@@ -2,10 +2,10 @@
|
|||||||
/**
|
/**
|
||||||
* 页面黑白显示插件(支持时间段、指定日期、每月/每年循环)
|
* 页面黑白显示插件(支持时间段、指定日期、每月/每年循环)
|
||||||
*
|
*
|
||||||
* @package GrayModePlugin
|
* @package GrayMode
|
||||||
* @author DylanWu
|
* @author DylanWu & linhaicaoyuan
|
||||||
* @version 1.1.1
|
* @version 0.0.3
|
||||||
* @link https://your.site
|
* @link https://blog.lhcy.org/about.html$0
|
||||||
*/
|
*/
|
||||||
class GrayMode_Plugin implements Typecho_Plugin_Interface
|
class GrayMode_Plugin implements Typecho_Plugin_Interface
|
||||||
{
|
{
|
||||||
@@ -19,7 +19,7 @@ class GrayMode_Plugin implements Typecho_Plugin_Interface
|
|||||||
public static function config(Typecho_Widget_Helper_Form $form)
|
public static function config(Typecho_Widget_Helper_Form $form)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$options = Typecho_Widget::widget('Widget_Options')->plugin('GrayModePlugin');
|
$options = Typecho_Widget::widget('Widget_Options')->plugin('GrayMode');
|
||||||
// 可选:读取配置值
|
// 可选:读取配置值
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
// 不处理配置读取错误
|
// 不处理配置读取错误
|
||||||
@@ -50,7 +50,7 @@ class GrayMode_Plugin implements Typecho_Plugin_Interface
|
|||||||
|
|
||||||
public static function render($archive)
|
public static function render($archive)
|
||||||
{
|
{
|
||||||
$options = Typecho_Widget::widget('Widget_Options')->plugin('GrayModePlugin');
|
$options = Typecho_Widget::widget('Widget_Options')->plugin('GrayMode');
|
||||||
|
|
||||||
$start = $options->startTime ?? '00:00';
|
$start = $options->startTime ?? '00:00';
|
||||||
$end = $options->endTime ?? '23:59';
|
$end = $options->endTime ?? '23:59';
|
||||||
|
Reference in New Issue
Block a user