开发者 | Arthur Gareginyan |
---|---|
更新时间 | 2022年1月25日 05:33 |
捐献地址: | 去捐款 |
PHP版本: | 5.6 及以上 |
WordPress版本: | 5.9 |
版权: | GPL3 |
版权网址: | 版权信息 |
Plugins
" -> "Add New
".Plugins
" tab./wp-content/plugins/
).Plugins
" tab.PHP Inserter
" menu item will appear in the "Settings
" section of Admin Area. Click on it in order to view the plugin settings page.
More help installing pluginsA. Sorry, this plugin is available for use only on self-hosted (wordpress.ORG) websites.
A. Yes. This plugin is ready for translation and has already been translated into several languages. But If your language is not available then you can make one. It is also possible that not all existing translations are up-to-date or correct, so you are welcome to make corrections. Many of plugin users would be delighted if you share your translation with the community. Thanks for your contribution!
If you want to help translate this plugin, please use the POT file that is included and placed in the languages
folder to create a translation PO file. Just send the PO file to us and we will include this translation within the next plugin update.
A. Simply go to the plugin settings page, place your custom PHP code in the code editor field, switch the toggle to the "ON" position and click the "Save changes" button. Enjoy the result of applying your custom PHP code. It's that simple!
You can find the plugin settings page at "WordPress Admin Area
" -> "Settings
" -> "PHP Inserter
".
A. Yes. But you need to do it properly, like this: `function my_custom_html_code() { // Print the custom HTML code echo 'YOUR CUSTOM HTML CODE HERE'; } add_action( 'wp_head', 'my_custom_html_code' );`
A. We don't limit the number of characters.
A. Absolutely not. This plugin is configurable entirely from the plugin settings page that you can find in the Admin Area of your WordPress website.
A. This plugin can be configured with no knowledge of HTML or CSS, using an easy-to-use plugin settings page. But you need to know the HTML or CSS in order to add/remove/modify the HTML or CSS code by using this plugin.
A. For now, this plugin does not have an option to apply the custom PHP code only on specific pages. We plan to add this feature soon. But for now in order to apply your custom PHP code only on specific pages of your website, you need to wrap your custom PHP code in a PHP function that will determine the page you want. You need something like this: `function my_custom_php_code() { // Stop the function if this is not the Home page of website if ( !is_home() ) { return; } // YOUR CUSTOM PHP CODE HERE } my_custom_php_code();`
A. Here are a few of the most likely causes of the error message:
A. It happens that your custom PHP code that you insert on the plugin page does not work, even if an error message does not appear. Here are a few of the most likely causes of the issue:
A. As with every plugin, it's possible that things don't work. It's impossible to tell what could be wrong exactly. The most common reason for this is a web browser’s cache. Every web browser stores a cache of the websites you visit (pages, images, and etc.) to reduce bandwidth usage and server load. This is called the browser’s cache. Clearing your browser’s cache may solve the problem. If you post a support request in the plugin's support forum on WordPress.org, we'd be happy to give it a look and try to help out. Please include as much information as possible, including a link to your website where the problem can be seen.
A. This plugin has a built-in functions for checking the custom code for syntax errors, duplicate functions names, and etc. But plugin is not perfect, so there are times when the entered custom code causes the error and white screen (WSOD). This is due to the fact that your custom code has a syntax error that this plugin could not detect. When this happens with you, please perform the following steps.
wp-content/plugins/my-custom-functions/
. Please contact your web hosting company to get help if you can't find this folder.START
to STOP
. This will stop the execution of your custom code.Settings
-> PHP Inserter
.STOP
to START
and you're done!Database
-> Table "wp_options
" -> Option "spacexchimp_p001_settings
" -> "option_value
".
We are already working on a feature to automatically stop the execution of users custom PHP code for cases when this plugin could not detect the error, and this caused the inaccessibility of the website.
A. This plugin can not cause such problem. More likely, the problem are related to the settings of the website. It could just be a cache, so please try to clear your website's cache (may be you using a caching plugin, or some web service such as the CloudFlare) and then the cache of your web browser. Also please try to re-login to the website, this too can help.
A. Bug reports are very welcome! Please visit our contact page and report. Thank you!
A. Any suggestions are very welcome! Please visit our contact page and share. Thank you!
A. Yes, any contributions are very welcome! Please visit our donation page. Thank you!
htmlentities()
instead of esc_attr()
for prevent converting characters to HTML entities.