Skip to content

Commit 1cbe9c6

Browse files
committed
Update desc; safe check
1 parent 090bc64 commit 1cbe9c6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

plugin/php/customizer/class-controls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function add_sections() {
139139
'global-setting' => [
140140
'label' => __( 'Global Styles', 'material-design' ),
141141
'priority' => 300,
142-
'description' => esc_html__( 'Global style change will affect all the blocks used in your pages. This may override styles applied to blocks locally.', 'material-design' ),
142+
'description' => esc_html__( 'Global styles will be applied to any new and existing static block using the default style. This will not affect any local style overrides for supported blocks.', 'material-design' ),
143143
],
144144
];
145145

theme/functions.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ function material_is_plugin_active() {
203203
*/
204204
function get_material_global_style( $key ) {
205205
if ( material_is_plugin_active() ) {
206-
return \MaterialDesign\Plugin\get_plugin_instance()->block_types->get_global_styles( $key );
206+
$instance = \MaterialDesign\Plugin\get_plugin_instance();
207+
if ( property_exists( $instance, 'block_types' ) && method_exists( $instance->block_types, 'get_global_styles' ) ) {
208+
return $instance->block_types->get_global_styles( $key );
209+
}
207210
}
208211
return '';
209212
}

0 commit comments

Comments
 (0)