[WordPress] 外掛分享: ACF Autosize

WordPress 外掛 ACF Autosize 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「ACF Autosize」是 2018-06-20 上架。
  • 目前有 4000 個安裝啟用數。
  • 上一次更新是 2022-01-28,距離現在已有 1192 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.6.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
  • 有 20 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

yeah8000 |

外掛標籤

acf | wysiwyg | autosize | autoresize |

內容簡介

一個 WordPress 外掛,可自動調整並改進 Advanced Custom Fields 中的 wysiwyg 和 textarea 欄位。

功能

自動調整 ACF 群組中 wysiwyg 和 textarea 欄位的大小
在 tinymce 的 iframe 中,將 data-wysiwyg-slug='my-wysiwyg-field' 添加到 body 中,以便您可以使用 editor-styles 樣式化該 iframe 的內容。

限制

目前不支援 ACF Gutenberg Blocks 中的欄位。

用法

與任何其他 WordPress 外掛一樣安裝並啟用
[data-wysiwyg-slug] 將被添加到每個 wysiwyg 欄位!
該插件默認啟用所有 textarea 和 wysiwyg 欄位。您可以通過將類別 no-autosize 添加到欄位中來禁用它。
您可以通過 acf-autosize/enabledByDefault 過濾器將默認行為設置為 false。之後,您可以通過將類別 autosize 添加到單個欄位中重新啟用它。
通過 acf-autosize/wysiwyg/min-height 過濾器設置 wysiwyg 欄位的最小高度。
通過 acf-autosize/enabledInFrontend 過濾器在前端啟用插件。

mu-plugin

acf-autosize-mu.php 是 acf-autosize 的單文件外掛版本,可在您的佈景主題或 mu-plugins 中使用。它包含了 JavaScript 並會自動產生!

開發

在 Github 上查看源代碼 !

原文外掛簡介

A wordpress plugin to automatically resize and improve upon wysiwyg and textarea fields in Advanced Custom Fields.
Features

Automatically resize wysiwyg and textarea fields in ACF groups
Add data-wysiwyg-slug='my-wysiwyg-field' to the body in tinymce iframes, so you can style those iframe’s contents using editor-styles.

Limitations

Currently does not work on fields inside of ACF Gutenberg Blocks.

Usage

Install and activate like any other wordpress plugin
[data-wysiwyg-slug] is added to every wysiwyg field!
The plugin is enabled by default on all textareas and wysiwyg fields. You can disable it by adding the class no-autosize to a field.
You can set the the default behaviour to false via the acf-autosize/enabledByDefault-filter. After that you can reenable single fields by adding the class autosize.
Set min-height of WYSIWYG-fields via acf-autosize/wysiwyg/min-height-filter.
The plugin can be enabled in the frontend via acf-autosize/enabledInFrontend-filter.

mu-plugin
acf-autosize-mu.php is a single-file drop-in version of acf-autosize for usage in your theme or mu-plugins. It contains the javascript and is autogenerated!
Development
Check out the source code on Github!

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「ACF Autosize」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.1 | 1.0.2 | 1.0.3 | 1.0.4 | 1.1.0 | 1.1.1 | 1.1.2 | 1.2.0 | 1.2.1 | 1.2.2 | 1.2.3 | 1.3.0 | 1.3.1 | 1.3.2 | 1.3.3 | 2.0.0 | 2.0.1 | 2.0.4 | 2.0.5 | 2.0.6 | 2.0.7 | 2.0.8 | 2.0.9 | trunk | 1.0.4a | 2.0.10 | 2.0.11 | 2.0.12 | 2.0.13 | 2.0.14 | 2.0.15 |

延伸相關外掛(你可能也想知道)

  • Perfect Lazy Loading 》完美的惰性加載:自動加載符合要求的圖片大小, 不僅僅對 WordPress 輸出進行惰性加載。還允許您定義模板中哪些圖像尺寸可供 JavaScript 使用,以插入最適合所...。

文章
Filter
Apply Filters
Mastodon