前言介紹
- 這款 WordPress 外掛「Customize Inline Editing」是 2014-09-18 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2024-06-22,距離現在已有 315 天。
- 外掛最低要求 WordPress 4.7.0 以上版本才可以安裝。
- 有 2 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
xwp | westonruter |
外掛標籤
inline | editing | customize | customizer |
內容簡介
在 WordPress 4.5 版中,核心中引入了「selective refresh」框架。其中的關鍵概念是「partial」,當相關設定值被修改時,該「partial」區域會被選擇性地重新整理。這意味著一個或多個設定值會與預覽中的特定元素相關聯。當 select refresh 開始被引入時,使用者可以使用「shift click」來跳轉並聚焦於側邊欄控件中的關聯控件。在 WordPress 4.7 版中,這功能得到加強,並提供「visible edit shortcuts」,讓使用者可以按一下(甚至觸控)圖示,以顯示側邊欄中的控件。
「Customize Inline Editing」外掛將編輯方式改進,讓使用者可以透過直接在預覽中進行內嵌編輯,而不必把焦點從預覽中移開到控件面板上。這在小螢幕的手機等行動裝置上非常有用,因為使用者不能同時看到控件和預覽,可以參考這裡的比較:
使用這種方式進行內嵌編輯也有利於輔助功能,因為在目前被編輯的元素中保持鍵盤焦點,如此一來即可在桌面瀏覽器上實現內嵌編輯,如下圖所示:
此外,本外掛還提供了Customizer中實現內嵌編輯的可行方式。 自2014年的0.1版之後,這個外掛已為Selective Refresh打底,特別是在關聯CSS選擇器和定制設置方面。
可以通過將註冊的部分分配合適的類型來支援本外掛在Customizer中的內嵌編輯:
add_action( 'customize_register', function( $wp_customize ) {
$opt_in_partials = array_filter( array(
$wp_customize->selective_refresh->get_partial( 'blogname' ),
$wp_customize->selective_refresh->get_partial( 'blogdescription' )
) );
foreach ( $opt_in_partials as $partial ) {
$partial->type = 'inline_editable';
}
}, 100 );
單擊編輯快捷方式可開始編輯該元素,然後鍵盤焦點轉移到可編輯元素上。如果值具有伺服器端呈現的值(例如,使用 PHP 过滤器(例如wptexturize)来改善排版的值),在开始編輯時,將提供原始值。可以通過單擊可編輯元素之外,或將焦點從該元素中轉移到另一處(使其模糊)來完成編輯,也可以單擊編輯圖示(該圖示會在按下回車時變為「done」勾選圖示)。此外,你也可以使用「Shift+點擊元素」進行編輯。
目前僅支援基本文本字段的內嵌編輯;樣式和任何添加到contentEditable區域的標記都將被剝離。最終,豐富的文本格式可能會被允許,特別是針對「文本小工具」(通過JS Widgets)或文章內容(通過Customize Posts)進行整合。
WordPress 4.5版的「selective refresh」介紹中提到了它和內嵌編輯的可能未來:
如果我們可以使Customizer中不再成為覆頁刷新的主要方式,我們就可以開始在預覽中直接引入控件。如果整個預覽不重新加載,那麼內嵌控件就不會因每次更改而被破壞。例如,考慮一個小部件控制
原文外掛簡介
In WordPress 4.5 the selective refresh framework was introduced in core. One of the key concepts in this framework is the “partial”, the region in a document which is selectively refreshed when a related setting is modified. This means that one or more settings are linked with a given element in the preview. When selective refresh was first was introduced it supported the ability for a user to “shift click” on a partial to jump to and focus on the related control in the pane. In WordPress 4.7 this was then enhanced with visible edit shortcuts so that users could click (touch even) on the icon to be able to reveal the control in the pane.
The Customize Inline Editing plugin builds on edit shortcuts by allowing the setting to be modified inline via direct manipulation in the preview without having focus removed and placed on the controls pane. This is particularly useful on mobile devices on small screens where a user cannot both see the controls and preview at the same time, as can be compared here:
Inline editing in this way is also helpful for accessibility since keyboard focus remains in the preview at the element being edited, as can be seen in this demonstration of inline editing on a desktop browser:
This plugin provides one example implementation of inline editing this can be accomplished in the customizer. Version 0.1 of this plugin from 2014 was a precursor in some ways to selective refresh, specifically in regards to how CSS selectors are associated with customizer settings.
Themes can opt-in to support this plugin’s inline editing within the customizer by assigning the appropriate type to the registered partials:
add_action( 'customize_register', function( $wp_customize ) {
$opt_in_partials = array_filter( array(
$wp_customize->selective_refresh->get_partial( 'blogname' ),
$wp_customize->selective_refresh->get_partial( 'blogdescription' )
) );
foreach ( $opt_in_partials as $partial ) {
$partial->type = 'inline_editable';
}
}, 100 );
Click on the edit shortcut to begin editing the element, with keyboard focus then given to the editable element. If the value has a server-side rendered value (e.g. where PHP filters like wptexturize apply to improve typography), the raw value will be supplied when editing starts. Editing can be completed by clicking out of the editable element, tabbing out of the element (blurring it), or clicking the edit icon which then appears as a “done” checkmark icon. You may also shift-click on an element to edit it.
Currently only basic text fields can currently be edited; styling and any tags added to contentEditable areas will be stripped out. Eventually rich text formatting may be allowed, specifically for integrations with the Text widget (via JS Widgets) or post content (via Customize Posts).
The selective refresh writeup from 4.5 concludes with a section on a possible future for it and inline editing:
If we can eliminate full-page refreshes from being the norm for the Customizer, we can start to introduce controls inline with the preview. If the entire preview does not reload, then the inline controls won’t get destroyed by the refresh with each change. For example, consider a widget control floating immediately next to the widget in the sidebar it is editing. With selective refresh, it will then also be possible to eliminate the Customizer altogether. The Customizer could be available to anyone who is logged in, with the controls being bootstrapped on demand when a user wants to edit a given element. There would be no need to navigate way from a page on the frontend to enter a unique Customizer state: the Customizer would come to the user. Any controls not relevant to being inline could remain in the Customizer pane, but it could slide in only as needed instead of appearing by default. That is to say, selective refresh makes the Customizer a much better framework for implementing frontend editing.
Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Customize Inline Editing」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.1.1 | 0.1.2 | 0.1.3 | 0.2.0 | 0.2.1 | trunk |
延伸相關外掛(你可能也想知道)
Kirki Customizer Framework 》 , 新增 -現在可使用 Kirki PRO , Kirki讓佈景主題開發者更快速、更輕鬆建立佈景主題。, Kirki 提供超過 30 個自訂控制,範圍從簡單的滑桿到具有 Google ...。
Customizer Export/Import 》自訂面板匯出/匯入, 自訂面板匯出/匯入外掛讓您能夠直接從自訂面板界面匯出或匯入您的 WordPress 自訂設定!如果您的佈景主題使用 WordPress 自訂面板進行設...。
Custom Login Page Customizer 》Custom Login Page Customizer 外掛可讓您輕鬆地從 WordPress Customizer 自訂您的登入頁面!在儲存之前,您可以預覽自訂的登入頁面變更!太棒了,對吧?, , ...。
Customizer Search 》是否使用使用 WordPress 自訂樣式主題?那你一定會喜歡這個外掛!不再花時間找尋設定,只需要搜尋你想要的設定項目,就可以立即前往該設定。, 適用於所有 Wor...。
Clever Fox 》Clever Fox外掛程式專為由 Nayra Themes 製作的免費主題增加功能。有超過60,000個受信任的使用Nayra Themes的網站。它為您的網站提供直覺式功能。與Clever Fo...。
Nimble Page Builder 》Nimble Page Builder 是什麼?, Nimble Page Builder 是一個針對 WordPress 的快速靈活的頁面建構外掛。Nimble Builder 使用 WordPress 原生、強大的介面以即...。
Custom Login Page Customizer – Login Designer 》tion, , Customize the checkbox on the login page., Checkbox customization options include Background Color, Border Size and Color, Radius, Size, Ma...。
Central Color Palette 》這個外掛可以讓您管理網站上的中央色彩調色板,以實現統一的外觀和風格。新版的區塊編輯器和主題自訂器支援此調色板,而且傳統的編輯器也支援此功能。您可以...。
ThemeHunk Customizer 》ThemeHunk Customiser 外掛程式可以讓您增加推薦訊息、團隊與服務區塊的功能。這些功能將會顯示在網站的前端頁面上。。
TJ Custom CSS 》這款外掛將在管理頁面啟用自定義 CSS 管理器,讓您可以添加自訂的 CSS 代碼到您的 WordPress 網站。它會自動覆蓋任何主題或外掛的預設樣式。如果您想要為您的...。
Styles 》WordPress擁有許多漂亮的佈景主題,但個性化設計可能會很困難且耗時。Styles外掛能改變這點,提供一致的使用者介面-WordPress佈景主題自訂器。Styles能讓你...。
Hueman Addons 》這是一個針對 Hueman WordPress 主題所設計的外掛程式。, 該外掛程式名為 Hueman Addons,包含了一些酷炫的功能,例如社交分享列和實用的簡碼。, 該外掛程式...。
Homepage Control 》使用 Homepage Control 外掛,任何採用「homepage」或其他钩子(hook)在首頁上顯示組件的佈景主題,可以更好地進行配置。重新排序或禁用佈景主題新增的任何首...。
Fourteen Colors 》不喜歡綠色和黑色嗎?喜歡 Twenty Fourteen 的版面配置,但需要調整顏色來符合你的品牌嗎?沒有時間創建子佈景主題,或者想要在沒有技術負擔的情況下定期改變...。
eCommerce Companion 》電子商務 Companion 是為了 Seller Theme 所開發的 WordPress 外掛。此外掛設置的前台區塊包括導航、資訊、幻燈片、分類、產品和部落格。使用此外掛可以輕鬆...。