一样是出现在 WordPress 2.2 的问题。
当我要在增添“类别”时,发现
“You don’t have permission to do that” (没此权利执行)
解决方案如下:
1. 打开 wp-includes/pluggable 并寻找这一段
$cookie = explode(‘; ‘, urldecode(empty($_POST[‘cookie’]) ? $_GET[‘cookie’] : $_POST[‘cookie’])); // AJAX scripts must pass cookie=document.cookie
foreach ( $cookie as $tasty ) {
if ( false !== strpos($tasty, USER_COOKIE) )
$user = substr(strstr($tasty, ‘=’), 1);
if ( false !== strpos($tasty, PASS_COOKIE) )
$pass = substr(strstr($tasty, ‘=’), 1);
}
* WordPress 2.1 – 第 244 到 250 行。
* WordPress 2.2 – 第 294 到 300 行。
2. 取代为
$user = $_COOKIE[USER_COOKIE];
$pass = $_COOKIE[PASS_COOKIE];
Leave a reply