[WordPress] 外掛分享: Dev Content Blocks

前言介紹

  • 這款 WordPress 外掛「Dev Content Blocks」是 2017-11-02 上架。
  • 目前有 400 個安裝啟用數。
  • 上一次更新是 2018-12-25,距離現在已有 2324 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.0.1 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
  • 有 1 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

allonsacksgmailcom |

外掛標籤

html | modular | shortcodes | Content Blocks | reusable content |

內容簡介

不只適用於開發人員。
創建可重複使用的全局內容的內容模塊。支持版本控制。帶有原始 HTML、JS 和 CSS 的輸入字段,而不必擔心自動格式化,同時還可以使用通常格式化的 WordPress tinyMCE 編輯器。
此外,此外掛程式可讓您以正確的方式創建模塊化內容:

內容模塊是一種文章類型。
允許您使用 ACE 編輯器在單獨的塊中添加 HTML、CSS 和 JS,並具有代碼自動完成和錯誤通知。
WordPress WYSIWYG 編輯器是可選的。
版本控制(!)您可以更改 WordPress 內容、HTML、CSS 和 JS,然後回到以前的狀態,就像使用 WordPress 原有的文章版本控制一樣。
使用短代碼在文章、頁面、自訂文章類型、小工具和主題文件中添加模塊。
預覽內容。
使用默認的 WordPress XML 導入/導出工具進行輕鬆導入和導出。

使用內容模塊,您可以創建全局顯示的內容模塊。更改該內容模塊,任何嵌入該內容模塊的頁面都會反映出更改。
使用案例:

WordPress WYSIWYG 編輯器和文本編輯器通常在不添加換行符號時不可預測,或在編輯文章後失去格式:
只需創建一個名為“br”的內容模塊,僅使用 HTML 方塊,並在方塊中放置“
”。然後可以使用短碼“[dcb name=br]”,以確保插入換行符號的位置。

您可能有多個不同 LP 的“感謝頁面”。當您啟動新的活動或想要添加新的轉化代碼(或刪除舊的轉化代碼)時,您需要進入每個感謝頁面,並添加/刪除轉化代碼:
使用模塊化內容,您可以在一個內容模塊中維護所有的轉化代碼,然後只需在所有感謝頁面中放置相同的短碼。此外,在正常的 WordPress 編輯器中,您不能總是將轉化代碼安全地嵌入文章本身並依賴使用單獨的樣板。此外,此外掛程式可解決所有這些問題。

廣告:
使用內容模塊在一個地方管理您的廣告。為每個廣告創建一個内容模塊,然後在帖子內容/主題文件/小工具中使用短碼顯示每個廣告。

還有許多更多用例,上述只是一些例子。實際上,您可以在幾乎任何類型的網站上使用內容模塊管理和維護模塊化內容的功能。

內容模塊是您在管理員中創建自己的短碼的簡單方法,可用作最小短碼構建器。
Dev Content Blocks 是專為開發人員而創建的。因此,雖然它對任何 WordPress 用戶而言都足夠簡單,但開發人員可以使用原始 HTML 而無需擔心 wptexturize 和 wpautop 對其進行格式化。想想在舊版文本小工具(新的“自訂 HTML”小工具)中的任意 HTML 內容。此處不會自動添加段落。
此外,由於 CSS 和 JS 可以輕鬆添加到這裡,而不必擔心它失去其格式,因此此外掛程式可讓您創建和管理自己的短碼。您可以輕鬆創建短碼(不接受引數的短碼類型)並在管理員中的一個地方管理它們,而無需將它們創建為主題或每個短碼的單獨插件。
實際上,您可以在 HTML 方塊中添加 CSS 和 JS,但是,為了方便起見,此插件程式有單獨的選擇性 CSS 和 JS 方塊,可讓您分離內容和代碼。
短碼的輸出是:
1. 如果啟用了 WordPress 編輯器,則輸出來自 WordPress 編輯器的內容。(注意,在這裡,wptexturize 和 wpautop 會作用)

原文外掛簡介

Not only for developers.
Create content blocks for reusable global content. Supports revisions. With input fields for raw HTML, JS, and CSS without worrying about auto formatting, with an option to also use the usual formatted WordPress tinyMCE editor.
This plugin let’s you create modular content blocks the right way:

Content blocks are a post type.
Allows you to add HTML, CSS, and JS in separate blocks using ACE editor with code completion and error notifications.
WordPress WYSIWYG editor optional.
Revisions(!) You can change your WordPress content, HTML, CSS, and JS and then go back to a previous state the same as you can with the out of the box wordpress post revisions.
Use a shortcode to add the blocks in posts, pages, CPT’s, widgets, and in your theme files.
Preview your content.
Easily import & export using the default WordPress XML import/export tool.

Using content blocks you can create blocks of content to display globally. Change the block and any page the content block is embedded on will reflect the changes.
Use Cases:

The WordPress WYSIWYG editor and even the text editor is often unpredictable not adding line breaks when wanted, or losing formatting after editing a post:
Just create a content block calling it “br” using only the HTML box and put
in the box. The shortcode “[dcb name=br]” can then be used whenever you want to make sure that you have a line break.

You may have multiple “thank you” pages for different LP’s. When you start new campaigns or want to add new conversion code (or delete an old conversion code), you need to go to each ty page and add/delete the conversion code:
With modular content you can maintain all your conversion codes in one block and then just put the same shortcode in all ty pages. Also, with the regular WordPress editor you cannot always safely embed conversion code in the post itself and rely on using a separate template. This plugin solves all these issues.

Ads:
Use the content blocks to manage your ads in one place. Create a content block per ad, then use a shortcode in your post content/theme files/widgets where you want to display each ad.

There are many more use cases, these were just a few examples. Really you can use content blocks for so many cases and the power it gives you to manage and maintain modular content is necessary on almost any kind of website.

Content Blocks are an easy way for you to create your own shortcodes within the admin and can be used as a minimal shortcode builder.
Dev Content Blocks is created with developers in mind, so while it is simple enough for any WordPress user to use, developers will have added benefit of being able to use raw HTML without it being formatted by wptexturize and wpautop. Think arbitrary HTML in the old text widget (new “Custom HTML” widget). Here paragraphs are NOT added automatically.
Also, as CSS and JS can easily be added here without fear of it losing it’s formatting, this plugin let’s you create and manage your own shortcodes. You can easily create shortcodes (the type that do not accept arguments) and manage them in one place in the admin instead of creating them in the theme or as a separate plugin per shortcode.
You can actually add CSS and JS in the HTML box but, for convenience this plugin has separate optional CSS and JS boxes to allow you to separate your content and code.
The output of the shortcode is:
1. Content from the WordPress editor if it is enabled. (Note, here wptexturize and wpautop are used).
2. Content from the HTML box.
3. The CSS code wrapped in a style tag.
4. The JS code wrapped in a script tag.
(“if(typeof(jQuery) !== ‘undefined’) {$ = jQuery.noConflict();}” is prepended to the script.)
Please Note. Dev Content Blocks lets you use raw HTML, JS, and CSS therefore be careful if copying and pasting from random web pages as in order to allow you maximum control with the content blocks, you will be able to paste JS that is not entirely validated.
Future Versions

Enable/disable each box in the “Content Block Code” section.
More Page builder support
Variables to be passed in the shortcode
Option to enqueue other CSS & JS files when a block is used
Preview in a light box on the admin screen
Options for incorporating and using the featured image
Add an option to change the order of the HTML box vs. the WP editor
Add an option to turn off formatting in the WP editor
Add an option to enqueue the CSS and JS instead of outputting it in the HTML
Widget
Button in tinyMCE to add shortcodes
Show shortcodes in main Dev Content Blocks screen
Localization and language support
When leaving or refreshing the admin page users should receive a prommpt if they have unsaved changes in the code boxes
All above are under consideration and may or may not be added. Please feel free to email me or write a comment here in the reviews or support section with bugs and/or suggestions.

各版本下載點

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

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


1.0 | 1.1 | 1.2 | 1.3 | 1.4 | 1.4.1 | trunk |

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

  • Pillar Press – Content Blocks for Gutenberg 》Pillar Press 的 Content Blocks 外掛為新的Gutenberg 區塊編輯器提供自訂區塊。, 請注意:Content Blocks 仍在積極開發中,使用於正式網站風險自負。, 由於...。

文章
Filter
Apply Filters
Mastodon