Title: DMG Text Widget
Author: dancoded
Published: <strong>2016 年 7 月 29 日</strong>
Last modified: 2016 年 8 月 22 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/dmg-text-widget.svg)

# DMG Text Widget

 作者：[dancoded](https://profiles.wordpress.org/dancoded/)

[下载](https://downloads.wordpress.org/plugin/dmg-text-widget.1.1.zip)

 * [详情](https://cn.wordpress.org/plugins/dmg-text-widget/#description)
 * [评价](https://cn.wordpress.org/plugins/dmg-text-widget/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/dmg-text-widget/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/dmg-text-widget/#developers)

 [支持](https://wordpress.org/support/plugin/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/](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」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ dancoded ](https://profiles.wordpress.org/dancoded/)

[帮助将「DMG Text Widget」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/dmg-text-widget)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/dmg-text-widget/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/dmg-text-widget/)，或通过[RSS](https://plugins.trac.wordpress.org/log/dmg-text-widget/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/dmg-text-widget/)。

## 更新日志

#### 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

## 额外信息

 *  版本 **1.1**
 *  最后更新：**10 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.1 或更高版本 **
 *  已测试的最高版本为 **4.6.30**
 *  语言
 * [English (US)](https://wordpress.org/plugins/dmg-text-widget/)
 * 标签
 * [css](https://cn.wordpress.org/plugins/tags/css/)[shortcodes](https://cn.wordpress.org/plugins/tags/shortcodes/)
   [text widget](https://cn.wordpress.org/plugins/tags/text-widget/)[widget](https://cn.wordpress.org/plugins/tags/widget/)
 *  [高级视图](https://cn.wordpress.org/plugins/dmg-text-widget/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/dmg-text-widget/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/dmg-text-widget/reviews/)

## 贡献者

 *   [ dancoded ](https://profiles.wordpress.org/dancoded/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/dmg-text-widget/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://dancoded.com/wordpress-plugins/)