이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

PHP Execution

설명

The PHP Execution Plugin is a WordPress plugin which allows users to write php code inside of their posts and pages. Embedded php code will be executed when the post is shown. In doing so, the plugin offers the possibility to utilize dynamic content inside of posts.

In contrast to other plugins with the same aim, this one integrates well with WordPress’ visual editor. So there is no need to turn off the visual editor in order to edit your php code.
Additionally it provides an admin section which lets administrators edit the blog users’ php execution rights easily. The plugin also automatically prevents users with no php execution rights from editing posts or pages of users with these rights. It thus fixes a possible security leak where people without php execution rights can still execute code with editing other users’ posts.

Features:

  • executes php code in your posts and pages (full, excerpts, feeds).
  • integrates well with WordPress’ visual editor. No need to turn it off.
  • write php code in the usual ” syntax in the html view of the editor.
  • admin section to edit the blog users’ php execution rights.
  • plugin automatically prevents users with no php execution rights to edit posts of users with rights to execute php code.

Project was now moved out of beta.

Further information at zehnet.de: PHP Execution Plugin home

Editing PHP code

  • php code can be edited in the html view of the editor.
  • php code is embedded into a post in the same way as you are used to: a php block begins with ”. The short open tag, i.e. ”) somewhere inside a string in your php code block. If you do so, this ending delimeter will be matched and your code will inevitably break apart. So dont write e.g.:
    some text
    <?php $test = "hello ?>"  ?>
    more text
  • Writing ‘$test = “hello ?&gt;”‘ instead will not lead to any problems.
  • Php code is not executed in the global scope. If you need to gain access to variables in the global scope you need to “import” them first with ‘global $var1, $var2;’.
  • This plugin does not evaluate every single code snippet, but the content of the post as a whole. So the following lines wont result in errors:
    <?php if ($test==true) { ?>
    The test was successful.
    <?php } else { ?>
    The test failed.
    <?php } ?>
  • When switching between html and visual view the php code is not altered in any case. All html tags, whitespaces etc. in your code are preserved.

스크린샷

  • editing in html view
  • php code in the visual wysiwyg view
  • dragging php code snippets
  • the admin section

설치

  • Download the latest version of the plugin.
  • Unzip it into the ‘/wp-content/plugins/’ folder of your WordPress installation resulting in a ‘/wp-content/plugins/php_execution/’ folder.
  • Login as administrator and activate the plugin.
  • WordPress’ tag balancing has to be turned off. It is by default. If you have enabled tag balancing, turn it off again by unchecking “WordPress should correct invalidly nested XHTML automatically” in Settings>>Writing of the admin section.
  • Optionally set PHP execution permissions in the Settings>>PHP Execution panel. By default all administrators possess the permission to execute php code.
  • As javascript code is added to the editor, you have to clear your browser cache !!! Otherwise the plugin won’t work as the code added by it simply won’t get executed. For information on how to clear the browser cache, follow this link.

FAQ

Installation Instructions
  • Download the latest version of the plugin.
  • Unzip it into the ‘/wp-content/plugins/’ folder of your WordPress installation resulting in a ‘/wp-content/plugins/php_execution/’ folder.
  • Login as administrator and activate the plugin.
  • WordPress’ tag balancing has to be turned off. It is by default. If you have enabled tag balancing, turn it off again by unchecking “WordPress should correct invalidly nested XHTML automatically” in Settings>>Writing of the admin section.
  • Optionally set PHP execution permissions in the Settings>>PHP Execution panel. By default all administrators possess the permission to execute php code.
  • As javascript code is added to the editor, you have to clear your browser cache !!! Otherwise the plugin won’t work as the code added by it simply won’t get executed. For information on how to clear the browser cache, follow this link.

후기

2017년 April 21일
This plugin was working but now it's causing conflicts with Visual Composer. When enabled all backend page content for Visual Composer disappears, rending the plugin useless on any site that uses VC
2016년 September 3일
Disappear when you change to "Visual" from "Editor" !! "Allow PHP in Posts and Pages" plugin works for me because use [php] tags instead "<?" tags
모든 5 평가 읽기

기여자 & 개발자

“PHP Execution”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “PHP Execution”(을)를 번역하십시오.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하십시오.