跳至内容
  • 关于WordPress
    • 关于WordPress
    • WordPress.org
    • 文档
    • 支持
    • 反馈
  • 登录
  • 注册
WordPress.org
WordPress.org

China 简体中文

  • 主题
  • 插件
  • 最新消息
  • 支持
    • 文档
    • 论坛
  • 关于
  • 获取 WordPress
获取 WordPress

插件

  • 我的收藏
  • Beta测试
  • 开发者

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

下载

Logged In Conditional Text Widget

作者Paul Gregory
  • 详情
  • 评价
  • 安装
  • 技术支持
  • 开发进展

描述

Adds three widgets – “Text/List”, “Text/List (If Logged In)” and “Text/List (Not Logged In)”. These can be used much like the normal Text widget, except two of them only display if the condition is met.

Potential Uses:
* Add a link to a Register page, along with some text promoting registration (for example on a site with the bbPress plugin)
* Display adverts to users who are not logged in
* Display useful links to users who are logged in.
* Display a nice list to everyone.

Because the widgets are separate, you can have the logged-in widget in a different place to a logged-out widget. You don’t even have to have pairs of widgets.

Unlike the normal Text widget which just has a toggle for paragraph on/off, this widget has four display options:

  • No formatting
  • Add paragraphs
  • Bullet list (ul)
  • Numbered list (ol)

The list options are useful if you are adding a number of links – simply add each one on a new line and they’ll be turned into a bullet. Please note that this plugin adds no CSS. Often themes style the lists within a widget to make menus look nice, so your theme may (for example) prevent numbers from showing. See FAQ.

You may find that the Text/List widget is useful even without the logged-in / logged-out conditional.

屏幕截图

  • The "Text (If Logged In)" widget

安装

There isn’t much to do.

  1. Upload logged-in-conditional-text-widget.php to the /wp-content/plugins/ directory (or install via Add Plugins – search for Logged In Conditional Text Widget or author Paul Gregory)
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Go to Widgets where you’ll see three new widgets: “Text/List (If Logged In)”, “Text/List (Not Logged In)”, “Text/List”.
  4. Add and configure widget instances in the normal way.
  5. You may need to tweak your theme’s CSS to get numbered lists to show as desired. See FAQ. The UL and OL have a class of ‘textlistconditional’ which you can target if required.

常见问题

Why doesn’t my numbered list have numbers?

Most likely, your theme is overriding the default styling of the LI (list item) element so that the number/bullet is hidden. This plugin does not include any CSS. However, the UL and OL have a class of ‘textlistconditional’ which you can target if required in your theme’s CSS.

What about internationalisation?

All text strings are in the pgloggedintext domain. If you’d like to submit a translation, please do.

评价

Working Perfect

convictedvapour 2016年9月3日
As described and works perfectly on WordPress and BuddyPress. Thanks you a life saver!
阅读所有1条评价

贡献者及开发者

“Logged In Conditional Text Widget” 是开源软件。 以下人员对此插件做出了贡献。

贡献者
  • Paul Gregory

将“Logged In Conditional Text Widget”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志。

更新日志

0.9.3

  • Readme changes

0.9.2

  • Logged in and Logged Out reuse same widget code, actually from the new third type which is a text widget without conditions.
  • Shows title in editor when widget minimised
  • Some labelling changes, e.g. now “Text/List”.
  • Allows shortcodes
  • Class on the UL and OL to assist CSS targeting

0.9.1

  • Bugfix release (2014).

0.9

  • First release (2011)

元信息

  • 版本:0.9.2
  • 最后更新:8年前
  • 有效安装数量:20+
  • WordPress版本: 2.8或更高
  • 最高兼容版本:3.7.38
  • 语言:
    English (US)
  • 标签:
    conditionalloginregisterwidget
  • 高级视图

评级

查看所有评价
  • 5星 1
  • 4星 0
  • 3星 0
  • 2星 0
  • 1星 0
登录以提交评价。

贡献者

  • Paul Gregory

技术支持

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

查看支持论坛

捐助

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

捐助此插件

  • 关于
  • 最新消息
  • 主机
  • 捐助
  • 支持
  • 开发者
  • 参与
  • 学习
  • 展示站点
  • 插件
  • 主题
  • 区块样板
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • 隐私
  • 公共代码
WordPress.org
WordPress.org

China 简体中文

  • 访问我们的 Facebook 公共主页
  • 关注我们的 Twitter 账号
代码如诗