Title: Disable Block &#8211; Hide blocks in the frontend
Author: landwire
Published: <strong>29 Tháng 9, 2022</strong>
Last modified: 13 Tháng 7, 2025

---

Tìm kiếm plugin

![](https://ps.w.org/disable-block/assets/banner-772x250.png?rev=2792154)

Plugin này **chưa được cập nhật với 3 phiên bản mới nhất của WordPress**. Nó có 
thể không được hỗ trợ và bảo trì, và có thể xung đột với các phiên bản WordPress
mới nhất.

![](https://ps.w.org/disable-block/assets/icon.svg?rev=2792157)

# Disable Block – Hide blocks in the frontend

 Bởi [landwire](https://profiles.wordpress.org/landwire/)

[Tải về](https://downloads.wordpress.org/plugin/disable-block.1.3.2.zip)

[Xem trước trực tiếp](https://vi.wordpress.org/plugins/disable-block/?preview=1)

 * [Chi tiết](https://vi.wordpress.org/plugins/disable-block/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/disable-block/#reviews)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/disable-block/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/disable-block/)

## Mô tả

Disable Block adds a simple button to the editor to disable the block on the frontend,
hiding it from viewers.
 Perfect for blocks that are not ready to be viewed by the
public, but you are working on in the backend.

It adds subtle markings in the editor, so that you can easily see which blocks are
disabled.
 Now it also adds some markings in the list view of the editor.

#### Features

 * Show or hide blocks with one click
 * Adds subtle markings and block name, so you can see which block is disabled, 
   leaving most of the design in the editor intact.

#### Limitations

Does not work with the Classic Block, Widget Block or Widget Area Block [‘core/freeform’,‘
core/legacy-widget’, ‘core/widget-area’], as the those blocks do not support block
attributes. Does also not work with the HTML Block [‘core/html’] inside the Widget
Screen, as this one also does not support block attributes there.

#### Configuration

Just activate the plugin. The “Disable Block” button will then appear in the toolbar
of each block.

## Ảnh màn hình

[⌊The 'Disable Block' button at work in the block editor.⌉⌊The 'Disable Block' button
at work in the block editor.⌉[

The ‘Disable Block’ button at work in the block editor.

## Hỏi đáp

### Can I change the styling in the admin that marks which blocks are hidden?

Yes, of course this is possible with a filter. Ideally do not change the “content:
attr(data-spk-block-disabled);” as it creates the text for the labelling.

    ```
    function change_css_styles_example_function($css)
            {
                $css = '[data-spk-block-disabled]:before {
                          color: #fff;
                          content: attr(data-spk-block-disabled);
                          z-index: 2;
                          background: #8b0000;
                          padding: 2px 6px;
                          font-size: 12px;
                          font-weight: 700;
                          position: absolute;
                          top: 0;
                          transform: translateY(calc(-100% + 1px));
                          right: 0;
                        }
                        [data-spk-block-disabled]:after {
                          content: '';
                          z-index: 1;
                          border-top: 5px solid #8b0000;
                          border-right: 5px solid #8b0000;
                          border-radius: 0;
                          position: absolute;
                          inset: 0;
                        }';

                return $css;
            }

     add_filter('disable_block_admin_styles', 'change_css_styles_example_function', 10);
    ```

## Đánh giá

![](https://secure.gravatar.com/avatar/67db3cc356774efde025f1551e12982a005b8c1b3d970245ef9dc51c717c8d70?
s=60&d=retro&r=g)

### 󠀁[Works very well and stable](https://wordpress.org/support/topic/works-very-well-and-stable/)󠁿

 [Mitzi_Rebel](https://profiles.wordpress.org/mitzi_rebel/) 15 Tháng 3, 2023 1 trả
lời

Easy light-weight plugin. Works very well and stable so far.

 [ Đọc tất cả 1 đánh giá ](https://wordpress.org/support/plugin/disable-block/reviews/)

## Người đóng góp & Lập trình viên

“Disable Block – Hide blocks in the frontend” là mã nguồn mở. Những người sau đã
đóng góp vào plugin này.

Những người đóng góp

 *   [ landwire ](https://profiles.wordpress.org/landwire/)

[Dịch “Disable Block – Hide blocks in the frontend” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/disable-block)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/disable-block/), check out
[SVN repository](https://plugins.svn.wordpress.org/disable-block/), hoặc theo dõi
[nhật ký phát triển](https://plugins.trac.wordpress.org/log/disable-block/) qua 
[RSS](https://plugins.trac.wordpress.org/log/disable-block/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### 1.3.2

 * Fixed CSS styling and updated readme

#### 1.3.1

 * Fixed asset bundling

#### 1.3.0

 * Added listview support

#### 1.2.1

 * Updated asset loading for changes introduced in WordPress 6.3
 * Fixed typo in CSS

#### 1.2.0

 * Fixed return type for render_block filter

#### 1.1.0

 * Added “disable_block_admin_styles” filter, so that developers can control the
   styling of the hidden block markings in the editor.

#### 1.0.0

 * Initial Release of the plugin

## Meta

 *  Phiên bản **1.3.2**
 *  Cập nhật lần cuối **1 năm trước**
 *  Số lượt cài đặt **70+**
 *  Phiên bản WordPress ** 5.0 hoặc cao hơn **
 *  Đã kiểm tra lên đến **6.8.8**
 *  Phiên bản PHP ** 7.4 hoặc cao hơn **
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/disable-block/)
 * Thẻ
 * [block](https://vi.wordpress.org/plugins/tags/block/)[disable](https://vi.wordpress.org/plugins/tags/disable/)
   [disable block](https://vi.wordpress.org/plugins/tags/disable-block/)[hide](https://vi.wordpress.org/plugins/tags/hide/)
   [hide block](https://vi.wordpress.org/plugins/tags/hide-block/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/disable-block/advanced/)

## Đánh giá

 5 trên 5 sao.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/disable-block/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/disable-block/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/disable-block/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/disable-block/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/disable-block/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/disable-block/reviews/#new-post)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/disable-block/reviews/)

## Những người đóng góp

 *   [ landwire ](https://profiles.wordpress.org/landwire/)

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/disable-block/)