Customizer Export/Import

外掛說明

Customizer Export/Import

Customizer Export/Import 外掛能讓網站管理員直接在 WordPress 外觀自訂器介面中,直接匯出或匯入外觀自訂器的設定。如果網站使用的佈景主題採用 WordPress 外觀自訂器進行相關設定,那這款外掛就非常適合。

如需更多資訊,請閱讀我們部落格上的〈Customizer Export/Import 外掛〉這篇文章。

全新的匯出設定

Customizer Export/Import 外掛以前只能匯出使用 get_theme_mods 函式的佈景主題模組所儲存的選項設定,無法匯出其他設定,而現在這個外掛能將佈景主題儲存的選項設定全部匯出。

運作方式

匯出外觀自訂器設定十分簡單。在外觀自訂器中按一下 [匯出佈景主題設定],便會為所有設定自動產生一個新檔案,並要求使用者進行下載並加以儲存。匯出檔會以使用中的佈景主題名稱加以命名,且僅能在同一個佈景主題或其子佈景主題中匯入設定。匯出檔包含了一個使用 get_theme_mods 函式或外觀自訂器設定的序列化模組傾印。

匯入外觀自訂器設定十分簡單。選取要匯入的設定匯出檔,並選擇是否要下載並匯入圖片 (類似匯入文章時的操作),最後按一下 [匯入佈景主題設定] 便能完成。匯入設定後,頁面會重新整理,並呈現新設定所帶來的設計變更。

匯出自訂設定

開發人員可以使用任意選項,且這些選項可以不是外觀自訂器使用 cei_export_option_keys 篩選器匯出的選項設定。透過過將選項設定值加入需要匯出的選項設定陣列 (範例如下所示),便可以匯出及匯入這些選項設定。

function my_export_option_keys( $keys ) {
    $keys[] = 'my_option_key';
    $keys[] = 'another_option_key';
    return $keys;
}

add_filter( 'cei_export_option_keys', 'my_export_option_keys' );

已知問題

這款外掛僅適用於使用中的佈景主題,並不適用於在 Theme Test Drive 外掛中進行測試或在外觀自訂器中進行預覽的佈景主題。

如何做出貢獻

我們很樂意聽到使用者的回應,告訴我們如何改進 Customizer Export/Import 外掛,或看見佈景主題開發者積極貢獻的內容!不要猶豫,快讓我們知道你有興趣參與,我們很樂意讓其他人加入。

Customizer Export/Import 外掛由 Beaver Builder 開發團隊所開發。

螢幕擷圖

  • 外觀自訂器中的匯出/匯入區段

安裝方式

  1. 網站管理員可以透過 WordPress 外掛目錄安裝 Customizer Export/Import 外掛,或是透過將解壓縮的外掛目錄及其所有檔案上傳至 wp-content/plugins 以進行安裝。

  2. 外掛啟用後,[匯入/匯出佈景主題設定] 功能會立即生效,並在 WordPress 的外觀自訂器中自成一個區段。

常見問題集

如需更多資訊,請閱讀〈Customizer Export/Import 外掛〉這篇文章。

使用者評論

2025 年 1 月 22 日
Great plugin, worked perfectly. Probably it helped me save a few hours of customization. Thanks!
2024 年 12 月 17 日
Perfect, I could export my theme settings to my child theme without any problem, in 2 minutes. That’s a lot of waste time gained. Thanks you so much !Very usefull I recommand.
2024 年 7 月 21 日
Exactly what we needed — Alante theme latest as of this date and WP 6.6. Thank you!
2024 年 5 月 21 日 1 則留言
Whatever you change in Customizer, it exports the same data with no difference. [WordPress 6.5.3, Astra 4.6.14]
閱讀全部 114 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Customizer Export/Import〉的開發相關工作。

參與者

〈Customizer Export/Import〉外掛目前已有 25 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Customizer Export/Import〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

Version 0.1

  • Initial release.

Version 0.2

  • Added cei_export_option_keys filter for exporting custom options.

Version 0.3

  • Customizer settings saved as options are now exported and imported.

Version 0.5

  • Fixed an issue with uploads in WordPress 4.7.1.

Version 0.6

  • Trying another fix for the issue with uploads in WordPress 4.7.1.

Version 0.7

  • Added support for exporting and importing custom CSS.

Version 0.8

  • Added support for option data that has an empty value.

Version 0.9

  • Allow options with widget or sidebar in their key to be exported.

Version 0.9.1

  • Fixed issue with slashes in plugin asset urls and S3. Props Huskynarr.

Version 0.9.4

  • Added callout for Assistant

Version 0.9.5

  • Fixed minor security issue

Version 0.9.6

  • Restrict uploads to users that can install plugins for better security.

Version 0.9.7.1

  • Fixed minor security issue

Version 0.9.7.2

  • Fixed mime type error

Version 0.9.7.3

  • Fixed mime type error again
  • Fixed non SSL links in plugin headers

Version 0.9.8

  • Trim unwanted whitespace from imported file.