Techno, travel, view, life

Main menu

Tag Archives: wordpress

Post navigation

升级到WordPress. Version 3.9，启用cos-html-cache时，在提示：
“has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in wp-includes/functions.php on line xxxx”
参考“水景一页”的“关于 WP 中提示 has_cap 的问题”文字，打开cos-html-cache.php 第216行，
将
add_options_page(‘html-cache-creator’, ‘CosHtmlCache’,8, basename(__FILE__), ‘cosHtmlOption’);
修改为
add_options_page(‘html-cache-creator’, ‘CosHtmlCache’,’manage_options’, basename(__FILE__), ‘cosHtmlOption’);
警告提示消失。

– limit = the related posts limit to be displayed
– len = if show_limitis set then it will limit the post size to $len words
– before_title = html code to add before post title
-after_title = html code to add after post title
-before_post = html code to add before post
-after_post =html code to add after post
-show_past_post = include posts that are password protected
-show_limit = limit the post text to $len words