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

DMG Text Widget

外掛說明

DMG Text Widget replaces the standard text widget with one that includes advanced options to apply a CSS class, add paragraphs, apply shortcodes, hide the title and make the title a link.

Two hooks are available to filter the title and text; dmg_text_widget_title for the title and dmg_text_widget_text for the text.

For example, to change the title on a single page or post, you could add this to your functions.php file:

function myTitleFilter( $title )
{
    if( is_singular() )
    {
        return "<strong>$title</strong>";
    }
    else
    {
        return $title;      
    }
}
add_filter( 'dmg_text_widget_title' , 'myTitleFilter');

More information about this plugin can be found at http://dancoded.com/tag/dmg-text-widget/.

Adding CSS Class(es)

Enter strings, either space or comma separated, which will be applied as CSS classes to the widget wrapper. These classes are sanitized using the sanitize_html_class() function built in to WordPress.

Make the Title a link

Enter a valid URL to make the title a link.

Automatically add paragraphs

This setting automatically adds paragraph tags to any text. This uses the WordPress wpautop() function.

Apply shortcodes

This setting processes the text and applies any shortcodes found.

Show the Title

This setting controls the visibility of the widget title. If unchecked, the title (including the before_title and after_title code defined when registering the sidebar) will not be displayed.

螢幕擷圖

安裝方式

  1. Upload the plugin files to the /wp-content/plugins/dmg-text-widget directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ page in the WordPress admin area
  3. Drag onto any active sidebar on the ‘Appearance > Widgets’ page
  4. Click on the ‘Show Advanced’ link in the widget to change advanced options.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈DMG Text Widget〉的開發相關工作。

參與者

將〈DMG Text Widget〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

1.1

  • Added option to make the title a link by adding a URL
  • Tested with WordPress 4.6
  • Corrected typo’s in readme.txt
  • Update readme.txt

1.0.1

  • Corrected typos in readme.txt

1.0

  • Initial version