PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/block-library/icon.php +9 -0 24.0.0 → 24.1.0 View file →
@@ -18,8 +18,17 @@
18 18 if ( empty( $attributes['icon'] ) ) {
19 19 return;
20 20 }
21 21
22 + // Icons in non-public collections are not available in the editor, so do not render them either.
23 + $registered_icon = WP_Icons_Registry::get_instance()->get_registered_icon( $attributes['icon'] );
24 + if ( null !== $registered_icon ) {
25 + $icon_collection = WP_Icon_Collections_Registry::get_instance()->get_registered( $registered_icon['collection'] );
26 + if ( null !== $icon_collection && ! $icon_collection['public'] ) {
27 + return;
28 + }
29 + }
30 +
22 31 // Text color and background color.
23 32 $color_styles = array();
24 33
25 34 $preset_text_color = array_key_exists( 'textColor', $attributes ) ? "var:preset|color|{$attributes['textColor']}" : null;