I'm building a simple color palette plugin that's going to override the gutenburg color settings.
Normally, you can add colors in add_theme_support( 'editor-color-palette' ); in an array like this:
add_theme_support(
'editor-color-palette',
[
[
'name' => esc_html__( 'Brown', 'udemy-plugin' ),
'slug' => 'brown',
'color' => '#3a3335',
],
[
'name' => esc_html__( 'Orange', 'udemy-plugin' ),
'slug' => 'orange',
'color' => '#f0544f',
],
[
'name' => esc_html__( 'Light Green', 'udemy-plugin' ),
'slug' => 'light-green',
'color' => '#c6d8d3',
],
]
);
However, I was wondering if it's possible to link the array part to a file? like this:
add_theme_support( 'editor-color-palette', $link-to-array );
If it's possible, how do I link the array file in the plugin? So far, my plugin folder is set up like this:
-Plugin Folder
-plugin.php (where my code is in)