WordPress Exec-php

投稿者:

デフォルトでは管理者権限でのみ実行可能。
すべてのユーザーで実行する場合は
plugin/exec-php/include/runtime.php のfilter_user_contentメソッド内の権限チェックをコメントに
function filter_user_content($content)
{
global $post;
/*
// check whether the article author is allowed to execute PHP code
if (!isset($post) || !isset($post->post_author))
return $content;
$poster = new WP_User($post->post_author);
if (!$poster->has_cap(ExecPhp_CAPABILITY_EXECUTE_ARTICLES))
return $content;
*/
return $this->eval_php($content);
}

Thank you for reading this post, don't forget to subscribe!