Title: Customize Inline Editing
Author: Weston Ruter
Published: <strong>2014 年 9 月 19 日</strong>
Last modified: 2024 年 6 月 22 日

---

搜尋外掛

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

![](https://s.w.org/plugins/geopattern-icon/customize-inline-editing.svg)

# Customize Inline Editing

 由 [Weston Ruter](https://profiles.wordpress.org/westonruter/) 開發

[下載](https://downloads.wordpress.org/plugin/customize-inline-editing.0.2.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/customize-inline-editing/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/customize-inline-editing/#reviews)
 * [開發資訊](https://tw.wordpress.org/plugins/customize-inline-editing/#developers)

 [技術支援](https://wordpress.org/support/plugin/customize-inline-editing/)

## 外掛說明

In WordPress 4.5 the [selective refresh](https://make.wordpress.org/core/2016/02/16/selective-refresh-in-the-customizer/)
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](https://make.wordpress.org/core/2016/11/10/visible-edit-shortcuts-in-the-customizer-preview/)
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](https://github.com/xwp/wp-js-widgets))
or post content (via [Customize Posts](https://github.com/xwp/wp-customize-posts)).

The [selective refresh](https://make.wordpress.org/core/2016/02/16/selective-refresh-in-the-customizer/)
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](https://github.com/xwp/wp-customize-inline-editing).
Pull requests welcome. Please see [issues](https://github.com/xwp/wp-customize-inline-editing/issues)
reported there before going to the [plugin forum](https://wordpress.org/support/plugin/customize-inline-editing).**

## 使用者評論

![](https://secure.gravatar.com/avatar/16ec19d61184f72f0b0117f2af04380e2d7d57d8fd4b16ea5f737024d3f61639?
s=60&d=retro&r=g)

### 󠀁[Awesome](https://wordpress.org/support/topic/awesome-3655/)󠁿

 [ashiquzzaman](https://profiles.wordpress.org/ashiquzzaman/) 2016 年 9 月 3 日

Makes the whole text editing process smooth. From refresh to postMessage to inline
editing awesome transition. Keep up the good work 🙂

 [ 閱讀全部 2 則使用者評論 ](https://wordpress.org/support/plugin/customize-inline-editing/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈Customize Inline Editing〉的開發相關工作。

參與者

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)
 *   [ XWP ](https://profiles.wordpress.org/xwp/)

[將〈Customize Inline Editing〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/customize-inline-editing)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/customize-inline-editing/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/customize-inline-editing/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/customize-inline-editing/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/customize-inline-editing/)。

## 變更記錄

#### 0.2.1 (2017-08-04)

 * Fix readme and bump tested-up-to.

#### 0.2.0 (2017-02-15)

 * Refactor to make use of selective refresh partials.
 * Integrate with edit shortcuts so that clicking the edit shortcut causes the text
   to be editable and turns into a checkmark icon while edit mode is enabled.

#### 0.1.3 (2016-07-10)

Ensure that any selective refresh partials associated with the edited settings
 
will get re-rendered from the server once editing has finished. Refreshed partials
will ensure that the low-fidelity JS-supplied (raw) previews will be replaced with
the actual high-fidelity PHP-rendered preview from the server. See also [#33738](https://core.trac.wordpress.org/ticket/33738).

#### 0.1.2 (2016-07-08)

Add support for Twenty Sixteen and ensure compat with WordPress 4.6-beta2

#### 0.1.1 (2014-12-12)

Add support for Twenty Fifteen and ensure compat with WordPress 4.1

#### 0.1.0 (2014-09-19)

First release.

## 中繼資料

 *  版本 **0.2.1**
 *  最後更新 **2 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 4.7.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.9.29**
 *  語言
 * [English (US)](https://wordpress.org/plugins/customize-inline-editing/)
 * 標籤:
 * [customize](https://tw.wordpress.org/plugins/tags/customize/)[customizer](https://tw.wordpress.org/plugins/tags/customizer/)
   [editing](https://tw.wordpress.org/plugins/tags/editing/)[inline](https://tw.wordpress.org/plugins/tags/inline/)
 *  [進階檢視](https://tw.wordpress.org/plugins/customize-inline-editing/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  2 個 5 星使用者評論     ](https://wordpress.org/support/plugin/customize-inline-editing/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/customize-inline-editing/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/customize-inline-editing/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/customize-inline-editing/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/customize-inline-editing/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/customize-inline-editing/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/customize-inline-editing/reviews/)

## 參與者

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)
 *   [ XWP ](https://profiles.wordpress.org/xwp/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/customize-inline-editing/)