
把以下代码添加到主题目录functions.php文件里面判断如果是中文就自动改成md5的储存名 Codefunctionupload_file($filename){$parts=explode('.',$filename);$filename=array_shift($parts);$extension=array_pop($parts);foreach((array)$partsas$part)$filename.='.'.$part;if(preg_match('/[一-龥]/u',$filename)){$filename=md5($filename);}$filename.='.'.$extension;return$filename;}add_filter('sanitize_file_name'...

functionlianyue_comment_post($incoming_comment){$http='/[href="|rel="nofollow"|http:\/\/|<\/a>]/u';if(preg_match($http,$incoming_comment['comment_content'])){wp_die("万恶的发贴机!");}return($incoming_comment);}add_filter('preprocess_comment','lianyue_comment_post');以上的代码不允许<a随便href="或者rel="nofollow"或者http://当然你也可以换成自己的代码也可以添加其他的代码也可以设置成必须包含指...

首先给主题functions.php写入代码当然你也可以无视这个代码这是php写入Cookie的代码可以直接点击的时候指定风格/*wordpressphp切换风格*/add_action('init','style_css');functionstyle_css(){$style_css=$_GET['style'];if($style_css){setcookie("style",$style_css,time()+604800);if(isset($_GET['js'])){echo$style_css;}if(strpos($_SERVER['HTTP_REFERER'],get_option('home'))!==false){header("L...

1.找到single.php输出文件的the_content()代码替换成下面的代码当然这有bug只要是带有该文字自动替换包括0.0连接地址图片地址什么的希望有人能够完善$content=get_the_content('Readmore»');$content=apply_filters('the_content',$content);$content=str_replace(']]>',']]>',$content);$tags=wp_get_post_tags($post->ID);foreach($tagsas$tag){$taglink='<spanclass="tag-link"><ahref="'.g...