values(); foreach($colours as $slug => $hex) { $palette[] = [ 'name' => esc_html__(@$NameThatColour->name($hex)['name'], 'badegg'), 'slug' => $slug, 'color' => $hex, ]; } if(!empty($colours)) { add_theme_support('editor-color-palette', $palette); } } public function BackgroundTints() { register_block_style( 'badegg/article', [ 'name' => 'badegg-colour-tint', 'label' => __('Tint', 'badegg'), // 'inline_style' =>'.wp-block-image.is-style-badegg-colour-tint { }', ] ); } }