{"id":100985,"date":"2019-04-10T02:03:26","date_gmt":"2019-04-10T02:03:26","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/for-your-eyes-only\/"},"modified":"2026-01-19T08:43:53","modified_gmt":"2026-01-19T08:43:53","slug":"for-your-eyes-only","status":"publish","type":"plugin","link":"https:\/\/sa.wordpress.org\/plugins\/for-your-eyes-only\/","author":1143171,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.2.3","stable_tag":"1.2.3","tested":"6.9.4","requires":"6.6","requires_php":"7.4","requires_plugins":null,"header_name":"For Your Eyes Only","header_author":"Tarosky INC.","header_description":"A block restricted only for specified users.","assets_banners_color":"614027","last_updated":"2026-01-19 08:43:53","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/for-your-eyes-only","header_author_uri":"https:\/\/tarosky.co.jp","rating":0,"author_block_rating":0,"active_installs":0,"downloads":2929,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"Takahashi_Fumiki","date":"2019-04-10 02:03:17"},"1.1.1":{"tag":"1.1.1","author":"Tarosky","date":"2024-10-11 07:49:29"},"1.1.2":{"tag":"1.1.2","author":"Tarosky","date":"2024-10-11 13:27:14"},"1.1.3":{"tag":"1.1.3","author":"Tarosky","date":"2024-10-11 14:01:44"},"1.1.4":{"tag":"1.1.4","author":"Tarosky","date":"2024-10-11 14:18:43"},"1.1.5":{"tag":"1.1.5","author":"Tarosky","date":"2024-10-11 14:34:22"},"1.2.0":{"tag":"1.2.0","author":"Tarosky","date":"2025-12-25 08:57:26"},"1.2.1":{"tag":"1.2.1","author":"Tarosky","date":"2025-12-25 09:36:06"},"1.2.2":{"tag":"1.2.2","author":"Tarosky","date":"2025-12-25 14:32:19"},"1.2.3":{"tag":"1.2.3","author":"Tarosky","date":"2026-01-19 08:43:53"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2066304,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2066304,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1554x500.jpg":{"filename":"banner-1554x500.jpg","revision":2066304,"resolution":"1554x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":2066304,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":{"fyeo\/block":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"fyeo\/block","version":"1.0.0","title":"Restricted Block","category":"common","icon":"hidden","description":"This block will be displayed only for specified users.","keywords":["restricted","for your eyes only","private"],"textdomain":"fyeo","attributes":{"tag_line":{"type":"string","default":""},"capability":{"type":"string","default":""},"dynamic":{"type":"string","default":""}},"supports":{"html":false},"editorScript":"file:.\/index.js","editorStyle":"file:.\/index.css","viewScript":["jquery","file:.\/view.js"],"render":"file:.\/render.php"}},"tagged_versions":["1.0.1","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.2.0","1.2.1","1.2.2","1.2.3"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2066304,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"You get a new block to restrict non-members."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[602,1932,1914],"plugin_category":[38,58],"plugin_contributors":[146156,83237,142014],"plugin_business_model":[],"class_list":["post-100985","plugin","type-plugin","status-publish","hentry","plugin_tags-login","plugin_tags-membership","plugin_tags-restrict","plugin_category-authentication","plugin_category-user-management","plugin_contributors-hametuha","plugin_contributors-takahashi_fumiki","plugin_contributors-tarosky","plugin_committers-takahashi_fumiki","plugin_committers-tarosky"],"banners":{"banner":"https:\/\/ps.w.org\/for-your-eyes-only\/assets\/banner-772x250.jpg?rev=2066304","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/for-your-eyes-only\/assets\/icon-128x128.png?rev=2066304","icon_2x":"https:\/\/ps.w.org\/for-your-eyes-only\/assets\/icon-256x256.png?rev=2066304","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/for-your-eyes-only\/assets\/screenshot-1.png?rev=2066304","caption":"You get a new block to restrict non-members."}],"raw_content":"<!--section=description-->\n<p>This plugin adds a block to your block editor.\nThis block changes its display depending on a current user's capability.<\/p>\n\n<ul>\n<li>You can set capability for block.<\/li>\n<li>If a current user has a capability for the block, its content will be replaced.<\/li>\n<li>Or else, block is displayed as log in link.<\/li>\n<li>This block is an inner block, so you can nest any blocks inside it. Convert it to a reusable block for your productivity.<\/li>\n<\/ul>\n\n<p>See screenshot for how block will be displayed.<\/p>\n\n<p>This plugin use REST API to convert block content, so you can use it with cached WordPress.\nEven if you use CDN like <a href=\"https:\/\/aws.amazon.com\/cloudfront\/\">CloudFront<\/a> or <a href=\"https:\/\/www.cloudflare.com\/\">Cloudflare<\/a>, this plugin displays proper contents for each users.<\/p>\n\n<p>For performance enhancement, <a href=\"https:\/\/wordpress.org\/plugins\/cookie-tasting\/\">Cookie Tasting<\/a> is recommended.\nIt decreases server access including REST API by checking COOKIE value before accessing to server side script.<\/p>\n\n<h4>Hooks<\/h4>\n\n<p>Display Customization<\/p>\n\n<ul>\n<li><code>fyeo_tag_line<\/code> - Customize the default tagline displayed to users without capability. <code>%s<\/code> will be replaced with login URL.<\/li>\n<li><code>fyeo_login_url<\/code> - Replace the login URL. Default is <code>wp_login_url()<\/code>.<\/li>\n<li><code>fyeo_redirect_url<\/code> - Customize redirect URL after login. Receives post object as second argument.<\/li>\n<li><code>fyeo_redirect_key<\/code> - Change query parameter key for redirect. Default is <code>redirect_to<\/code>.<\/li>\n<li><p><code>fyeo_enqueue_style<\/code> - Whether to enqueue default theme style. Return <code>false<\/code> to disable.<\/p>\n\n<p>Capability Control<\/p><\/li>\n<li><p><code>fyeo_capabilities_list<\/code> - Customize available capabilities list shown in block settings.<\/p><\/li>\n<li><code>fyeo_default_capability<\/code> - Change default capability. Default is <code>read<\/code>.<\/li>\n<li><p><code>fyeo_user_has_cap<\/code> - Override capability check result. Receives <code>$has_cap<\/code>, <code>$capability<\/code>, <code>$user<\/code>.<\/p>\n\n<p>Rendering<\/p><\/li>\n<li><p><code>fyeo_default_render_style<\/code> - Set default rendering style. Return <code>dynamic<\/code> for PHP rendering, empty string for async.<\/p><\/li>\n<li><p><code>fyeo_can_display_non_public<\/code> - Allow displaying restricted content for non-public posts. Receives <code>$post<\/code> object.<\/p>\n\n<p>REST API<\/p><\/li>\n<li><p><code>fyeo_minimum_rest_capability<\/code> - Control REST API access. Return <code>false<\/code> to deny access.<\/p><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/for-your-eyes-only<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress<\/li>\n<li>You get new block named <strong>Restricted Block<\/strong> on Block Editor.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20to%20contribute\"><h3>How to Contribute<\/h3><\/dt>\n<dd><p>We host our code on <a href=\"https:\/\/github.com\/tarosky\/for-your-eyes-only\">Github<\/a>, so feel free to send PR or issues.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Bump PHP and WordPress requirements.<\/li>\n<li>Arranged tranpilation structure.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Ownership is now changed. Thanks to @hametuha for taking over this plugin.<\/li>\n<li>Add dynamic mode. This works as PHP rendering.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Add auto deploy.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First Release.<\/li>\n<\/ul>","raw_excerpt":"Add a restricted block for specified users.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/100985","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=100985"}],"author":[{"embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/takahashi_fumiki"}],"wp:attachment":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=100985"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=100985"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=100985"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=100985"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=100985"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=100985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}