The Feed templates are located in the /wp-includes/feed-{type}.php files and include formats for rdf, rss, rss2 and atom. 这儿是一些默认的 rss 模板,定制自己的模板时可以参照。
版本是 3.2.1 在原本的服务器上运行无错,移植到新的服务器就有这个问题,大概就是服务器配置的缘故了。 官方上也相关的文章。http://wordpress.org/support/topic/25-imagemedia-uploader-problems 是apache Mod_Security 的缘故。如果你能够修改你服务器的httpd.conf文件的话,删除里面关于mod_security部分就可以了。不过多数wordpress玩家是没有权限修改这个文件的,那就只好修改.htaccess文件了。在.htaccess文件里面加上一行: <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> 这样就可以关闭 Mod_Security。
UTF8 中文截取 其中对字符串预先 __() 处理,可以从 qtranslate 中取出当前语言部分然后进行截取。 function utf8Substr($str, $from, $len) { if ($len == 0){ return __($str); }else{ return preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$from.'}'. '((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$len.'}).*#s', '$1',__($str)); } } //use utf8Substr($recent["post_title"],0,14); function utf8_trim($str) { $len = strlen($str); for ($i=strlen($str)-1; $i>=0; $i-=1){ $hex .= ' '.ord($str[$i]); $ch = ord($str[$i]); if (($ch & 128)==0) return(substr($str,0,$i)); if (($ch & [...]
This piece of code should do it for you. Place this code in your theme’s functions.php file. You can add customizations to the custom_password_form() function – just don’t use print or echo – the function must return a value. <?php add_filter( 'the_password_form', 'custom_password_form' ); function custom_password_form() { global $post; $label = 'pwbox-'.( empty( $post->ID ) [...]
Changes double line-breaks in the text into HTML paragraphs (<p>…</p>). 把文章里的 2次换行 格式化成 html 段落(<p>…</p>). $foo (string) (required) The text to be formatted. 需要格式化的文章。 Default: None $br (boolean or integer) (optional) Preserve line breaks. When set to true, any line breaks remaining after paragraph conversion are converted to HTML . Line breaks within script and [...]

Posted on 9, 十一











