Skip to content

Commit 9a58fa2

Browse files
committed
Add Block Control documentation
1 parent 2b4a671 commit 9a58fa2

File tree

17 files changed

+422
-4
lines changed

17 files changed

+422
-4
lines changed

.vitepress/config.mts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,48 @@ export default defineConfig({
121121
provider: 'local',
122122
},
123123
sidebar: {
124+
'/block-control/': [
125+
{
126+
text: 'Block Control',
127+
items: [
128+
{ text: 'Installation', link: '/block-control/installation' },
129+
{
130+
text: 'Getting started',
131+
link: '/block-control/getting-started',
132+
},
133+
{ text: 'System requirements', link: '/block-control/system-requirements' },
134+
{ text: 'Changelog', link: '/block-control/changelog' },
135+
],
136+
},
137+
{
138+
text: 'Developer',
139+
items: [
140+
{ text: 'Filters', link: '/block-control/developer/filters' },
141+
{ text: 'Block filters', link: '/block-control/developer/block-filters' },
142+
]
143+
},
144+
],
145+
'/de/block-control/': [
146+
{
147+
text: 'Block Control',
148+
items: [
149+
{ text: 'Installation', link: '/de/block-control/installation' },
150+
{
151+
text: 'Erste Schritte',
152+
link: '/de/block-control/getting-started',
153+
},
154+
{ text: 'Systemanforderungen', link: '/de/block-control/system-requirements' },
155+
{ text: 'Änderungsprotokoll', link: '/de/block-control/changelog' },
156+
],
157+
},
158+
{
159+
text: 'Entwickler',
160+
items: [
161+
{ text: 'Filter', link: '/de/block-control/developer/filters' },
162+
{ text: 'Block-Filter', link: '/de/block-control/developer/block-filters' },
163+
]
164+
},
165+
],
124166
'/de/embed-privacy/': [
125167
{
126168
text: 'Embed Privacy',

block-control/changelog.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Changelog
2+
3+
## Version 1.5.1 <Badge type="info" text="December 14, 2025" />
4+
5+
* Fixed: A block with a start date to hide in the future and with an end date will now correctly be hidden between those two dates
6+
7+
## Version 1.5.0 <Badge type="info" text="May 13, 2025" />
8+
9+
* Added: Option to hide based on a numbered page (e.g. in archives)
10+
11+
## Version 1.4.1 <Badge type="info" text="December 7, 2024" />
12+
13+
* We added an indeterminate visual display of the "All" checkbox, e.g. while selecting posts.
14+
* We fixed displaying post type visibility settings inside the site editor.
15+
16+
## Version 1.4.0 <Badge type="info" text="November 5, 2024" />
17+
18+
* We added the possibility to hide inline text for everyone but screen readers.
19+
20+
## Version 1.3.0 <Badge type="info" text="August 30, 2024" />
21+
22+
* We added the possibility to patterns to hide them by any post type available.
23+
* We extended the list of ignored post types with font families and font faces.
24+
25+
## Version 1.2.0 <Badge type="info" text="August 6, 2024" />
26+
27+
* We added the option to disable blocks for screen readers. That means that the block is still visible, but will be ignored by screen readers entirely.
28+
29+
## Version 1.1.12 <Badge type="info" text="December 11, 2023" />
30+
31+
* We fixed all variants of hide by date setting to be properly checked.
32+
33+
## Version 1.1.11 <Badge type="info" text="November 10, 2023" />
34+
35+
* We fixed the hide by date setting if only one of the dates is used.
36+
37+
## Version 1.1.10 <Badge type="info" text="October 31, 2023" />
38+
39+
* We fixed the hide by date setting if both settings are in the future or both are in the past.
40+
* We improved the settings for hide by date for better accessibility and functionality.
41+
42+
## Version 1.1.9 <Badge type="info" text="August 26, 2023" />
43+
44+
* We fixed a problem with some blocks no more saving the visibility settings.
45+
46+
## Version 1.1.8 <Badge type="info" text="August 8, 2023" />
47+
48+
* We fixed a problem with broken blocks after updating to version 1.1.7. The editor now doesn't contain any classes from Block Control anymore.
49+
50+
## Version 1.1.7 <Badge type="info" text="August 1, 2023" />
51+
52+
* We fixed compatibility with dynamic blocks.
53+
54+
## Version 1.1.6 <Badge type="info" text="June 1, 2023" />
55+
56+
* We improved the ability to use the filter `blockControl.unsupportedBlocks` without needing to load the own JavaScript early.
57+
58+
## Version 1.1.5 <Badge type="info" text="April 25, 2023" />
59+
60+
* We added a filter `blockControl.unsupportedBlocks` to filter the list of unsupported blocks.
61+
* We disabled Block Control for the SimpleTOC block in order to display it properly in the backend.
62+
63+
## Version 1.1.4 <Badge type="info" text="April 5, 2023" />
64+
65+
* We disabled Block Control for the Polylang language switcher in order to display it properly in the backend.
66+
67+
## Version 1.1.3 <Badge type="info" text="November 5, 2022" />
68+
69+
* We added full support for WordPress 6.1 (replaced a deprecated function).
70+
71+
## Version 1.1.2 <Badge type="info" text="October 3, 2022" />
72+
73+
* We fixed a potential error in blocks in the widget area.
74+
75+
## Version 1.1.1 <Badge type="info" text="July 7, 2022" />
76+
77+
* We fixed a dependency problem, which may result in preventing the settings panel to appear.
78+
79+
## Version 1.1.0 <Badge type="info" text="May 28, 2022" />
80+
81+
* Since the originally planned Pro version will never be completed, we decided to merge its code into the free version of Block Control.
82+
* Hide blocks based on roles
83+
* Hide blocks based on dates
84+
* Hide blocks based on page types (`is_home`, `is_page`, etc.)
85+
* Hide blocks based on posts of the current post type (useful especially for reusable blocks)
86+
87+
## Version 1.0.4 <Badge type="info" text="December 14, 2021" />
88+
89+
* We fixed a problem with assets loading in the backend
90+
91+
## Version 1.0.3 <Badge type="info" text="June 15, 2021" />
92+
93+
* We fixed a problem while checking for block attributes
94+
95+
## Version 1.0.2 <Badge type="info" text="December 31, 2020" />
96+
97+
* We fixed a problem that may load multiple editor scripts in the frontend even if they are not needed there
98+
* We fixed a problem where Block Control options won’t be available for certain blocks
99+
100+
## Version 1.0.1 <Badge type="info" text="August 28, 2019" />
101+
102+
* We fixed the internationalization for all strings
103+
104+
## Version 1.0.0 <Badge type="info" text="August 27, 2019" />
105+
106+
* Initial release
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Block filters
2+
3+
## `blockControl.unsupportedBlocks` <Badge type="info" text="Since 1.1.5" />
4+
5+
Through the filter `blockControl.unsupportedBlocks` the list of unsupported blocks can be filtered.
6+
7+
Parameters:
8+
string[] List of unsupported block names
9+
10+
Expects an array.

block-control/developer/filters.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Filters
2+
3+
## `block_control_ignored_post_types` <Badge type="info" text="Since 1.1.0" />
4+
5+
Through the filter `block_control_ignored_post_types` the post types to ignore in the block sidebar can be changed.
6+
7+
Parameters:
8+
string[] $ignored_post_types List of ignored post types
9+
10+
Expects an array.

block-control/getting-started.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Getting started
2+
3+
After installing the plugin you can find the entry Block Control in the plugin overview – in **Plugins** menu entry of the WordPress backend. You can activate the plugin through this entry.
4+
5+
After activating Block Control, you can find a new panel on every block in the block sidebar, called “Visibility”, where you can hide this block under certain conditions. Block Control does not hide blocks via CSS, it disabled the output of the block altogether. That’s why it’s not compatible with caching systems that cannot distinguish between those settings (e.g. different caches for different device types or user roles).
6+
7+
Also, you can find a formatting setting in rich text areas where you can format text to mark the text as “Screen Reader Text”, which hides it visually and only reads it for screen readers.
8+
9+
## Device types
10+
11+
You can hide the block for desktop as well as mobile users, or only for screen readers. The latter does not hide the block visually, but only for assistive technology.
12+
13+
The detection for mobile users takes place solely via the browser’s user agent.
14+
15+
## Login status
16+
17+
You can hide the block for all logged in or logged out users.
18+
19+
## Date
20+
21+
You can hide the block based on dates. If you just define the “hide date”, the block will be starting being hidden from this date on. If you also define the “start date”, the block will not be hidden after this date anymore.
22+
23+
If you only define a “start date”, the block will be hidden until this date.
24+
25+
## User roles
26+
27+
You can hide the block for any user role registered in your WordPress instance. You can also select multiple roles at once.
28+
29+
## Specific page types
30+
31+
You can hide the block for specific page types, which are technically unique in WordPress, such as the blog page, the front page, categories, etc.
32+
33+
## Numbered pages
34+
35+
You can hide the block for numbered pages, e.g. certain pages in an archive list. There are some pre-defined values, but you can also specifically define the page numbers on where to hide the block.
36+
37+
## Post type
38+
39+
You can hide the block on certain items of the current post type. If you edit a page, you can define pages here. If you edit a blog post, you can define blog posts here. If you use the visibility settings in the site editor or the widget area, all registered post types will be shown (except for certain system post types, e.g. navigation menu items, block patterns, etc.).

block-control/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Block Control
2+
3+
With Block Control, you can set conditions to blocks in the block editor to hide them based on these conditions. It is compatible with every block out of the box, not only with those shipping with WordPress, but also from custom block coming from plugins.
4+
5+
<a class="epiphyt-button is-primary" href="https://wordpress.org/plugins/block-control/">Download Block Control</a>

block-control/installation.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Installation
2+
3+
First, download Block Control from WordPress.org:
4+
5+
<a class="epiphyt-button is-primary" href="https://wordpress.org/plugins/block-control/">Download Block Control</a>
6+
7+
## Installation through the backend
8+
9+
You can uploaded the downloaded `.zip` file directly in your WordPress backend. You will need a user account with administrator permissions (or super administrator permissions in multisite installations). As soon as you’re logged in, you can find the entry **Plugins > Install** in the menu. You can upload the `.zip` file on this page by clicking on the button “Upload plugin” alongside the headline.
10+
11+
## Installation through FTP
12+
13+
To install the downloaded `.zip` file through (S)FTP, you first need to extract it and upload the files and folders with an FTP program of your choice onto your website.
14+
After the upload, they should be found in `wp-content/plugins/block-control`.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# System requirements
2+
3+
* WordPress: Version 6.2 or newer
4+
* PHP: Version 5.6 or newer

de/block-control/changelog.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Änderungsprotokoll
2+
3+
## Version 1.5.1 <Badge type="info" text="14. Dezember 2025" />
4+
5+
* Behoben: Ein Block mit einem Startdatum zum Ausblenden in der Zukunft und mit einem Enddatum wird jetzt korrekt zwischen diesen beiden Daten ausgeblendet
6+
7+
## Version 1.5.0 <Badge type="info" text="13. Mai 2025" />
8+
9+
* Hinzugefügt: Option zum Ausblenden basierend auf einer nummerierten Seite (z. B. in Archiven)
10+
11+
## Version 1.4.1 <Badge type="info" text="7. Dezember 2024" />
12+
13+
* Wir haben eine unbestimmte visuelle Anzeige des Kontrollkästchens „Alle“ hinzugefügt, z. B. bei der Auswahl von Beiträgen.
14+
* Wir haben die Anzeige der Sichtbarkeitseinstellungen für Inhaltstypen im Website-Editor korrigiert.
15+
16+
## Version 1.4.0 <Badge type="info" text="5. November 2024" />
17+
18+
* Wir haben die Möglichkeit hinzugefügt, Inline-Text für alle außer Screenreader auszublenden.
19+
20+
## Version 1.3.0 <Badge type="info" text="30. August 2024" />
21+
22+
* Wir haben den Vorlagen die Möglichkeit gegeben, sie nach jedem verfügbaren Inhaltstyp auszublenden.
23+
* Wir haben die Liste der ignorierten Inhaltstypen mit Schriftfamilien und Schriftarten erweitert.
24+
25+
## Version 1.2.0 <Badge type="info" text="6. August 2024" />
26+
27+
* Wir haben die Option hinzugefügt, Blöcke für Screenreader zu deaktivieren. Das bedeutet, dass der Block immer noch sichtbar ist, aber von Screenreadern komplett ignoriert wird.
28+
29+
## Version 1.1.12 <Badge type="info" text="11. Dezember 2023" />
30+
31+
* Wir haben alle Variationen der Einstellung zum Ausblenden nach Datum korrigiert, sodass sie korrekt überprüft werden.
32+
33+
## Version 1.1.11 <Badge type="info" text="10. November 2023" />
34+
35+
* Wir haben die Einstellung zum Ausblenden nach Datum korrigiert, wenn nur ein Datum verwendet wird.
36+
37+
## Version 1.1.10 <Badge type="info" text="31. Oktober 2023" />
38+
39+
* Wir haben die Einstellung zum Ausblenden nach Datum korrigiert, wenn beide Einstellungen in der Zukunft oder in der Vergangenheit liegen.
40+
* Wir haben die Einstellungen für das Ausblenden nach Datum für bessere Barrierefreiheit und Funktionalität verbessert.
41+
42+
## Version 1.1.9 <Badge type="info" text="26. August 2023" />
43+
44+
* Wir haben ein Problem behoben, bei dem einige Blöcke die Sichtbarkeitseinstellungen nicht mehr speichern.
45+
46+
## Version 1.1.8 <Badge type="info" text="8. August 2023" />
47+
48+
* Wir haben ein Problem mit kaputten Blöcken nach der Aktualisierung auf Version 1.1.7 behoben. Der Editor beinhaltet jetzt keine Klassen mehr von Block Control.
49+
50+
## Version 1.1.7 <Badge type="info" text="1. August 2023" />
51+
52+
* Wir haben die Kompatibilität mit dynamischen Blöcken korrigiert.
53+
54+
## Version 1.1.6 <Badge type="info" text="1. Juni 2023" />
55+
56+
* Wir haben die Möglichkeit verbessert, den Filter `blockControl.unsupportedBlocks` zu benutzen, ohne das eigene JavaScript früh laden zu müssen.
57+
58+
## Version 1.1.5 <Badge type="info" text="25. April 2023" />
59+
60+
* Wir haben einen Filter `blockControl.unsupportedBlocks` hinzugefügt, um die Liste der nicht unterstützten Blöcke zu filtern.
61+
* Wir haben Block Control für den SimpleTOC-Block deaktiviert, damit dieser im Backend korrekt angezeigt wird.
62+
63+
## Version 1.1.4 <Badge type="info" text="5. April 2023" />
64+
65+
* Wir haben Block Control für den Polylang-Sprachwechsler deaktiviert, damit dieser im Backend korrekt angezeigt wird.
66+
67+
## Version 1.1.3 <Badge type="info" text="5. November 2022" />
68+
69+
* Wir haben die vollständige Unterstützung für WordPress 6.1 hinzugefügt (eine veraltete Funktion ersetzt).
70+
71+
## Version 1.1.2 <Badge type="info" text="3. Oktober 2022" />
72+
73+
* Wir haben einen potenziellen Fehler in Blöcken innerhalb des Widget-Bereichs behoben.
74+
75+
## Version 1.1.1 <Badge type="info" text="7. Juli 2022" />
76+
77+
* Wir haben ein Abhängigkeitsproblem korrigiert, das dazu führen konnte, dass das Einstellungs-Panel nicht angezeigt wird.
78+
79+
## Version 1.1.0 <Badge type="info" text="28. Mai 2022" />
80+
81+
* Da die ursprünglich geplante Pro-Version nie fertiggestellt wird, haben wir uns entschieden, sie in die kostenlose Version von Block Control zu migrieren.
82+
* Blende Blöcke basierend auf Rollen aus
83+
* Blende Blöcke basierend auf Daten aus
84+
* Blende Blöcke basierend auf Seitentypen aus (`is_home`, `is_page` etc.)
85+
* Blende Blöcke basierend auf Beiträgen des aktuellen Inhaltstyps aus (insbesondere hilfreich für wiederverwendbare Blöcke)
86+
87+
## Version 1.0.4 <Badge type="info" text="14. Dezember 2021" />
88+
89+
* Wir haben ein Problem mit dem Laden von Assets im Backend behoben
90+
91+
## Version 1.0.3 <Badge type="info" text="15. Juni 2021" />
92+
93+
* Wir haben ein Problem während der Prüfung von Block-Attributen behoben
94+
95+
## Version 1.0.2 <Badge type="info" text="31. Dezember 2020" />
96+
97+
* Wir haben ein Problem behoben, das dazu führte, dass mehrere Editor-Skripte im Frontend geladen wurden, auch wenn sie dort nicht notwendig waren
98+
* Wir haben ein Problem behoben, wodurch die Optionen von Block Control für manche Blöcke nicht verfügbar waren
99+
100+
## Version 1.0.1 <Badge type="info" text="28. August 2019" />
101+
102+
* Es können nun alle Zeichenfolgen übersetzt werden
103+
104+
## Version 1.0.0 <Badge type="info" text="27. August 2019" />
105+
106+
* Erste Version
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Block-Filter
2+
3+
## `blockControl.unsupportedBlocks` <Badge type="info" text="Seit 1.1.5" />
4+
5+
Über den Filter `blockControl.unsupportedBlocks` kann die Liste der nicht unterstützten Blöcke geändert werden.
6+
7+
Parameter:
8+
string[] Liste der nicht unterstützten Block-Namen
9+
10+
Erwartet ein Array.

0 commit comments

Comments
 (0)