Hi,
I’m using Snow Monkey Editor and trying to understand how the “Hide by user roles” feature works with the render_block filter hook. Specifically, I want to hide certain blocks for non-admin users.
Here’s what I’ve tried:
I added the block and went to the settings in the inspector to assign roles, but it doesn’t seem to take effect unless I manually edit the code.
I’m unclear on how exactly I should set up the filter. Should I add the render_block hook directly to my theme’s functions.php file? If so, could you share an example of what this looks like?
For instance, I’m trying to hide a “Text Badge” block from editors, but the block still shows up for them no matter what settings I use in the inspector. Is this a limitation of the plugin, or am I missing something in the configuration?
It would be great if you could point me to any documentation or provide a quick code snippet for setting this up properly.
Thanks for your help!
]]>Please make this plugin compatible with the Edit as HTML command on other 3rd party blocks such as Kadence.
This feature does not allow users to have multiple roles on one site.
Can you delete option “Display settings by roles”?
editor-extension.js?ver=1665882849:
1 Uncaught TypeError: e.roles.filter is not a function
at p (editor-extension.js?ver=1665882849:1:3848)
at editor-extension.js?ver=1665882849:1:4153
at load-scripts.php?c=0&load%5Bchunk_0%5D=hoverIntent,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.0.2:6:3346
at Mt (blocks.min.js?ver=658a51e7220626e26a92a46af5c2e489:3:106966)
at blocks.min.js?ver=658a51e7220626e26a92a46af5c2e489:3:108248
at data.min.js?ver=6c1ab5799c4b061254d313d2d8d9fb87:2:10446
at redux-routine.min.js?ver=5156478c032ea85a2bbdceeb7a43b0c1:2:8811
at data.min.js?ver=6c1ab5799c4b061254d313d2d8d9fb87:2:9297
at Object.dispatch (data.min.js?ver=6c1ab5799c4b061254d313d2d8d9fb87:2:10389)
at Object.__experimentalRegisterBlockType (data.min.js?ver=6c1ab5799c4b061254d313d2d8d9fb87:2:14413)
Hi folks! This looks like an excellent plugin. However, as I was testing it, I noticed that it is throwing lots of JS errors in the console:
editor-extension.js?ver=1651003511:1 Uncaught (in promise) TypeError: e.roles.filter is not a function
at p (editor-extension.js?ver=1651003511:1:3816)
at editor-extension.js?ver=1651003511:1:4121
at hooks.min.js?ver=1e58c8c5a32b2e97491080c5b10dc71c:2:4160
at Ge (blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812:2:23743)
at We (blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812:2:25056)
at We.next (<anonymous>)
at redux-routine.min.js?ver=6c3ab278bc9641b6f62731e018a4449e:2:9334
at e.any (redux-routine.min.js?ver=6c3ab278bc9641b6f62731e018a4449e:2:6516)
at redux-routine.min.js?ver=6c3ab278bc9641b6f62731e018a4449e:2:9446
at Array.some (<anonymous>)
]]>
Please test the plugin on WordPress 5.8. The blocks are not editable anymore when the plugin is active. Below is the error
'The block has encountered an error and cannot be previewed
【お使いの Snow Monkey のバージョン】9.3.4
【お使いのブラウザ】Google Chrome
【当該サイトのURL】クライアントサイトのため非公開
お世話になります。
制作中WebサイトにてSnow Monkey Blocks プラグイン(7.4.1)と Snow Monkey Editor プラグイン(1.1.0)を利用しております。
こちらのフォーラム記事の方と同様にフロントページのファーストビジュアルでスライダーを検討しているのですが、Snow Monkey Blocks のスライダーブロック「スライダー」で、PC版?SP版のスライダーをそれぞれ作成し、SP版のスライダーに「表示設定(ウインドウサイズ)」を「PCサイズで非表示」にチェックをしたところ、フッターの下に膨大な量の余白が発生いたしました。
ご確認いただければ幸いです。
]]>