[WordPress] 外掛分享: Code Injection

首頁外掛目錄 › Code Injection
WordPress 外掛 Code Injection 的封面圖片
10+
安裝啟用
尚無評分
883 天前
最後更新
問題解決
WordPress 4.5.0+ v2.5.0 上架:2019-02-13

內容簡介

使用方法

啟用外掛後,您將會在儀表板選單中看到「Code」按鈕。

創建一個新的代碼。
從清單中複製 CID。
將短代碼「[inject id='#']」放入文章或頁面中。
將「#」替換為 CID。

將 CI widget 拖曳到所需的側邊欄區域中。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.5.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Code Injection」→ 直接安裝(推薦)

原文外掛簡介

This plugin allows you to effortlessly create custom ads for your website. Inject code snippets in HTML, CSS, and JavaScript, write and run custom plugins on-the-fly, and take your website’s capabilities to the next level.
Usage
To use this plugin, follow these steps:
* Activate the plugin from the Plugins menu in your dashboard.
* Click on the Code button in the dashboard menu to create and manage your code snippets.
* To insert a code snippet in your post or page, copy the CID (code identifier) from the list and use the shortcode [inject id='#'], where # is the CID.
* To insert a code snippet in your sidebar, drag and drop the CI widget into the desired widget area and select the code snippet from the dropdown menu.
Advanced Usage
If you want to run PHP scripts in your website, you need to do some extra steps:
* Go to Settings > Code Injection and create a strong activator key. This key will allow you to run PHP scripts safely and securely.
* To insert a PHP script in your post or page, use the shortcode [unsafe key='#'], where # is the activator key you created before. Write your PHP script between the opening and closing tags of the shortcode.
* To run a PHP script as a plugin, check the “as plugin” checkbox when creating or editing a code snippet. This will execute your PHP script on every page load.
Warning
Be careful when running PHP scripts, as they can cause errors or conflicts with other plugins or themes. If you encounter any problems, you can disable the code snippet from the database by changing its status to “draft” in the wp_posts table.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon