wordpress2.2提速
时间:2008-01-21 来源:yuyii
wordpress2.2用下来发觉在写文章和修改文章页面时,速度极慢。找了下原因,去掉个功能就能大大提高速度了:
wp-includes/script-loader.php 30行附近,将如下代码注释掉
...
/*
* 将失去编辑时的可视化功能
*
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20070326' );
$mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php');
$this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20070225' );
*/
...
这个是速度影响最大的东西,然后还能稍做优化,同样是这个script-loader.php文件,去掉编辑页面的一些没用的面板拖拉功能,66行左右:
...
/*
* 失去编辑和写页面时的面板拖拉功能
*
switch ( $pagenow ) :
case 'post.php' :
case 'post-new.php' :
$man = 'postmeta';
break;
case 'page.php' :
case 'page-new.php' :
$man = 'pagemeta';
break;
case 'link-add.php' :
case 'link.php' :
$man = 'linkmeta';
break;
endswitch;
*/
...
另外还需要做个改动,否则当编辑已经写好的文章时,会自动的加上类似br等各种html tag
在wp-includes/general-template.php文件的894行左右:
//使编辑时的文本自动过滤功能实效,可能会引起安全隐患
//$the_editor_content = apply_filters('the_editor_content', $content);
$the_editor_content = $content;
相关阅读 更多 +
排行榜 更多 +