@@ -27,13 +27,13 @@ public static function activate()
2727 {
2828 Helper::addRoute ('Morecho_archive_page ' , '/archive/ ' , 'Widget_Archive ' , 'render ' );
2929 Typecho_Plugin::factory ('Widget_Archive ' )->handle = array ('MorechoCore_Plugin ' , 'archive ' );
30- Typecho_Plugin::factory ('admin/header.php ' )->header = array ('MorechoCore_Plugin ' , 'header ' );
31- Typecho_Plugin::factory ('admin/footer.php ' )->end = array ('MorechoCore_Plugin ' , 'footer ' );
32- Typecho_Plugin::factory ('Widget_Abstract_Contents ' )->markdown = array ('MorechoCore_Plugin ' , 'markdown ' );
33- Typecho_Plugin::factory ('Widget_Abstract_Comments ' )->markdown = array ('MorechoCore_Plugin ' , 'markdown_safemod ' );
34- Typecho_Plugin::factory ('admin/editor-js.php ' )->markdownEditor = array ('MorechoCore_Plugin ' , 'markdown_editor ' );
35- Typecho_Plugin::factory ('admin/write-post.php ' )->richEditor = array ('MorechoCore_Plugin ' , 'editor ' );
36- Typecho_Plugin::factory ('admin/write-page.php ' )->richEditor = array ('MorechoCore_Plugin ' , 'editor ' );
30+ // Typecho_Plugin::factory('admin/header.php')->header = array('MorechoCore_Plugin', 'header');
31+ // Typecho_Plugin::factory('admin/footer.php')->end = array('MorechoCore_Plugin', 'footer');
32+ // Typecho_Plugin::factory('Widget_Abstract_Contents')->markdown = array('MorechoCore_Plugin', 'markdown');
33+ // Typecho_Plugin::factory('Widget_Abstract_Comments')->markdown = array('MorechoCore_Plugin', 'markdown_safemod');
34+ // Typecho_Plugin::factory('admin/editor-js.php')->markdownEditor = array('MorechoCore_Plugin', 'markdown_editor');
35+ // Typecho_Plugin::factory('admin/write-post.php')->richEditor = array('MorechoCore_Plugin', 'editor');
36+ // Typecho_Plugin::factory('admin/write-page.php')->richEditor = array('MorechoCore_Plugin', 'editor');
3737 }
3838
3939 /**
@@ -113,49 +113,6 @@ public static function footer()
113113 $ options = Helper::options ();
114114 echo '<script src=" ' .$ options ->pluginUrl .'/MorechoCore/script.js"></script> ' ;
115115 }
116-
117- /**
118- * 使用 Parsedown 解析
119- *
120- * @access public
121- * @return void
122- */
123- public static function markdown ($ text )
124- {
125- require_once dirname (__FILE__ ) . '/ParsedownExtend.php ' ;
126- return ParsedownExtend::instance ()
127- ->setBreaksEnabled (true )
128- ->text ($ text );
129- }
130-
131- /**
132- * 使用 Parsedown 解析(开启安全模式)
133- *
134- * @access public
135- * @return void
136- */
137- public static function markdown_safemod ($ text )
138- {
139- require_once dirname (__FILE__ ) . '/ParsedownExtend.php ' ;
140- return ParsedownExtend::instance ()
141- ->setSafeMode (true )
142- ->setBreaksEnabled (true )
143- ->text ($ text );
144- }
145-
146- /**
147- * 修改markdown编辑器
148- *
149- * @access public
150- * @return void
151- */
152- public static function editor ($ page )
153- {
154- Typecho_Widget::widget ('Widget_Options ' )->to ($ options );
155- list ($ prefixVersion , $ suffixVersion ) = explode ('/ ' , $ options ->version );
156- $ options ->theme_folder_name = Typecho_Widget::widget ('Widget_Options ' )->plugin ('MorechoCore ' )->theme_folder_name ;
157- require dirname (__FILE__ ) . '/editor-js.php ' ;
158- }
159116
160117 /**
161118 * archive页面支持
0 commit comments