跳至内容
WordPress.org

China 简体中文

  • 主题
  • 插件
  • 新闻
    • 文档
    • 论坛
  • 关于
  • 获取 WordPress
获取 WordPress
WordPress.org

Plugin Directory

For Your Eyes Only

  • 提交插件
  • 我的收藏
  • 登录
  • 提交插件
  • 我的收藏
  • 登录

For Your Eyes Only

作者:Fumiki Takahashi
下载
  • 详情
  • 评价
  • 安装
  • 开发进展
支持

描述

This plugin adds a block to your block editor.
This block changes its display depending on a current user’s capability.

  • You can set capability for block.
  • If a current user has a capability for the block, its content will be replaced.
  • Or else, block is displayed as log in link.
  • This block is an inner block, so you can nest any blocks inside it. Convert it to a reusable block for your productivity.

See screenshot for how block will be displayed.

This plugin use REST API to convert block content, so you can use it with cached WordPress.
Even if you use CDN like CloudFront or Cloudflare, this plugin displays proper contents for each users.

For performance enhancement, Cookie Tasting is recommended.
It decreases server access including REST API by checking COOKIE value before accessing to server side script.

Hooks

Display Customization

  • fyeo_tag_line – Customize the default tagline displayed to users without capability. %s will be replaced with login URL.
  • fyeo_login_url – Replace the login URL. Default is wp_login_url().
  • fyeo_redirect_url – Customize redirect URL after login. Receives post object as second argument.
  • fyeo_redirect_key – Change query parameter key for redirect. Default is redirect_to.
  • fyeo_enqueue_style – Whether to enqueue default theme style. Return false to disable.

    Capability Control

  • fyeo_capabilities_list – Customize available capabilities list shown in block settings.

  • fyeo_default_capability – Change default capability. Default is read.
  • fyeo_user_has_cap – Override capability check result. Receives $has_cap, $capability, $user.

    Rendering

  • fyeo_default_render_style – Set default rendering style. Return dynamic for PHP rendering, empty string for async.

  • fyeo_can_display_non_public – Allow displaying restricted content for non-public posts. Receives $post object.

    REST API

  • fyeo_minimum_rest_capability – Control REST API access. Return false to deny access.

区块

该插件提供了 1 个区块.

  • Restricted Block This block will be displayed only for specified users.

安装

  1. Upload the plugin files to the /wp-content/plugins/for-your-eyes-only directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. You get new block named Restricted Block on Block Editor.

常见问题

How to Contribute

We host our code on Github, so feel free to send PR or issues.

评价

此插件暂无评价。

贡献者及开发者

「For Your Eyes Only」是开源软件。 以下人员对此插件做出了贡献。

贡献者
  • Fumiki Takahashi
  • Tarosky Inc.
  • Hametuha INC.

「For Your Eyes Only」插件已被翻译至 1 种本地化语言。 感谢所有译者为本插件所做的贡献。

帮助将「For Your Eyes Only」翻译成简体中文。

对开发感兴趣吗?

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

更新日志

1.2.4

  • Fix dynamic mode bag on the block.

1.2.1

  • Bump PHP and WordPress requirements.
  • Arranged tranpilation structure.

1.1.0

  • Ownership is now changed. Thanks to @hametuha for taking over this plugin.
  • Add dynamic mode. This works as PHP rendering.

1.0.1

  • Add auto deploy.

1.0.0

  • First Release.

额外信息

  • 版本 1.2.5
  • 最后更新:2 月前
  • 活跃安装数量 不到10
  • WordPress 版本 6.6 或更高版本
  • 已测试的最高版本为 6.9.8
  • PHP 版本 7.4 或更高版本
  • 语言

    English (US) 和 Japanese.

    翻译成简体中文

  • 标签
    loginmembershiprestrict
  • 高级视图

评级

尚未提交反馈。

您的评价

查看全部评论

贡献者

  • Fumiki Takahashi
  • Tarosky Inc.
  • Hametuha INC.

支持

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

查看支持论坛

  • 关于
  • 新闻
  • 主机
  • 隐私
  • 陈列窗
  • 主题
  • 插件
  • 区块样板
  • 学习
  • 支持
  • 开发者
  • WordPress.tv ↗︎
  • 参与
  • 活动
  • 捐赠 ↗
  • 周边商品 ↗
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

China 简体中文

  • 关注我们的 X(原 Twitter)账号
  • 访问我们的 Bluesky 账号
  • 关注我们的 Mastodon 账号
  • 访问我们的 Threads 账号
  • 访问我们的 Facebook 公共主页
  • 关注我们的 Instagram 账号
  • 关注我们的 LinkedIn 主页
  • 访问我们的 TikTok 账号
  • 访问我们的 YouTube 频道
  • 访问我们的 Tumblr 账号
代码如诗
The WordPress® trademark is the intellectual property of the WordPress Foundation.