這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

ACF Code Field

描述

Code field for Advanced Custom Fields. Works with ACF versions 4 (free) and 5 (Pro). Based on the Codemirror javascript plugin.

Plugin requires ACF free or pro to be installed to function.

螢幕截圖

  • Settings page screenshot
  • Editor screenshot with the Monokai theme enabled.

安裝

  1. Upload the plugin files to the /wp-content/plugins/acf-code-field directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. In the ACF custom fields manager, the option for the code field will be under the “Field Type” drop down under “Code Tools”

常見問題

What version fo ACF does this work with?

Currently the plugin works with the free (v4) and PRO (v5) versions.

Does the plugin escape or sanitize any data?

It doesn’t. Though Codemirror has several settings to escape data, the plugin doesn’t implement them

評價

2018年9月7日
Highlighting works fine. But has one issue, breaks Content editors Text Highlighting and formatting when used together with https://wordpress.org/plugins/html-editor-syntax-highlighter/
2018年2月14日
Easy to setup and it works out of the box. Maybe you could add the field type (acf_code_field) and the other possible attributes to the description.
閱讀全部11個評價

貢獻者及開發者

“ACF Code Field” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 ACF Code Field 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.8

  • Fix up CodeMirror to update correctly with Gutenberg/new Editor 🎉💪

1.7

  • Using WP Core’s built-in CodeMirror JavaScript and CSS if > WP 4.9

1.6.4

  • Updating tested up to 4.9

1.6.3

  • Readme.txt fix for new UI
  • CSS fix for flexible content areas

1.6.2

  • Loading in all CodeMirror css themes as options for editor colors
  • Adding PHP support to the v4 plugin
  • Updating codemirror to version 5.23

1.6.1

  • Bumping tested up to version

1.6

  • Improvement: Adding PHP language editor support
  • Improvement: Making height automatically grow to the height of the content
  • Bug fix: Hidden panels using the code field need to be clicked on to display contents

1.5

  • Bug Fix: Adding support for flexible content fields
  • Bug Fix: Correctly adding multiple stylesheets if multiple fields themes are selected on the same page

1.0

  • First deploy and commit to wordpress.org repository