AI助手支持GPT4.0
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.
“ DMG文本小部件”将标准文本小部件替换为包含高级选项的标准文本小部件,这些高级选项可应用CSS类,添加段落,应用短代码,隐藏标题并使标题成为链接。 p>
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.
dmg_text_widget_title
dmg_text_widget_text
标题为 dmg_text_widget_title code>,文本为 dmg_text_widget_text code>。 p>For example, to change the title on a single page or post, you could add this to your functions.php file:例如,要在单个页面或帖子上更改标题,可以将其添加到functions.php文件中: p>function myTitleFilter( $title ) 函数myTitleFilter($ title){ { if( is_singular() ) if(is_singular()) { { return "$title"; 返回“ $ title strong>”; } } else 其他 { { return $title; 返回$ title; }}}}add_filter( 'dmg_text_widget_title' , 'myTitleFilter');add_filter('dmg_text_widget_title','myTitleFilter'); code> pre>More information about this plugin can be found at http://dancoded.com/tag/有关此插件的更多信息,请访问 http://dancoded.com/tag/ dmg-text-widget/.dmg-text-widget / 。 p>Adding CSS Class(es)添加CSS类 h3>Enter strings, either space or comma separated, which will be applied as CSS classes to the widget wrapper.输入以空格或逗号分隔的字符串,这些字符串将作为CSS类应用于窗口小部件包装程序。These classes are sanitized using the sanitize_html_class() function built in to WordPress.可以使用WordPress内置的 sanitize_html_class() code>函数对这些类进行清理。 p>Make the Title a link为标题添加链接 h3>Enter a valid URL to make the title a link.输入有效的URL,以使标题成为链接。 p>Automatically add paragraphs自动添加段落 h3>This setting automatically adds paragraph tags to any text.此设置会自动将段落标签添加到任何文本。This uses the WordPress wpautop() function.这使用了WordPress wpautop() code>函数。 p>Apply shortcodes应用简码 h3>This setting processes the text and applies any shortcodes found.此设置处理文本并应用找到的所有简码。 p>Show the Title显示标题 h3>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.如果未选中,则标题(包括注册边栏时定义的 before_title code>和 after_title code>代码)将不会显示。 p>
dmg_text_widget_title code>,文本为 dmg_text_widget_text code>。 p>For example, to change the title on a single page or post, you could add this to your functions.php file:例如,要在单个页面或帖子上更改标题,可以将其添加到functions.php文件中: p>function myTitleFilter( $title ) 函数myTitleFilter($ title){ { if( is_singular() ) if(is_singular()) { { return "$title"; 返回“ $ title strong>”; } } else 其他 { { return $title; 返回$ title; }}}}add_filter( 'dmg_text_widget_title' , 'myTitleFilter');add_filter('dmg_text_widget_title','myTitleFilter'); code> pre>More information about this plugin can be found at http://dancoded.com/tag/有关此插件的更多信息,请访问 http://dancoded.com/tag/ dmg-text-widget/.dmg-text-widget / 。 p>Adding CSS Class(es)添加CSS类 h3>Enter strings, either space or comma separated, which will be applied as CSS classes to the widget wrapper.输入以空格或逗号分隔的字符串,这些字符串将作为CSS类应用于窗口小部件包装程序。These classes are sanitized using the sanitize_html_class() function built in to WordPress.可以使用WordPress内置的 sanitize_html_class() code>函数对这些类进行清理。 p>Make the Title a link为标题添加链接 h3>Enter a valid URL to make the title a link.输入有效的URL,以使标题成为链接。 p>Automatically add paragraphs自动添加段落 h3>This setting automatically adds paragraph tags to any text.此设置会自动将段落标签添加到任何文本。This uses the WordPress wpautop() function.这使用了WordPress wpautop() code>函数。 p>Apply shortcodes应用简码 h3>This setting processes the text and applies any shortcodes found.此设置处理文本并应用找到的所有简码。 p>Show the Title显示标题 h3>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.如果未选中,则标题(包括注册边栏时定义的 before_title code>和 after_title code>代码)将不会显示。 p>
dmg_text_widget_text code>。 p>For example, to change the title on a single page or post, you could add this to your functions.php file:例如,要在单个页面或帖子上更改标题,可以将其添加到functions.php文件中: p>function myTitleFilter( $title ) 函数myTitleFilter($ title){ { if( is_singular() ) if(is_singular()) { { return "$title"; 返回“ $ title strong>”; } } else 其他 { { return $title; 返回$ title; }}}}add_filter( 'dmg_text_widget_title' , 'myTitleFilter');add_filter('dmg_text_widget_title','myTitleFilter'); code> pre>More information about this plugin can be found at http://dancoded.com/tag/有关此插件的更多信息,请访问 http://dancoded.com/tag/ dmg-text-widget/.dmg-text-widget / 。 p>Adding CSS Class(es)添加CSS类 h3>Enter strings, either space or comma separated, which will be applied as CSS classes to the widget wrapper.输入以空格或逗号分隔的字符串,这些字符串将作为CSS类应用于窗口小部件包装程序。These classes are sanitized using the sanitize_html_class() function built in to WordPress.可以使用WordPress内置的 sanitize_html_class() code>函数对这些类进行清理。 p>Make the Title a link为标题添加链接 h3>Enter a valid URL to make the title a link.输入有效的URL,以使标题成为链接。 p>Automatically add paragraphs自动添加段落 h3>This setting automatically adds paragraph tags to any text.此设置会自动将段落标签添加到任何文本。This uses the WordPress wpautop() function.这使用了WordPress wpautop() code>函数。 p>Apply shortcodes应用简码 h3>This setting processes the text and applies any shortcodes found.此设置处理文本并应用找到的所有简码。 p>Show the Title显示标题 h3>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.如果未选中,则标题(包括注册边栏时定义的 before_title code>和 after_title code>代码)将不会显示。 p>
For example, to change the title on a single page or post, you could add this to your functions.php file:
例如,要在单个页面或帖子上更改标题,可以将其添加到functions.php文件中: p>
function myTitleFilter( $title ) 函数myTitleFilter($ title){ { if( is_singular() ) if(is_singular()) { { return "$title"; 返回“ $ title strong>”; } } else 其他 { { return $title; 返回$ title; }}}}add_filter( 'dmg_text_widget_title' , 'myTitleFilter');add_filter('dmg_text_widget_title','myTitleFilter'); code> pre>More information about this plugin can be found at http://dancoded.com/tag/有关此插件的更多信息,请访问 http://dancoded.com/tag/ dmg-text-widget/.dmg-text-widget / 。 p>Adding CSS Class(es)添加CSS类 h3>Enter strings, either space or comma separated, which will be applied as CSS classes to the widget wrapper.输入以空格或逗号分隔的字符串,这些字符串将作为CSS类应用于窗口小部件包装程序。These classes are sanitized using the sanitize_html_class() function built in to WordPress.可以使用WordPress内置的 sanitize_html_class() code>函数对这些类进行清理。 p>Make the Title a link为标题添加链接 h3>Enter a valid URL to make the title a link.输入有效的URL,以使标题成为链接。 p>Automatically add paragraphs自动添加段落 h3>This setting automatically adds paragraph tags to any text.此设置会自动将段落标签添加到任何文本。This uses the WordPress wpautop() function.这使用了WordPress wpautop() code>函数。 p>Apply shortcodes应用简码 h3>This setting processes the text and applies any shortcodes found.此设置处理文本并应用找到的所有简码。 p>Show the Title显示标题 h3>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.如果未选中,则标题(包括注册边栏时定义的 before_title code>和 after_title code>代码)将不会显示。 p>
函数myTitleFilter($ title){ { if( is_singular() ) if(is_singular()) { { return "$title"; 返回“ $ title strong>”; } } else 其他 { { return $title; 返回$ title; }}}}add_filter( 'dmg_text_widget_title' , 'myTitleFilter');add_filter('dmg_text_widget_title','myTitleFilter');
{
if( is_singular() )
if(is_singular())
return "$title";
返回“ $ title strong>”; } } else 其他 { { return $title; 返回$ title; }}}}add_filter( 'dmg_text_widget_title' , 'myTitleFilter');add_filter('dmg_text_widget_title','myTitleFilter');
}
else
其他
return $title;
返回$ title;
add_filter( 'dmg_text_widget_title' , 'myTitleFilter');
add_filter('dmg_text_widget_title','myTitleFilter');
code> pre>
More information about this plugin can be found at http://dancoded.com/tag/有关此插件的更多信息,请访问 http://dancoded.com/tag/ dmg-text-widget/.dmg-text-widget / 。 p>
有关此插件的更多信息,请访问 http://dancoded.com/tag/ dmg-text-widget/.
dmg-text-widget/
dmg-text-widget /
Enter strings, either space or comma separated, which will be applied as CSS classes to the widget wrapper.
输入以空格或逗号分隔的字符串,这些字符串将作为CSS类应用于窗口小部件包装程序。
These classes are sanitized using the sanitize_html_class() function built in to WordPress.
sanitize_html_class()
可以使用WordPress内置的 sanitize_html_class() code>函数对这些类进行清理。 p>Make the Title a link为标题添加链接 h3>Enter a valid URL to make the title a link.输入有效的URL,以使标题成为链接。 p>Automatically add paragraphs自动添加段落 h3>This setting automatically adds paragraph tags to any text.此设置会自动将段落标签添加到任何文本。This uses the WordPress wpautop() function.这使用了WordPress wpautop() code>函数。 p>Apply shortcodes应用简码 h3>This setting processes the text and applies any shortcodes found.此设置处理文本并应用找到的所有简码。 p>Show the Title显示标题 h3>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.如果未选中,则标题(包括注册边栏时定义的 before_title code>和 after_title code>代码)将不会显示。 p>
sanitize_html_class() code>函数对这些类进行清理。 p>Make the Title a link为标题添加链接 h3>Enter a valid URL to make the title a link.输入有效的URL,以使标题成为链接。 p>Automatically add paragraphs自动添加段落 h3>This setting automatically adds paragraph tags to any text.此设置会自动将段落标签添加到任何文本。This uses the WordPress wpautop() function.这使用了WordPress wpautop() code>函数。 p>Apply shortcodes应用简码 h3>This setting processes the text and applies any shortcodes found.此设置处理文本并应用找到的所有简码。 p>Show the Title显示标题 h3>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.如果未选中,则标题(包括注册边栏时定义的 before_title code>和 after_title code>代码)将不会显示。 p>
Enter a valid URL to make the title a link.
输入有效的URL,以使标题成为链接。 p>
This setting automatically adds paragraph tags to any text.
此设置会自动将段落标签添加到任何文本。
This uses the WordPress wpautop() function.
wpautop()
这使用了WordPress wpautop() code>函数。 p>Apply shortcodes应用简码 h3>This setting processes the text and applies any shortcodes found.此设置处理文本并应用找到的所有简码。 p>Show the Title显示标题 h3>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.如果未选中,则标题(包括注册边栏时定义的 before_title code>和 after_title code>代码)将不会显示。 p>
wpautop() code>函数。 p>Apply shortcodes应用简码 h3>This setting processes the text and applies any shortcodes found.此设置处理文本并应用找到的所有简码。 p>Show the Title显示标题 h3>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.如果未选中,则标题(包括注册边栏时定义的 before_title code>和 after_title code>代码)将不会显示。 p>
This setting processes the text and applies any shortcodes found.
此设置处理文本并应用找到的所有简码。 p>
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.
before_title
after_title
如果未选中,则标题(包括注册边栏时定义的 before_title code>和 after_title code>代码)将不会显示。 p>
before_title code>和 after_title code>代码)将不会显示。 p>
after_title code>代码)将不会显示。 p>
/wp-content/plugins/dmg-text-widget
/ wp-content / plugins / dmg-text-widget code>目录,或直接通过WordPress插件屏幕安装插件。 li>Activate the plugin through the ‘Plugins’ page in the WordPress admin area通过WordPress管理区域中的“插件”页面激活插件 li>Drag onto any active sidebar on the ‘Appearance > Widgets’ page拖动到“外观>小部件”页面上任何活动的侧边栏上 li>Click on the ‘Show Advanced’ link in the widget to change advanced options.点击小部件中的“显示高级”链接以更改高级选项。 li>
ol>
原文出处:http://www.sanshu.cn/a/11312.html
群主管理都是支付大佬