這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Restrict Block Content

描述

This plugin will allow you, by default, to add restrictions to core/group and core/row blocks in the block and full-site editors.

Restrictions involve enabling it for that block, then setting the access level used by RC/RCP, and then determine whether the user must have at least that access level, or not have that access level in the block editor.

For details about how Access Levels work, here is a resource from the creators: https://help.solidwp.com/hc/en-us/articles/360049322274-How-do-access-levels-work

This plugin relies on either Restrict Content available on the WordPress.org Plugins Repository, or the premium version of Restrict Content Pro.

Note: If you are using Restrict Content Pro, and facing an issue where this plugin’s dependencies do not seem to be met, make sure you are using RCP ≥ 4.5.46, which supports plugin dependencies for the free version as well through the wp_plugin_dependencies_slug filter.

If you need to use this with an older version, you can apply this filter manually:

/**
 * Filter so that plugins listing the free version as a dependency would also be satisfied by the Pro version.
 *
 * @param string $slug The plugin slug being checked.
 */
add_filter( 'wp_plugin_dependencies_slug', function( $s ) {
    if ( 'restrict-content' === $s ) {
        $s = 'restrict-content-pro';
    }
    return $s;
});

Source Code

Full source code is available on Github here:

https://github.com/bethinkstudio/restrict-block-content

螢幕截圖

評價

There are no reviews for this plugin.

貢獻者及開發者

“Restrict Block Content” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Restrict Block Content 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

修改日誌

1.0.1

  • Add fallback for default comparison value.
  • Tidy up code formatting in readme.txt.

1.0.0

  • Initial public release on WordPress.org.

0.9.1

  • Minor changes to appease the plugin check to submit to .org.

0.9.0

  • Release