[WordPress] 外掛分享: Liuer Box

首頁外掛目錄 › Liuer Box
WordPress 外掛 Liuer Box 的封面圖片
全新外掛
安裝啟用
尚無評分
39 天前
最後更新
問題解決
WordPress 6.0+ PHP 7.4+ v1.0.5 上架:2026-07-21

內容簡介

Liuer Box 是一款強大的 WordPress 外掛,允許用戶透過視覺化的欄位群組建構器來建立自訂欄位,並將數據整齊地儲存在原生的文章、分類、用戶元資料及選項中。

【主要功能】
• 視覺化建構器,無需編碼
• 25 種欄位類型可供選擇
• 支援條件邏輯顯示/隱藏欄位
• 重複欄位支援嵌套與拖曳排序
• 多語言支援,適用於 Polylang/WPML
• 開發者友好,提供多種讀寫函式

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.5) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Liuer Box」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Liuer Box lets you build custom fields for WordPress with a visual field-group builder, while keeping data stored cleanly in native post/term/user meta and options.

Visual builder — create Field Groups, add fields, drag to reorder, choose where they appear. No code required.
Clean, native storage — single fields are stored in one native meta row; complex fields (repeater / gallery / link) are stored as a single JSON row instead of many rows; global options are consolidated into a single liuer_box_options row. Your database stays small.
25 field types — text, textarea, number, email, url, password, range, select, checkbox, radio, button group, true/false, WYSIWYG, image, gallery, file, oEmbed, HTML Embed, color, Color Alpha, link, date/time, post object (pick one or more posts of a chosen post type), taxonomy (pick one or more terms from a chosen taxonomy), and a nested Repeater, plus Tab and Message layout fields.
Locations — Options Pages, Post types (meta boxes), Taxonomy terms, User profiles, and Page Templates.
Repeater with nesting — drag-sort rows, collapse, min/max, dynamic row labels, repeaters inside repeaters.
Conditional logic — show/hide a field based on another field’s value, evaluated both client-side and server-side.
Field width & tabs — lay fields out in columns and group them into tabs.
Multilingual ready — per-post/term/user fields follow translations naturally; global option fields can use language-scoped values for Polylang/WPML, with Polylang string registration when available.
Developer friendly — read values with liuer_option(), liuer_field(), liuer_term(), liuer_user(); write them with liuer_update_field(), liuer_update_term(), liuer_update_user(), liuer_update_option(); register groups in code with liuer_box_register().

Reading values in your theme
The getters return RAW values (use them for logic, arrays, attachment IDs and HTML fields). Always escape on output:
$accent = liuer_option( 'accent' ); // Options page value
$logo = liuer_field( 'logo', null, $post_id ); // Post meta value (attachment ID)
$color = liuer_term( 'color', $term_id ); // Term meta value
$phone = liuer_user( 'phone', $user_id ); // User meta value

echo esc_html( liuer_field( 'subtitle' ) );
echo wp_get_attachment_image( liuer_field( 'logo' ), 'large' );

foreach ( (array) liuer_field( 'slides' ) as $row ) {
echo esc_html( $row['title'] );
}

Writing values from code
Setters mirror the getters and store in the same native format (arrays become one JSON row). They store the value AS GIVEN, so sanitize your input first:
liuer_update_field( 'subtitle', sanitize_text_field( $text ), $post_id ); // post meta
liuer_update_field( 'logo', absint( $attachment_id ) ); // current post
liuer_update_field( 'slides', array( // array -> JSON row
array( 'title' => 'One' ),
array( 'title' => 'Two' ),
), $post_id );

liuer_update_term( 'color', '#025098', $term_id ); // term meta
liuer_update_user( 'phone', $phone, $user_id ); // user meta
liuer_update_option( 'accent', '#2271b1' ); // options page

Safe output helpers (auto-escaping)
Optional convenience helpers that echo already-escaped output, so you don’t have to remember the right escaper:
liuer_e( 'subtitle' ); // echo esc_html() of a post field
liuer_attr_e( 'data_id' ); // echo esc_attr()
liuer_url_e( 'website' ); // echo esc_url()
liuer_img( 'logo', 'large' ); // echo a safe from an attachment ID
liuer_wysiwyg( 'about' ); // echo with WordPress content filters
liuer_embed( 'map_embed' ); // echo sanitized iframe/embed HTML

liuer_option_e( 'tagline' ); // same family for options
liuer_option_attr_e( 'accent' );
liuer_option_url_e( 'fanpage' );
liuer_option_img( 'logo', 'medium' );
liuer_option_embed( 'map_embed' );

延伸相關外掛

文章
Filter
Mastodon